diff --git a/debian-devuan-netboot.sh b/debian-devuan-netboot.sh index c5d254a..6fdeecb 100755 --- a/debian-devuan-netboot.sh +++ b/debian-devuan-netboot.sh @@ -23,15 +23,11 @@ keyurl=https://code.ungleich.ch/ungleich-public/__ungleich_staff_ssh_access/raw/ debootstrap "${suite}" "${dir}" -chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64 +# need non-free for firmware-bnx2 +echo 'deb http://pkgmaster.devuan.org/merged ${suite} main contrib non-free' > ${dir}/etc/apt/sources.list -cat > ${dir}/etc/network/interfaces << EOF -auto lo -iface lo inet loopback +chroot ${dir} apt install -y openssh-server rdnssd linux-image-amd64 firmware-bnx2 -auto eth0 -iface eth0 inet6 auto -EOF cp ${dir}/boot/vmlinuz-* ${kernel} @@ -43,6 +39,33 @@ for key in balazs dominique jinguk nico; do curl -s ${keyurl}/${key}.pub >> ${dir}/root/.ssh/authorized_keys done +################################################################################ +# networking + +# always lo +cat > ${dir}/etc/network/interfaces << EOF +auto lo +iface lo inet loopback + +EOF + +# find the boot interfaces at boot +cat > ${dir}/etc/rc.local < /etc/network/interfaces.d/bootinterface << eof +auto \$dev +iface \$dev inet6 auto +eof + +ifup "\${dev}" + +exit 0 + + +EOF + # 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