Mark

At 18:14 16.03.2004 +1100, Mark Holmes wrote:
>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.

it concatenates the boot= entry with what is in /var/lib/lrpkg/root.mount
and then iterates through the list trying to mount that device, probably being unable 
to mount /dev/sda1 and skipping to the next available device.
If there is a floppy it will mount it and be happy.

rc=1
for d in ${DEVICE}; do

        for t in ${FSTYPE}; do

                if qt mount -r -t $t /dev/$d $MNT ; then
                        echo
                        [ "$VERBOSE" ] && echo "Mounted /dev/$d as $t"
                        qt ln -sf /dev/$d /dev/boot
                        echo $t>/var/lib/lrpkg/boot.fstype
                        echo "$INITRD=-t $t /dev/$d">/var/lib/lrpkg/backdisk

<XXX>
this is probably where the /dev/fd0 for initrd comes from
</XXX

                        echo "/dev/$d $t" >$PFX/pkgpath.disks
                        rc=0
                        break
                fi
                [ $rc -eq 0 ] && break
        done
        [ $rc -eq 0 ] && break
done

I would still recommend to try detecting the availability of the device instead of 
just delaying.

cheers
Erich

THINK 
P�ntenstrasse 39 
8143 Stallikon 
mailto:[EMAIL PROTECTED] 
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16




-------------------------------------------------------
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_id70&alloc_id638&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