From 31b7e114ca396c85f746f4ddf551414235297875 Mon Sep 17 00:00:00 2001 From: aheirman <48590738+aheirman@users.noreply.github.com> Date: Sat, 13 Feb 2021 14:42:50 +0100 Subject: [PATCH] Make geninitrd by default clean & add hostname --- geninitrd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geninitrd.sh b/geninitrd.sh index 651bf94..b6c06df 100755 --- a/geninitrd.sh +++ b/geninitrd.sh @@ -10,10 +10,11 @@ # # Create the root fs dir + +rm -rf isoout isoroot mkdir isoroot mkdir isoout -mkdir diskroot cp_packages (){ #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 #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 #!/bin/sh @@ -115,6 +116,8 @@ chmod +x isoroot/sbin/init # cp /etc/inittab isoroot/etc/ +cp /etc/hostname ./isoroot/hostname + cd isoroot find . | cpio -ov | gzip -9 >../isoout/initramfs.img cp boot/vmlinuz ../isoout/vmlinuz