Hello,

I'm using a computer with no keyboard / monitor and booting off a compact
flash card using an IDE - Compact Flash adaptor.
The setup runs quite nice.

I recently set about setting up a boot system using a Nexdisk USB storage
device. (as a recovery option because the firewall has no floppy either)
I've placed syslinux (tried win98 command line and loadin as well) and the
packages on the nexdisk and placed all the required modules into
/boo/lib/modules and the entries in /boot/etc. The Nexdisk is configued as
sda1, via the appropriate modules.

I can boot off a floppy with the same modules and the Nexdisk on another
system and can mount the Nexdisk as sda1. (modules are not the problem)

However, if I boot the Nexdisk on its own, the system tries to access the
floppy drive (no disk) as it mounts the temp file system and kernel panics.

If I place a floppy in the drive it mounts the temp files system and
continues to load off the nexdisk once sd_mod.o completes initialsiation and
all packages are loaded off sda1 (the Nexdisk).

The solution appears to be that a delay is needed in /linuxrc between the
end of loading of the boot modules and the mounting of the temp file system,
because the temp file system is attempted to be mounted on /dev/sda1, which
doesn't exist yet because sd_mod.o hasn't completed initialising sda1 via
the usb-storage.o

How do I deal with boot modules not completely loaded before the temp
filesystem is mounted?

/linuxrc portion below:

#
# Load any modules required to boot
#
BOOTDIR=/boot
if [ -r $BOOTDIR/etc/modules ] ; then
 # Loop over every line in modules
 [ "$VERBOSE" ] && echo "Loading modules..."

 # make sure there is a LF at the end
 ($BB cat $BOOTDIR/etc/modules; echo) |
 while read module args; do
  case "$module" in
   \#*|"") continue;;
  esac
  /sbin/insmod $BOOTDIR/lib/modules/"$module".o $args
 done
fi

############################################
##### Need some kind of delay here ###############
############################################

# Query /proc/cmdline line for a 'root' option.
# Skip remaining LRP stuff if we're not booting into a ramdisk

DEVICE="`sed 's/.*root=\/dev\//\1/; s/ .*//1' /proc/cmdline`"
case $DEVICE in
 ram*)
  ;;
 *)
  qt $BB umount /proc
  [ ! $VERBOSE ] && $BB rm /linuxrc.err
  exit 0
  ;;
esac

# Added by J. Nilo: Create a dynamic TMPFS

if [ "`sed '/syst_size/d' /proc/cmdline`" = "" ]; then
 SYSTSIZE="`sed 's/.*syst_size=/\1/; s/ .*//1' /proc/cmdline`"
fi
# Initialize tmpfs_size with default
qt $BB mkdir /tmpfs
echo "Mounting a $SYSTSIZE TMPFS filesystem..."
qt $BB mount -t tmpfs /dev/root /tmpfs -o size=$SYSTSIZE
qt $BB umount /proc
for ii in /*
do
 case $ii in
  /tmpfs)
  ;;
 *)
  qt $BB cp -dpR $ii /tmpfs
 esac
done





-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to