How to mount root read-only and please e2fsck?

How to mount root read-only and please e2fsck?

Post by Thomas Boute » Mon, 20 Feb 1995 02:33:20

Hi there.

I have a somewhat old Linux box, as these things go (I started out
with 0.99 pl10 in August '93 -- yes, I know yours is older).

Recently I upgraded to the modern e2fs utilities.

They're great, but every time I boot I'm asked whether I REALLY want
to check my root file system, since it's mounted read-write.

Well, I know I should be mounting it read-only first and then
read-write, but all the e2fs FAQ has to say about this is "you'll
have to use the bootutils."

The only "bootutils" package I could find contained nothing
but "mount", the same version with a totally unrelated manpage
and actual set of options that I see everywhere (and already had).

How the heck do I fix this? I even tried the "-y" option to get
past the question, but it didn't work, and I know it's not
the right way anyway.

I tried:

mount -u -r /dev/hdb1
fsck /dev/hdb1
mount -u -w /dev/hdb1

in my /etc/rc, but the -u option (documented in the manpage as being
useful to change the mount status of an already-mounted filesystem)
isn't mentioned in the usage message of mount, and sure enough
it doesn't work (I get an error message about invalid arguments).


Thanks, please email -- I will summarize any useful
responses to the newsgroup for the benefit of others.

The ouzo of human kindness.



1. e2fsck on read-only root device and boot.env

I am following several postings here on how to get a clean e2fsck mount
on the root device:
 1. mount /dev/hda1 read-only by rdev -R /zImage 1
 2. do e2fsck -a -v /dev/hda1 to verify the root device
 3. ...usually this is clean...and this should correct the root device
    if it wasn't shut down properly
 4. remount the root device read-write and continue with /etc/rc

However during this sequence I get the error message
Can't open /etc/boot.env

It obviously isn't serious as the boot sequence continues happily.
Can anyone explain what this means?

Shih-Ping Chan

2. How to increase FD_SETSIZE in FreeBSD 3.4

3. Argh! Tried to e2fsck mounted /root!

4. nvidia riva tnt2 x server crash

5. Root mounted as read-only!

6. modem PnP in RH 4.2

7. VFS: mounted root read-only

8. Reformatting hard drives

9. Root mounts read-only

10. trouble, root mounted read-only

11. Slackware root floppy mounted read-only.

12. Root file system mounted read-only

13. hekp - root mounted as read-only doesn't allow logins...