Make geninitrd by default clean & add hostname
This commit is contained in:
parent
39b9430cf8
commit
31b7e114ca
1 changed files with 5 additions and 2 deletions
|
@ -10,10 +10,11 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Create the root fs dir
|
# Create the root fs dir
|
||||||
|
|
||||||
|
rm -rf isoout isoroot
|
||||||
mkdir isoroot
|
mkdir isoroot
|
||||||
mkdir isoout
|
mkdir isoout
|
||||||
|
|
||||||
mkdir diskroot
|
|
||||||
|
|
||||||
cp_packages (){
|
cp_packages (){
|
||||||
#NOTE: this will assume that there always is a '*-dev'/'*-doc' package,\n this is not true.
|
#NOTE: this will assume that there always is a '*-dev'/'*-doc' package,\n this is not true.
|
||||||
|
@ -32,7 +33,7 @@ packages=(musl linux mksh busybox toybox iglunix)
|
||||||
cp_packages ./isoroot
|
cp_packages ./isoroot
|
||||||
|
|
||||||
#packages=(musl mksh busybox toybox llvm bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune iglunix rust less heirloom-doctools file pci-ids)
|
#packages=(musl mksh busybox toybox llvm bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune iglunix rust less heirloom-doctools file pci-ids)
|
||||||
#cp_packages ./diskroot
|
#cp_packages ./isoroot
|
||||||
|
|
||||||
cat >isoroot/init << EOF
|
cat >isoroot/init << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
@ -115,6 +116,8 @@ chmod +x isoroot/sbin/init
|
||||||
|
|
||||||
# cp /etc/inittab isoroot/etc/
|
# cp /etc/inittab isoroot/etc/
|
||||||
|
|
||||||
|
cp /etc/hostname ./isoroot/hostname
|
||||||
|
|
||||||
cd isoroot
|
cd isoroot
|
||||||
find . | cpio -ov | gzip -9 >../isoout/initramfs.img
|
find . | cpio -ov | gzip -9 >../isoout/initramfs.img
|
||||||
cp boot/vmlinuz ../isoout/vmlinuz
|
cp boot/vmlinuz ../isoout/vmlinuz
|
||||||
|
|
Loading…
Reference in a new issue