e2fsck on read-only root device and boot.env

e2fsck on read-only root device and boot.env

Post by Shih-Ping Ch » Mon, 20 Sep 1993 22:11:55



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?

Thanks
Shih-Ping Chan

 
 
 

e2fsck on read-only root device and boot.env

Post by Joe Geor » Tue, 21 Sep 1993 03:11:49



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

I was just going to post a message today asking how this can be avoided.

LILO will write the file /etc/boot.env to pass any command-line parameters
to Linux that LILO gets from the boot: prompt.  Since the root device at the
time of boot is readonly, then LILO can't write /etc/boot.env.  it's really
not any big deal at all unless you happen to read boot.env for any special
information.  I don't right now, but I would like to.  

Does anyone know a way to get this file written? As I understanf it, /etc/rc
is the place where one could(should?) read /etc/boot.env and act on it, but
the root device is r/o when /etc/rc starts.

Joe

--

Opinions are mine and you can't have them!
"Gravitation cannot be held responsible for people falling in love."
 -Albert Einstein

 
 
 

1. How to mount root read-only and please e2fsck?

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).

HELP!

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

-T
--
The ouzo of human kindness.

<URL:http://sunsite.unc.edu/boutell/index.html>

2. Load balancing on single network + adsl

3. e2fsck & Boot/Root Disk for RH 5.2 - pleas help

4. Suggest a distribution for 386SX/387 laptop?

5. Running e2fsck from the root/boot diskettes

6. Multiple use of SP2 Control Work Station

7. Read-only root filesystem during boot

8. FileNET experiences

9. Using read to read from and Env var

10. Boot + root or boot/root floppies: how??

11. Permissions on boot.env?

12. boot.env

13. Booting from an alternate root device