Extracting boot sectors

Alejandro Pulver alejandro at varnet.biz
Wed Feb 23 19:05:01 GMT 2005


I would like to know how to extract the MBR to a file, and how to
restore it. Also I would like to know how to do the same with the
partition boot sector and OS loaders.

I think it is as follows (I remember this from somewhere):

dd if=/dev/<disk/partition> of=/<file> bs=512 count=1

But I do not know:
a) Is 512 the correct size for both (MBR and partition boot sectors)?
b) How to extract/restore the OS loader (e.g. for WinNT/2K/XP, that is
c) What alternative commands are available for doing this

I would also like to know more about boot sectors and OS loaders. I
would appreciate some links.

Thanks and Best Regards,

More information about the freebsd-questions mailing list