SUMMARY Re: fstab - no /usr

From: INLS System Manager (sysman@poincare.ucsd.edu)
Date: Thu Apr 08 1993 - 14:24:39 CDT


This is a few weeks old and I apologize, but better late than never.

First off I'd like to thank the mixed bag of blessings that come with
this list. It is unfortunate that there seem to be so many people
who don't use it appropriately. I would like to suggest that two
lists be maintained, one for questions and one for summaries. But
I think that has already been suggested. Another suggestion is for
all the people who have entered summaries; thanks but PLEASE include
your original question.

That said my entire original question will be found later in this article
for those that need it. A summary of my question is simply:

I got into a situation where I could not boot completely because my fstab
was corrupted. Actually, it was gone. I thought I couldn't mount anything
because when I tried to run the mount program I would get an error message
telling me it couldn't be found because the partition it lived on wasn't
mounted. I couldn't figure out how to mount a partition without the mount
command.

Well, there were many responses and they broke down into two philosophies:
Boot from either tape or cdrom and perform repairs.
OR
Boot in single user mode and use /sbin/mount to mount / and /usr.

Although the first solution certainly would have worked I went with the
second one because I felt I could learn more that way. Apparently some
commands were put in /sbin just for this kind of situation and they can
be used without /usr being mounted. Also, our one cdrom player gets moved
from machine to machine and sometimes takes longer to find it than I have
time.

I mounted / and /usr which allowed me to edit fstab and fix it up and
then rebooted. That didn't seem to do the trick and upon rebooting
and using /sbin/mount again I noticed my fstab was still corrupted (gone).
Through a brief stint of trial and error I discovered that after correcting
fstab but before rebooting I needed to run mount -a. Somehow that fixed
/etc/fstab in place so when I rebooted it was as I wanted it to be. Don't
know why it was necessary to run mount after making changes in the fstab
but it worked and made me happy.

I'd like to thank all the people who responded. We have quite a group of
helpful people in Europe and considering the time zone differences I could
have gone home, gotten 4 hours sleep, then come back, read their replies and
fixed the problem before my boss ever came into work. As it happened I was
reading your helpful messages when my boss walked in and started yelling.
I said "Hey, the solutions are here, I'll fix it" and then, using your
ideas, I fixed it. Now, you may or may not be thankful for this but those
of you that responded can be credited with (or blamed for) saving my life.
For that I thank the following with all my heart:
      Andrew Watson <ajw@ansa.co.uk>
      libby@helios.aea.orgn.uk (Elizabeth Thick x2688)
      "Robert D. Worsham" <worsham@sol.aer.com>
      Svante Lindahl <sl@os.se>
      mp@allegra.att.com (Mark Plotnick)
      kuhn@math.harvard.edu (Robert M. Kuhn)
      claude@genethon.genethon.fr (Claude Scarpelli)
      weingart@inf.ethz.ch
      Chip Christian <chip@allegra.att.com>
      fd@fm.bs.dlr.de (Frank Dzaak)
      Stephen.G.Scott@att.com
      djm@blue.millipore.com (Drew Montag)
      John Hasley<hasley@andy.bgsu.edu>
      marv@iti.gov.sg (Marvin Tay Eng Sin)
      ems@ccrl.nj.nec.com (Ed Strong)
      erzmann@irb.uni-hannover.de (Andreas Erzmann)
      tkevans@eplrx7.es.duPont.com (Tim Evans)
      bcook@Kodak.COM (William A. Cook)
      david@srv.PacBell.COM (David St. Pierre)
      manish@prentice.com (Manish Bhatia)
      Mr T Crummey (DIJ) <tom@sees.bangor.ac.uk>
      jiml@uts.amdahl.com (James Latimer)
      zshouben@PCS.CNU.EDU (Zhou Shouben)
      danny@ews7.dseg.ti.com
      trinkle@cs.purdue.edu (Daniel Trinkle)
      hydra!hercules!manish@prenhall.com (Manish Bhatia)
      Adam BJ Quantrill <adam@kbss.bt.co.uk>
      cdp@hertz.njit.edu (Chris Peckham)
      klarsen@hawkeye (Kristin L. Larsen)
      "Donald A. MacLeod" <dmacleod@mailbox.syr.edu>
      lhume@macadam.mpce.mq.edu.au (Leigh Hume)
      David_Boyd@imd.sterling.com (David Boyd)
      melissa@spanky.Jpl.Nasa.Gov (Melissa Probst)
      babb@k2.sanders.lockheed.com (Scott Babb)
      peter@key.amdahl.com (Peter Sivo)
      mdl@cypress.com (J. Matt Landrum)
      don@doug.med.utah.edu (Don Baune 581-6088 MIRL)
      halvard@trd.sdata.no (Halvard Halvorsen)
      jkays@msc.edu
      louis@andataco.com
      mohr@viper.msfc.nasa.gov (Sean Mohr BCSS)
      wargopl@sun.soe.clarkson.edu (Peter L. Wargo)
      Robert L Krawitz <rlk@Think.COM>
      etnibsd!vsh@uunet.UU.NET
      Mike Raffety <miker@il.us.swissbank.com>
      pln@egret1.Stanford.EDU (Patrick L. Nolan)
      blu@jericho.mc.com (Brian Utterback)
      david@capmkt.com
      "Susan Thielen" <thielen@irus.rri.uwo.ca>
      kbibb@qualcomm.com (Ken Bibb)
      Rahul Dhesi <dhesi@rahul.net>
      John Oleynick <juo@klinzhai.rutgers.edu>
      Rich Schultz <rich@ccrwest.org>
      dennett@Kodak.COM (Charles R. Dennett)
      lem@usb.ve (LDC - Luis E. Mun~oz)
      "David T. Hightower" <hightowr@cadre.af.mil>
      johnb@edge.cis.mcmaster.ca (John Benjamins)
      John R. Kilheffer <amp19263@garfield.amp.com>
      jeff@millie.loc.gov (Jeff Mallory)
      ups!upstage!glenn@fourx.Aus.Sun.COM (Glenn Satchell)

