emergency_boot

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



From: Ramon Gandia <rfg@nook.net>
Date: Thu, 08 Apr 1999 19:44:07 -0800
Subject: Re: Boot emergency


Chad W. Skinner wrote:
> 
> Stupid newbie question, why do you do this below --> mount -n -o remount,ro
> /
> 
> It is to make sure all the information is written to the disk before you
> reboot?  If so why do you even have to remount the drive?  I notice when I
> shut down linux does the same thing itself and I guess it has always seemed
> odd to me, but then again I still have a great deal to learn.
> 
> Thanks,

Steve Borho was the first to suggest the method of booting
with the LILO: linux init=/bin/sh .

When I tried his method, I discovered that my edited file
was not saved to disk.  Next time I booted my changes were not
there.  I tried several ways, and here is what I came up with:

mount -n -o remount,rw /
pico /etc/inittab
sync
/sbin/reboot

The above works, and it writes the stuff, but the next boot
complains that /dev/hda3 was not shutdown clean.

mount -n -o remount,rw /
pico /etc/inittab
umount /
/sbin/reboot

This worked.

mount -n -o remount,rw /
pico /etc/inittab
mount -n -o remount,ro /
/sbin/reboot

This also worked.

The main idea is to make sure the edits are flushed out from
the buffer to the disk, and secondarily to make sure you do not
corrupt your filesystem.  While "sync" will flush the buffers,
it still leaves the system with filesystems mounted.  The
/sbin/reboot command is pretty harsh apparently it simply
just reboots.  Both umount and the mount -n -o remount,ro /
worked because when its umounted or mounted read-only, no
corruption can take place.

I had my own methods of getting back in there, but when Ben Sher
got into trouble, my methods were not exactly what I could
explain to him nor were they necessarily available to him.  That
is why I posted the "SOS" message here.  Several methods were
suggested -including the second VC which I knew about but which
I thought would not work in his case because at the time his
problem was not exactly clear.

Editing /etc/inittab is fraught with danger.  One thing I have
found out in RedHat is that often some of the lines are close to
80 characters long.  If you edit a line, quite often pico will
wrap the line for you; ie, it will break the line so a word or
two will now be on the NEXT line.  This breaks /etc/inittab
and in that case NONE of the virtual consoles will work.  Ben
had also edited some other lines in inittab and at the time I
thought word wrap was his problem.

Posting here to RH brought several different methods to the fore,
and all of these methods will have its time and place, so this is
one thread that I have saved in my archives.  Thanks for the tips,
Steve, Brian, Dale, John, and Ray.

===

Subject: Re: accessing floppy/cd-rom from rescue disk
From: SBTM <sallawa@entropy.uark.edu>
Date: Sun, 24 Oct 1999 20:01:52 -0500


Quoting Bret Hughes (bhughes@elevating.com):
> Bummer you might try toms boot disk /linux on a floppy at 
> 
> http://www.toms.net/rb/

wow, thanx. That worked just great, but my plan didn't work!

Since I can't figure out what to do, I will just ask another question.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu