3 # **** DO NOT EVEN THINK OF EDITING OR REMOVING THIS FILE ****
4 # **** UNLESS YOU REALLY KNOW *EXACTLY* WHAT YOU ARE DOING. ****
7 # Perform prepatory tasks, and determine whether an alternate rootfs is viable.
9 /bin/mount -t proc proc /proc
11 echo "1" > /proc/sys/kernel/panic
13 /bin/echo "Sleeping while waiting for disk..."
15 while [ $cnt -gt 0 ] ; do
18 [ -f /proc/hdd_sdb ] && cnt=0
19 [ -f /proc/hdd_sda ] && cnt=0
28 for prefroot in sdb1 sda1 ; do
29 if [ -z "$mounted" ] ; then
30 if /bin/mount -rt ext3 /dev/$prefroot /mnt ; then
31 if [ -x /mnt/bin/init ] ; then
32 /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
36 /bin/echo "Can't find valid rootfs on /dev/$prefroot ..."
42 if [ -z "$mounted" ] ; then
43 /bin/echo "Can't find valid rootfs, using ramdisk ..."
49 # Pivot to the desired rootfs and run the initial executable.
51 if [ -n "$mounted" ] ; then
55 /bin/echo "Pivoting to external rootfs ..."
56 /sbin/pivot_root . initrd
58 exec /usr/sbin/chroot . /bin/init < /dev/console 1> /dev/console 2> /dev/console
66 /bin/echo "Can't pivot to external rootfs, using ramdisk ..."
69 # Last-resort fall-back - this should never be reached.