diff --git a/debian-devuan-netboot.sh b/debian-devuan-netboot.sh index c83b9cf..a613903 100755 --- a/debian-devuan-netboot.sh +++ b/debian-devuan-netboot.sh @@ -60,40 +60,6 @@ cat > ${chroot_dir}/etc/network/interfaces << EOF auto lo iface lo inet loopback -EOF - -# find the boot interfaces at boot: HP servers still have ifnames=1 -cat > ${chroot_dir}/etc/rc.local <> /etc/network/interfaces << eof -auto \$dev -iface \$dev inet6 auto -eof - -ifup "\${dev}" - -exit 0 -EOF - -chmod a+rx "${chroot_dir}/etc/rc.local" - -# ensure there is /init in the initramfs -> otherwise there is a kernel panic -# reason: initramfs is designed to be PRE regular os, so /init usually hands over to /sbin/init -# in our case, they are just the same -ln -fs /sbin/init ${chroot_dir}/init - -# Finally building the initramfs -( cd ${chroot_dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} ) - -# Fix paranoid permissions -chmod a+rx ${abs_outdir} -chmod a+r ${kernel} ${initramfs} - - -exit 0 - # I would like to have a generic block like this below # But as long as interface auto bond0 @@ -118,3 +84,37 @@ auto bond0.11 iface bond0.11 inet6 auto post-up /sbin/ip link set \$IFACE mtu 9000 vlan-raw-device bond0 + +EOF + +# # find the boot interfaces at boot: HP servers still have ifnames=1 +# cat > ${chroot_dir}/etc/rc.local <> /etc/network/interfaces << eof +# auto \$dev +# iface \$dev inet6 auto +# eof + +# ifup "\${dev}" + +# exit 0 +# EOF + +# chmod a+rx "${chroot_dir}/etc/rc.local" + +# ensure there is /init in the initramfs -> otherwise there is a kernel panic +# reason: initramfs is designed to be PRE regular os, so /init usually hands over to /sbin/init +# in our case, they are just the same +ln -fs /sbin/init ${chroot_dir}/init + +# Finally building the initramfs +( cd ${chroot_dir} ; find . | cpio -H newc -o | gzip -9 > ${initramfs} ) + +# Fix paranoid permissions +chmod a+rx ${abs_outdir} +chmod a+r ${kernel} ${initramfs} + + +exit 0