[nSLUG] e2fsck and "System Maintainance Mode" (Help?)

Mike Spencer mspencer at tallships.ca
Fri Nov 10 16:41:48 AST 2017



Question first, additional background below:

When fsck offers to go into "System Maintance Mode" at boot time after
finding a HD problem on hda4, mount reports that hda4 is

              /dev/hda4 on / type ext2 (rw)

fsck also suggests trying "e2fsck -v -y /dev/hda4".

But man fsck says it's dangerous to use fsck on a mounted file system.

Is "System Maintainance Mode" special in some way?

The last time I hit this, IIRC, I typed the command suggested and all
was well *except* that the contents of my home directory had vanished!
(Yes, I had a backup and do now but I'd like to do the right thing if
possible.)

Unsure what to do. Suggestions?

------------------------------
More detailed description:

While unattended, system rebooted for unknown reasons.  Configured not
to do that after a power outage and it was not connected to the net.

Running automatically at boot time, e2fsck reported:

      Duplicate or bad block in use!
      Multiply claimed blocks in inode 4452152: 524288

e2fsck suggested trying 

      e2fsck -v -y /dev/hda4    without -a or -p

and offered to go into "System Maintainance Mode" if given root
passwd.  Did that.

Okay: Now logged in as root, mount says:

       /dev/hda4 on / type ext2 (rw)
       /dev/hda3 on /mnt/hda3 type ext2 (rw,nosuid,nodev,user=mds)

but "umount /mnt/hda3" responds that "/dev/hda3: not mounted" (hda3 is
data storage, was mounted before the unexplained reboot but is
"noauto" in /etc/fstab.)

So:  + mount & umount give contradictory info and

     + e2fsck has suggested doing what the manpage says is dangerous.

Previous experience was non-optimal.  Is it possible/safe to run fsck
-y with / mounted or do I have to boot from a rescue/install disk to
do it safely?  If I try to umount /, access to fsck, libs etc. go
away -- that doesn't seem right.

I seem to be missing something here. 

Hardware note:

      This is a SATA HD in an IBM P4 desktop that came with an IDE HD.
      The SATA HD is connected to a plug on the motherboard provided
      to make use of SATA drives possible.  This has been operational
      for a couple of years.

---


More information about the nSLUG mailing list