len@rufus.math.nwu.edu (Len Evens) (02/28/89)
Recently, I had to repartition a disk and restore all the partitions including the root and usr partitions. I found that the Sun documentation was either wrong or confusing. For those of you who might need to do the same thing, here is a summary of where to look for help. My machine was running under OS 4.0 using an st tape controller and an sd disk. You more or less follow the instructions in the System Administrator's Manual except that there are many errors. These are mostly corrected in the December, 1988 Software Notes that Sun distributes. 1. Boot the Mini-Unix (not MUNIX) from the OS4.0 distribution tape. Complete instructions for doing this are in the Installation Manual for OS4.0. (The Dec., '88 article is incomplete on this issue.) You now have Mini-Unix on the sd0b partition. 2. Follow the instructions in the Dec, '88 article. The instructions in the System Administrator's Manual tell you the relevant programs are in /usr/etc but they are in fact in /etc. Also, some of the parameters for the commands are left out. Roughly speaking, you run newfs on the partition, fsck the new file system, mount it on a stub called /a, restore from your dump tape, rm a file called restoresymtable in the partition, umount the partition, and then fsck it again. It would be foolish to have made only one dump. I definitely had trouble restoring some of the partitions. 3. For the root partition, before doing the umount and fsck, you have to run installboot as described in the Dec.,'88 article. (The System Administrator's Manual instructions are wrong, but one could probably reconstruct what to do from the Manual page for installboot. You have to use a file specific to the disk which is in the relevant directory of the Mini-Unix.) VERY IMPORTANT! YOU HAVE TO SYNC SEVERAL TIMES BEFORE RUNNING INSTALLBOOT. Otherwise, your boot block may not be any good and when you try to boot you will get a checksum error and other wild messages. This is described nowhere in the Sun documentation. I tried it because of a remark in something posted to Sun Spots (approximately in volume 7, issue 123). 4. If you are restoring a server, say after repartitioning, you should also restore the partition for client swapping. That means that you should have dumped that partition --- so that the files which are used for the client swapping would have been dumped and then restored. Otherwise, you would have to remove the clients and add them back, and then try to restore their root directories --- which I had some trouble with. Of course, after repartitioning, you have to do a newfs on each partition --- including the client swap partition (usually /export/swap) --- except of course for the server swap partition, sd0b.