Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!husc6!rice!sun-spots-request From: roy%phri@uunet.uu.net (Roy Smith) Newsgroups: comp.sys.sun Subject: How to deal with trashed fstabs Keywords: SunOS Message-ID: <756@brazos.Rice.edu> Date: 6 Aug 89 00:36:11 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 32 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 93, message 6 of 16 During the process of replacing our XY-450 disk controller with a Ciprico Rimfire, I ran into a sticky detail. You have to change your fstab to indicate that your disks are now rf0, rf1, etc, instead of xy0, xy1, etc. Once you do this, there is no turning back, i.e. if you can't get the new controller to work and want to go back to the xy, you can't. Even if you save a copy of your old xy-based kernal and boot it, when it comes up, even single-user, it will read the rf-based fstab, all of which will refer to non-existant rf disks. Here's how I dealt with the problem. First off, even though the entry for / in fstab is wrong, root gets mounted anyway (I'm not quite sure if "mounting the root file system" has any meaning, suffice it to say it's there). Problem is, you don't even have a /bin, because that's on /pub.MC68020, which didn't get mounted. Fortunately, you do have a shell (that's about all you have). You can do something like: % echo '/dev/xy0a / 4.2 rw 0 0' > /etc/fstab % echo '/dev/xy0d /pub.MC68020 4.2 rw 0 0' >> /etc/fstab and reboot. The next step is to make your life a bit easier should anything like that ever happen again. I made a /minibin and put a "survival kit" in it. Ask yourself what programs you would most want if you were stranded on a desert island with only 150 kbytes of binaries. I picked cat, cp, dd, ed, ls, mv, ps, rm, and stty. It's cheap insurance. Someday it might give you enough to work with on a badly trashed system to avoid having to drag out the distribution tapes and doing a cold install. -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 {att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy@alanine.phri.nyu.edu "The connector is the network"