Hello,

Ok, looks like I have an answer after some playing with /linuxrc.

After turning on VERBOSE to see what is happening, this is where in the
script appears to fail:

# Query /proc/cmdline line for a 'boot' option.
# This will solve the chicken and egg problem of specing boot devices
# not in root.mount. Falls back to root.mount (and /proc/filesystems)
# if boot= entry fails.  IE  boot=/dev/device[,filesystem]

DEVICE="`sed 's/.*boot=\/dev\//\1/; s/ .*//1' /proc/cmdline`"
FSTYPE="`echo $DEVICE | sed 's/.*://'`"
DEVICE="`echo $DEVICE | sed 's/:.*//'`"
DEVICE="$DEVICE `cat /var/lib/lrpkg/root.mount`"
FSTYPE="$FSTYPE `cat /proc/filesystems | sed '/^nodev/d' | \
 sed 's/^[  ]*//'`"

# Works like mount -t auto and trys against the listed
# filesystems.

The reason is because it gets fd0 as DEVICE.
I can only assume it is because of the delay in the scsi - usb storage
initialisation, and when it goes looking for /dev/sda1 it doesn't find it
and resorts back to the first entry in root.dev (I think that is what it's
called) which is fd0, or that /dev has not finished populating before it is
used.

If I change the script as below it works fine:

# Add delay to allow scsi / usb storage system to initialise
echo "Sleeping for 2 seconds ......"
sleep 2

# Query /proc/cmdline line for a 'boot' option.
# This will solve the chicken and egg problem of specing boot devices
# not in root.mount. Falls back to root.mount (and /proc/filesystems)
# if boot= entry fails.  IE  boot=/dev/device[,filesystem]

DEVICE="`sed 's/.*boot=\/dev\//\1/; s/ .*//1' /proc/cmdline`"
FSTYPE="`echo $DEVICE | sed 's/.*://'`"
DEVICE="`echo $DEVICE | sed 's/:.*//'`"
DEVICE="$DEVICE `cat /var/lib/lrpkg/root.mount`"
FSTYPE="$FSTYPE `cat /proc/filesystems | sed '/^nodev/d' | \
 sed 's/^[  ]*//'`"

# Works like mount -t auto and trys against the listed
# filesystems.

The delay needs to be after /dev is populated but before /dev/sda1 is
attempted to be mounted, and 2 seconds appears to be heaps of time.
When it I had it working by placing the floppy in the drive, the package
backup listed initrd.lrp as backed up to fd0, with all other to sda1.

Other hints / tips / pointers welcome.
Mark.



-------------------------------------------------------
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