pi3-aoe

ATA over Ethernet setup for Raspberry Pi 3
git clone https://git.parazyd.org/pi3-aoe
Log | Files | Refs | README | LICENSE

init (413B)


      1 #!/bin/busybox sh
      2 
      3 /bin/busybox --install -s /bin
      4 
      5 mount -t devtmpfs none /dev
      6 mount -t proc none /proc
      7 mount -t sysfs none /sys
      8 
      9 ifconfig eth0 up
     10 sleep 5
     11 aoe-discover
     12 sleep 1
     13 
     14 aoedevpath=$(egrep -o 'aoedevpath=[^ ]*' /proc/cmdline | sed 's/aoedevpath=//')
     15 
     16 mkdir -p /mnt
     17 mount "$aoedevpath" /mnt
     18 mkdir -p /mnt/dev /mnt/proc /mnt/sys
     19 
     20 mount --move /dev /mnt/dev
     21 umount /proc /sys
     22 exec switch_root /mnt /sbin/init