On Sunday 07 November 2004 22:23, Jerome Lyles wrote:
So...what's happening here? I did some more digging and found the source of the problem behavior in /etc/init.d/boot.rootfsck.
This is the relevant code:
# do fsck and start sulogin, if it fails. # FSCK_RETURN=0 # on first startup of a system with a lvm root device lvm /dev entries # may not exist at this time, so skip fsck in this case ROOTFS_BLKDEV=`fsck -T -N / 2>/dev/null` ROOTFS_BLKDEV=${ROOTFS_BLKDEV%% } ROOTFS_BLKDEV=${ROOTFS_BLKDEV##* } DES_OK=0 if test -n "$ROOTFS_BLKDEV" -a "$ROOTFS_BLKDEV" != "/" -a -b "$ROOTFS_BLKDEV" ; then DES_OK=1 fi
if test ! -f /fastboot -a -z "$fastboot" -a $DES_OK -eq 1 ; then FSCK_FORCE="" test -f /forcefsck && FSCK_FORCE="-f"
And this is the heart of the problem:
if test -n "$ROOTFS_BLKDEV" -a "$ROOTFS_BLKDEV" != "/" -a -b "$ROOTFS_BLKDEV"
As I understand it this is a three way comparison:
The -a option means "-n "$ROOTFS_BLKDEV" " equals "$ROOTFS_BLKDEV" and "/" equals "-a -b "$ROOTFS_BLKDEV""
And then the "-n "$ROOTFS_BLKDEV" -a "$ROOTFS_BLKDEV" != "/" -a -b "$ROOTFS_BLKDEV"" comparison makes three.
What is means is "if $ROOTFS_BLKDEV is non-empty, and if it isn't "/" and if it is a valid block device" If you run "fsck -T -N" in the rescue system, what is the output?