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?
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!