----------------------------------
Original Question in its entirity.
----------------------------------
>
>Well, sometimes when its late and you're tired you try to fix things and
>they just keep getting worse. If you happen to read this message after
>12 noon on Friday, March 19 please do not bother answering because by
>then I am either dead or saved already.
>
>The standard stuff: SunOS 4.1.2 on Sparc 2
>
>I wanted to add a SCSI disk (old, moved from another machine) so I shut down
>my workstation and plugged it in to another SCSI disk and then rebooted.
>Came up o.k. but of course not mounted. Used the mount command:
> mount /dev/sd2a /usr3
>and everything looked o.k. Using df showed the disk was mounted on /usr3
>and a quick ls on /usr3 showed me the directory I expected to see. So then
>I added the line to my fstab and rebooted.
> /dev/sd2a /usr3 4.2 rw 1 4
>
>Well, my thinking is it mounted just fine when I did it manualy so shouldn't
>be a problem mounting automatically, right? WRONG! Booting failed with an
>error I didn't write down so don't ask. It said run fsck so I did but fsck
>failed and again I don't know the error [but we aren't to the good stuff yet
>anyway]. So I figured, hey, no big deal, I'll just shutdown, unplug the disk
>and reboot without it. But NOOOO! Couldn't get past bootup checks because the
>disk wasn't there. Now at this point I'm a little pissed because I know its
>not there and it shouldn`t stop me from booting because it isn't needed.
>
>Still, there is a way around everything. Once again I rebooted, this time
>single user mode so I could get rid of the line that trys to mount /dev/sd2a in
>my fstab. Being the clever (note sarcasm here) person that I am I just moved
>fstab to fstab.t and then did a 'head -4 fstab.t > fstab' followed by
>'tail -2 fstab.t >> fstab' (note that the line I wanted to get rid of was
>the 5th line of a 7 line file). Now I can reboot with my new fstab which
>doesn't try to mount sd2a and I am back where I was to begin with, right?
>
>WRONG AGAIN! I don't know if I made a typo while doing the head and tail
>commands or what, working when tired and angry isn't a good idea, but now
>I get the messages:
> mount: /usr not found in /etc/fstab
> checking filesytems
> fsck: No such file or directory
> Unknown error in reboot fsck
>
> WARNING: file systems NOT remounted read-write
>and I can't get any commands such as cat, ls, df, or even mount because
>the paths don't exist, I can't use the mount command to mount things because
>the path it is on isn't mounted (kinda circular, huh). I suspect all I need
>to do is get a good fstab in /etc but there is no way I know of to do that
>without mounting / and of course I don't seem to be able to mount /. And
>that is true even if I try to come up in single user mode. (Actually, maybe
>/ is mounted, I can't tell for sure, the message above only refers to /usr.)
>
>HELP - How do I get this thing to boot far enough for me to do something such
>as create a valid entry in the fstab for / and /usr? Are there ANY commands
>available in single user mode that don't need anything mounted? I guess I
>should say, any USEFUL commands. And how can I mount the partition with the
>mount command on it if I can't use the mount command?
>
>I'm going home and going to bed. Maybe tomorrow my car will start in the
>morning (it didn't this morning) and I'll come in and find an answer to this
>email and the world will be spinning in the right direction again.
>
>Thanks in advance

Thomas Earl Middleton
INLS Systems Manager
sysman@poincare.ucsd.edu



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:42 CDT