Return to BSD News archive
Xref: sserve comp.os.386bsd.questions:2227 comp.unix.bsd:11997 Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!usc!cs.utexas.edu!geraldo.cc.utexas.edu!sylvester.cc.utexas.edu!not-for-mail From: vax@sylvester.cc.utexas.edu (Vax) Newsgroups: comp.os.386bsd.questions,comp.unix.bsd Subject: PLEASE HELP - System down, partitioning destroyed (long) Date: 6 May 1993 04:22:49 -0500 Organization: The University of Texas - Austin Lines: 101 Message-ID: <1sald9$e3k@sylvester.cc.utexas.edu> NNTP-Posting-Host: sylvester.cc.utexas.edu Summary: disklabel and partition horror story! I'll start with the problem. I cannot get BSD to boot, and I'm not sure how to fix the "soft" partitions. I need more info on the soft partitions. Summary of Problem: First part of the SCSI disk was overwritten. The "hard" partition table was destroyed, and I believe the disklabel was also overwritten. Before you read the history, realize I have 2 goals in relating this to you. 1) So you can view the strangeness of some of the more "low-level" tools, so hopefully someone will fix them! Since they are not used as often as ls(1), they probably go un-fixed for a lot longer. 2) So you understand what I need to do. 3) So you don't EVER EVER have to do this. Okay, three goals. Chronological History (detailed): 1. I'm playing with mtools, trying to get it to copy some files over to the DOS partition on my SCSI hard disk. It doesn't work, and I remember SCSI disks have some bytes (16384 to be exact) in the beginning you need to skip. 2. Instead of putting the offset in the mtools' devices.c, I try to make a partition with an offset of 16384 (then when that didn't work, 16383, 32767, etc). I know, I know, offsets in the disklabel are not in bytes; I know that -now-. 3. I put the 16384 in the devices.c and recompile. Run the program, up until now it's been generating "Not a DOS disk" type errors. Now it works fine (!). 4. Reboot to go back to DOS. BLAMMO. "No ROM basic" error. sigh. 5. Delete partition table. Re-create partitions from memory; they look like: 000 - 149 cylinders (150MB) MS-DOS 150 - 638 386BSD I created the DOS partition with DOS fdisk, but created the 386BSD partition with Linux's fdisk, since MS-DOG couldn't do it. Some poking through the raw disk was necessary to determine what cylinder divided the DOS and BSD partitions. 6. At some point in here, my speaker makes a funny high pitched noise, and my computer locks up. My power supply's fan won't come on. Hmm. Maybe bad power caused the earlier glitch which overwrote my partition table? Replace power supply. Replace magic smoke. Aerate room to get rid of burning electronic component smell. 7. Replace master bootstrap. The "media type" and "boot flag" areas in the partition table (the main one, or the DOS's partitions' table?) are bad, fix them with Norton. 8. Poke around a bit with these "boot valid" bytes. Does 386bsd need it fixed? Hmmm... Don't really recall what I did here. 8.5 DOS now works fine. Back it up, after restoring a few binaries toward the beginning of the partition. 9. 386BSD BOOTS!!! But the kernel panics, since there's no disklabel. 10. Boot fixit floppy. Attempt to disklabel with the "-w" and "-R" options. No dice. Gives a silly "Disklabel not present" error. Duh! 11. Change partition ID of 386BSD partition to a DOS indicator. 12. Delete DOS partition. 13. Run "install" from the dist fs. (0.2) 14. Install says that I have 0 MB left! 15. Boot Linux rootdisk/bootdisk set again. Create a bsd partition in first hundred-fifty MB of space. ID it with "a5". 16. Run install. Finally! Overwrite "bsd" partition (the first 150MB). 17. Boot from hard disk. Doesn't work. Boot from fixit floppy. Edit disklabel some. No changes will hold! Wierd! 18. Do some more poking around, and boot from hard disk. Boots fine. 19. Run disklabel from hard disk. Attempt to change it to point to the second partition. Hmm. Now every command gives an "error 22" or something. Can't even sync. 20. Reboot from fixit floppy. Disklabel from here. Works fine now. I disklabel something like this: Partition a: 40 cylinders, starting at cyl 150. (my /) Partition b: 10 cylinders, starting at cyl 190. Partition c: cyls 150-638 Partition d: cyls 200-638 (my /usr) In actuality, I think the swap may occur after the D partition, but I can't be sure. Since I have 2048 sectors per cylinder, and 512bytes per sector, I put: Size Offset a: 81920 307200 b: 20480 389120 c: 102400 307200 # I know this isn't the whole partition, but it's temp. d: 897024 409600 21. Delete first 150 MB of "bsd" partition. Try and reboot. Won't. 22. Run fsck on /dev/as0a. First superblock has some kind of problem, search for a backup, and it finds the one at 32 alright. It complains about getting READ errors on certain sectors (some number in the 200,000's). Wierd. I though SCSI disks kept track of bad sectors. Don't they? And where did 230000 come from? Offset is 300,000. 23. fsck finds some errors in the root dir '.', and some /bin programs are moshed, and ".iscreen" or whatever is screwy, but there are few enough errors (aside from the 20 dup blocks) that I believe I got close to the right size and offset for partition a. NOTE: I didn't fix anything. 24. Run fsck on /dev/as0d. Many errors, with big numbers. Forget it. I must have picked the numbers wrong. Also, superblock here was corrupt, it found another at 32. Now, I am wondering, since the superblocks were always corrupt, maybe I don't put the -exact- offset in the offset field. Seems like my previous disklabel didn't have such "round" numbers. Do I need to add 32 to them or something? Now you see where I am. Anyone got any ideas? I really need help. It has been almost a month since my last backup, since I just got to the point where I needed two tapes to backup. And since I didn't trust myself to do a multi volume tar backup on my only two tapes, I put it off... sigh... My system has been dead for about 4 days. Thanks a Million in advance. Someone might want to keep this as a 386BSD admin horror story. -- Protect our endangered bandwidth - reply by email. NO BIG SIGS! VaX#n8 vax@ccwf.cc.utexas.edu - finger for more info if you even care.