Date: Tue, 24 Apr 2001 19:41:25 -0500 From: "Scot W. Hetzel" <hetzels@westbend.net> To: "Salvo Bartolotta" <bartequi@neomedia.it> Cc: <freebsd-questions@freebsd.org> Subject: Re: Restore Partition table Message-ID: <000801c0cd20$ba7744c0$11f66ad8@westbend.net> References: <988141611.3ae5d82b2f4ff@webmail.neomedia.it>
next in thread | previous in thread | raw e-mail | index | archive | help
From: "Salvo Bartolotta" <bartequi@neomedia.it> > > I figured out a way to recover the drive: > > > 1. You will need the following: > > > 1 spare hard drive (daX) (same model and size as the one your restoring > > (daY)) > > Information on the size of each partition (root, swap, var, usr) that > > was on the drive (daY) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > AFAIK, the "highlighted" information on FreeBSD partitions "root", "swap", "var" "usr" > (or MS-DOS "subpartitions" if you like) lives in the FreeBSD slice^H^H^H^Hdisklabel; > the FreeBSD bootstrap & disklabel live at the beginning of the FreeBSD slice, NOT in > the MBR. > > > ---------------------------------------- > MASTER BOOT RECORD: > Boot Code > (MS-DOS) Partition Table (64 bytes; starting at byte 447) > ---------------------------------------- > > > Is a spare identical HD necessary? > I didn't want to risk further damaging the contents of the drive I needed to recover, and felt that it was safer to test things on a spare identical drive. > How about: > > *) backing up the disk MBR to a file (via dd); > *) editing the partition table of the disk via fdisk iff (=if and only if) you have exact > information on the FreeBSD slice in question. > > If you can by no means recover the MS-DOS partition table information, don't edit the > partition table; just try gpart. Despite the warning in its man pages, gpart seems to do > great guesswork^W^W a great job. > I did give gpart a try on another system to see what it would do, but it was taking hours (2+) to analyze the systems 3GB harddrive. In the mean time, I tried restoring the MBR for the system with the damaged MBR as described in previous message, and had the system back on-line with in a few minutes. > > Am I missing something? > I don't think so, it's just that we need either clearer examples on how to r estore the (MS-DOS) Partition Table, or system administrators that pay attention to what device they are fdisking :-). I was lucky in the way I restored my drive, as it only had one partition (Dangerously Dedicated) on it dedicated to FreeBSD . If the drive would of had 2+ partitions, then I would have needed to use gpart to restore the partitions. Scot 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?000801c0cd20$ba7744c0$11f66ad8>