Floppy problem (& multiple boots)

Floyd Davidson floyd at ims.alaska.edu
Tue Mar 5 23:25:10 AEST 1991


In article <1991Mar5.023004.2855 at ceilidh.beartrack.com> dnichols at ceilidh.beartrack.com (DoN Nichols) writes:
>In article <1991Mar4.130902.24392 at ims.alaska.edu> floyd at ims.alaska.edu (Floyd Davidson) writes:
>>zaft at suned1.nswses.navy.mil (Gordon C Zaft) writes:
>>[...]
>>>	As if that wasn't bad enough, at the same time (I THINK) as I
>>>changed the floppy drive, the machine starting to do the double-boot
>>>thing on powerup; it would boot, get to "checking stored files", then
>>>reboot and be fine.  If I rebooted once the machine had been up,
>>>it was fine.  Is this a power supply problem or is it related to the
>>>floppy thing?
>>>
>>
>>Maybe neither.  Once you have the machine up try running "/etc/fsck -D"
>
>	[...]
>
>>/dev/fp002 will cause a reboot if anything is "fixed".
>>
>>That is where your reboot is coming from, most likely.  It seems
>>that something is getting fixed everytime, but you can't see what
>>it is because of the way the script is arranged.
>
>	Are you using /etc/shutdown, or the shutdown entry from the
>'install' login?  If not, or if you are not waiting for it to complete, you
>are PRODUCING problems for it to fix.  

He probably was running shutdown.  There are at least a couple wierd
things shutdown doesn't take care of that cause fsck to reboot.  I've
seen /etc/utmp come up with the wrong number of links and some core
files cause fsck a problem (I'm not sure the core files cause a
reboot though, they may just show up as DUPS).

>Just shuting down a unix computer is
>about the worst thing you can do for file system sanity.  (Except in some
>strange beasties, such as the Textronix 6130, and maybe its brethren, which
>have what is called a 'soft power switch'.)  When you turn it off, the led in
>it changes from steady to flashing, and the system starts a shutdown
>sequence.  It runs fsck before the shutdown completes, and sets a file as a
>flag that the fsck has been done.  Once this is all complete, it then pulls
>the rug out from under itself, and the led on the switch finally goes out.
>Boot time is reduced, since it already has a certified filesystem.  (Of

Is it fsck that is setting the flag, or umount?  Normally Unix has a
flag in the volume superblock that is set when a file is unmounted and
cleared when it is mounted.  Fsstat is run to check the status of,
among other things, that flag.  Depending on the status of the file
system, fsck is run if it appears that a normal unmount did not happen,
or not run if the flag is set.

Of course the root file system doesn't get unmounted, so fsck is always
run on it (a good idea anyway).

And on a UnixPc, which was designed to only have a root file system,
there is no flag, no fsstat, and fsck is always executed.

I'd guess most everyone with more than one hard disk (and multiple
file systems) has come up with a way to do the same thing by using
a file as a flag.  Lenny posted scripts to do this a long time back,
and I think they are on osu-cis.  I did mine a little different, but
the result is the same.  If a normal shutdown was done then only the
root file system is checked, but if it crashed fsck is run on every-
thing.

(I've learned via email that the floppy drive problem in the
original article did in fact have a "dust on the led" problem,
and does work now.  But his Teac 55BR drive still doesn't.)

Floyd
-- 
Floyd L. Davidson  |  floyd at ims.alaska.edu   |  Alascom, Inc. pays me
Salcha, AK 99714   |    Univ. of Alaska      |  but not for opinions.



More information about the Comp.sys.3b1 mailing list