3 NC_SLUGIP="192.168.1.77"
4 NC_TARGIP="192.168.1.100"
6 if ( [ -f "/.nc" ] ) ; then
7 if ( [ -z "$RERUN" ] ) ; then
8 /bin/echo " DEBUG: Starting network console from flash ..."
10 /bin/echo "Insmod ixp400"
12 /bin/echo "Insmod ixp425"
13 /sbin/insmod ixp425_eth.o
14 /sbin/ifconfig ixp0 $NC_SLUGIP
15 /bin/echo "Insmod netconsole"
16 /sbin/insmod netconsole.o target_ipaddr=$NC_TARGIP
17 /bin/echo "Redirecting output via nc and restarting /linuxrc ..."
19 exec /linuxrc 2>&1 | tee /dev/console | /usr/bin/nc $NC_TARGIP 6666
23 # **** DO NOT EVEN THINK OF EDITING OR REMOVING THIS FILE ****
24 # **** UNLESS YOU REALLY KNOW *EXACTLY* WHAT YOU ARE DOING. ****
27 # Perform prepatory tasks, and determine whether an alternate rootfs is viable.
29 /bin/mount -t proc proc /proc
31 /bin/echo "1" > /proc/sys/kernel/panic
33 if ( ! [ -f /.nodisk ] ) ; then
35 /bin/echo "Sleeping while waiting for disk..."
37 while [ $cnt -gt 0 ] ; do
38 /bin/echo -ne "\r$cnt "
40 [ -e /.sda1root -a -f /proc/hdd_sda ] && cnt=0
41 [ -e /.sdb1root -a -f /proc/hdd_sdb ] && cnt=0
46 if [ -e /.fastdisk ] ; then
54 for prefroot in sda1 sdb1 ; do
55 if [ -z "$mounted" -a -e /.${prefroot}root ] ; then
56 if /bin/mount -rt ext3 /dev/$prefroot /mnt ; then
57 if [ -e /mnt/.${prefroot}root -a -x /mnt/bin/init ] ; then
58 /bin/echo "Root filesystem will be mounted from /dev/$prefroot ..."
62 /bin/echo "Can't find valid rootfs on /dev/$prefroot ..."
68 if [ -z "$mounted" ] ; then
69 /bin/echo "Can't find valid rootfs, using ramdisk ..."
75 # Pivot to the desired rootfs and run the initial executable.
77 if [ -n "$mounted" ] ; then
81 /bin/echo "Pivoting to external rootfs ..."
82 /sbin/pivot_root . initrd
84 if ( [ -z "$RERUN" ] ) ; then
85 exec /usr/sbin/chroot . /bin/init < /dev/console 1> /dev/console 2> /dev/console
87 exec /usr/sbin/chroot . /bin/init
95 /bin/echo "Can't pivot to external rootfs, using ramdisk ..."
98 /bin/echo "Forced boot to internal flash ..."
99 /bin/echo "(One-time only, clearing forced boot flag file.)"
105 # Last-resort fall-back - this should never be reached.