[ILUG] fixing windows

Martin List-Petersen martin+ilug at list-petersen.net
Mon Feb 7 22:01:21 GMT 2005


Citat Kenn Humborg <kenn at bluetree.ie>:

> > On any other distribution find a system with a sane mbr and run:
> > dd if=/dev/sda of=mbr.img bs=512 count=1
> > 
> > On the system, that has a problem with the mbr you can then write this
> > mbr to the disk:
> > dd if=mbr.img of=/dev/sda
> > 
> > That's basically the only way to do it on Linux, as least, what i know
> > of.
> 
> Don't do this.  You'll replace the partition table on the second
> machine with a copy of the partition table from the first.
> 
> Or, if you do do this, keep a copy of the old partition details
> and manually re-create them after overwriting it.

Yup, that seems to be a misinterpretation from my side. Works nicely though, if
you need a MBR for a unpartitioned drive that needs to be partitioned afterwards
anyway (like a USBkey, that had a floppy format on it). The MBR is only the
first 446 bytes of that image. The rest is partition table and signature.

So "dd if=/dev/sda of=mbr.img bs=446 count=1" should do the job, but is still
NOT recommended and you better keep a backup around !

Anyway, this is something you usually never need, unless you screwed up majorly
or you use something like Windows.

/Martin
--
Do you know Montana?




More information about the ILUG mailing list