Date: Sun, 23 May 1999 01:28:11 -0500 (CDT) From: Chris Dillon <cdillon@wolves.k12.mo.us> To: "Craig A. Struble" <cstruble@vt.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Need help recovering from major mistake Message-ID: <Pine.BSF.4.10.9905230105310.9982-100000@mail.wolves.k12.mo.us> In-Reply-To: <Pine.OSF.4.02.9905230127520.12492-100000@csgrad.cs.vt.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[trimmed off -hackers, this doesn't belong there] On Sun, 23 May 1999, Craig A. Struble wrote: > Hi, I just made a major mistake with my FreeBSD drive that I hope I can > recover from. Not thinking too far ahead, I tried to install OS-BS on a > dangerously dedicated FreeBSD drive. This had the unfortunate side effect > of wiping out both the boot code and disklabel from the drive. I made just such a blunderheaded mistake not an hour ago, though not with OSBS, but /boot/boot0. :-) Luckily I'm back up now (or you wouldn't be reading this). > I'd like to > restore them, but I don't have a printout of what the disklabel used to > be. Therein lies the challenge. I had a printout of my disklabels for all my disks, but couldn't find it (figures, eh?). After telling disklabel(8) to look in several different places (it didn't show up on da0s1 like normal), I found it. I only overwrote the first 512 bytes of the disk, though.. is that all OSBS overwrote?) > Using my FreeBSD CD-ROMs, I've been able to go into fixit mode and mount > the root filesystem of the drive, but I'm not sure where to go from there. > How can I figure out what my old disklabel was? Is there some way I can > search the raw disk for the locations of the file systems? Since the disklabel appeared to still be there after I brain-o'd the disk, I just went into fixit and wrote /boot/boot1 back to the disk thinking that would be all it took to fix it. Well, that sorta worked, but something was still amiss because my device ordering seemed jumbled up a bit (something got confused). I noticed that FDISK in sysinstall thought the disk was still "unused". Knowing that if I re-created that "dangerously dedicated" partition with fdisk it would more than likely wipe out my disklabel, I went back into fixit and copied down the disklabel by hand. After I re-partitioned the disk, I went into fixit again, and re-wrote the disklabel by hand. After doing so, the system booted normally. If your disklabel doesn't appear to be in its normal place as far as device nodes are concerned, try searching though all of them (may have to MAKEDEV the right ones) for the label. If you just can't find it, I have no idea where to go from there. -- Chris Dillon - cdillon@wolves.k12.mo.us - cdillon@inter-linc.net FreeBSD: The fastest and most stable server OS on the planet. For Intel x86 and Alpha architectures (SPARC under development). ( http://www.freebsd.org ) "One should admire Windows users. It takes a great deal of courage to trust Windows with your data." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9905230105310.9982-100000>