tImplement proper initscript for initramfs. - pi3-aoe - ATA over Ethernet setup for Raspberry Pi 3 HTML git clone https://git.parazyd.org/pi3-aoe DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 4e742c2dc986d46a930944cbe626f57a2a36de42 DIR parent 6154991b63d92210af8978045ceafcf91e14d827 HTML Author: parazyd <parazyd@dyne.org> Date: Thu, 28 Jan 2021 14:44:08 +0100 Implement proper initscript for initramfs. Diffstat: M init | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) --- DIR diff --git a/init b/init t@@ -6,4 +6,17 @@ mount -t devtmpfs none /dev mount -t proc none /proc mount -t sysfs none /sys -exec /bin/sh +ifconfig eth0 up +sleep 5 +aoe-discover +sleep 1 + +aoedevpath=$(egrep -o 'aoedevpath=[^ ]*' /proc/cmdline | sed 's/aoedevpath=//') + +mkdir -p /mnt +mount "$aoedevpath" /mnt +mkdir -p /mnt/dev /mnt/proc /mnt/sys + +mount --move /dev /mnt/dev +umount /proc /sys +exec switch_root /mnt /sbin/init