lkml.org 
[lkml]   [2001]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfsck root fs: fsck, devfs, /proc/mounts miscooperate.
Hello all,

I use devfs to manage my /dev.
I symlinked /etc/mtab to /proc/mounts.
My root fs is on /dev/sdb1 and stays RO.
There is not /etc/fstab entry for it
(I hate making new Linux partitions by copying my old system, boot
them and discover I forgot to change root entry in /etc/fstab - kernel
already knows where root is, so why do I need to tell that?).

I have trouble with fsck'ing my root fs from init script.
As you can see below:
"fsck /" can't figure out from where my root is mounted.
"fsck /dev/sdb1" works fine, but that means init script must be
modified when root mount point is changed.
"fsck /dev/scsi/host0/bus0/target1/lun0/part1" is suitable for init
script (I could get dev name from /proc/mounts)
but complaining about mounted fs (why? my root fs is RO).

So, how can I fsck my root?

# cat /etc/mtab
/dev/scsi/host0/bus0/target1/lun0/part1 / ext2 ro 0 0
...

# fsck /
Parallelizing fsck version 1.15 (18-Jul-1999)
e2fsck 1.15, 18-Jul-1999 for EXT2 FS 0.5b, 95/08/09
/sbin/e2fsck: Is a directory while trying to open /

The superblock could not be read or does not describe a correct ext2
filesystem...

# fsck /dev/sdb1
Parallelizing fsck version 1.15 (18-Jul-1999)
e2fsck 1.15, 18-Jul-1999 for EXT2 FS 0.5b, 95/08/09
/dev/sdb1: clean, 6416/122400 files, 86059/488432 blocks

# fsck /dev/scsi/host0/bus0/target1/lun0/part1
Parallelizing fsck version 1.15 (18-Jul-1999)
e2fsck 1.15, 18-Jul-1999 for EXT2 FS 0.5b, 95/08/09
/dev/scsi/host0/bus0/target1/lun0/part1 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage...
--
Best regards,
VDA
mailto:VDA@port.imtp.ilyichevsk.odessa.ua
http://port.imtp.ilyichevsk.odessa.ua/vda/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [W:0.194 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site