Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restoring MBR



On Sun, 02 Jan 2005 11:26:04 -0500
ewh5243 at netscape.net wrote:

> >On Sun, 2 Jan 2005 00:02:02 -0500
> >Bill Horne <bill at billhorne.homelinux.org> wrote:
> 
> >> Well, I started the New Year off with a bang: I fat-fingered a dd
> >> command and I've overwritten the first 512 bytes of my mbr.
> >> 
> >> Before I dig out the backups, please tell me if it's possible to 
> >> recreate the MBR from the information in the existing partition
> >> labels, or if there's a backup of the partition table that I 
> >> can use.
> 
> On Sun Jan 2 08:15:32 EST 2005 Jerry Feldman said:
> 
> > You can have GRUB or LILO rebuild your MBR. 
> > Boot a rescue CD, a standalone Linux, or boot your installed 
> > system from CD or floppy. 
> > If you are using GRUB:
> > If you are booting from a rescue:
> >   mount your root file system and chroot it. 
> >   mount your /boot if separate.
> > Execute the grub shell. Here is an excerpt from the GRUB docs.
> >
> >  Once started, GRUB will show the command-line interface (*note
> > Command-line interface::). First, set the GRUB's "root device"(1)
> > (*note Installing GRUB natively-Footnote-1::) to the boot 
> > directory, like this:
> >
> >     grub> root (hd0,0)
> 
> [snip]
> 
> Jerry,
> 
> Thanks for the tip: I tried to start GRUB from floppy, but when I
enter
> the "root" command, I get an error saying either that the partition 
> doesn't exist or that the cylinder number is higher than the bios
limit, 
> depending on which partition I try.
> 
> Does GRUB have a way to rebuild the partition table?
No. Stop right there. 
At this point, you should boot a standalone Linux. Knoppix is excellent.
Then use QTParted. If you do not have Knoppix, but can boot into a
rescue, run fdisk, and see if it recognizes the partition table. 

Note that you can easily rebuild the partition table if you know the
exact dimensions of the old partition table. 



-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/discuss/attachments/20050102/bad0ee30/attachment.sig>



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org