Network boot hint - possible changes to rc.sysinit

Michael J. Hammel cross-lfs at graphics-muse.org
Fri Jan 20 11:16:34 PST 2006


The rc.sysinit on the network boot hints page (for MIPS) didn't work for
me.  It needed some slight modifications.  This is the updated version
that seemed to work for me - I don't know if these changes are generally
appropriate or not, however.  What I changed:

1. Moved root remount right after mounting proc, sys.
2. Moved udevstart before mounting tmpfs
3. removed all the symlinks - these seem to get created by udev (I
think)
4. Removed setting hwclock (probably just needed for my situation)

Also, runlevel 2 is the default run level but the rc.2 init script (from
the hints page) doesn't do anything so it looks like the boot hangs.
Maybe there should be a default program started, like /bin/bash?  I put
that in and got a prompt, so at least it looks like the boot completed.

The updated script:
--------------------

export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin

echo -n "Mounting kernel-based file systems:"
echo -n " proc"
mount -n /proc
echo -n " sys"
mount -n /sys
echo ""

echo "Remounting Root File System"
mount -n -o remount,rw /

echo "Starting udev"
udevstart
mount -n -t tmpfs tmpfs /dev -o mode=755

# echo "Populating /dev"
# ln -s /proc/self/fd /dev/fd
# ln -s /proc/self/fd/0 /dev/stdin
# ln -s /proc/self/fd/1 /dev/stdout
# ln -s /proc/self/fd/2 /dev/stderr
# ln -s /proc/kcore /dev/core
# mkdir /dev/pts
# mkdir /dev/shm

echo "Creating mtab"
> /etc/mtab
mount -f /
mount -f /proc
mount -f /sys
mount -a -O no_netdev

# echo "Setting System Clock"
# hwclock --hctosys --utc

-- 
Michael J. Hammel <cross-lfs at graphics-muse.org>




More information about the cross-lfs mailing list