grub problem

Dale Farnsworth dale at farnsworth.org
Mon Apr 9 21:54:59 MST 2007


der.hans wrote:
> Could I dd the first 512 bytes off the original drive onto one of the new
> drives and have any hope that the system would actually boot off the new
> drive?

If you try it, you should copy only the first 446 bytes, which
contain the boot code.  The next 64 bytes is the partition table,
which is likely not the same on each drive.  The final 2 bytes
of the boot block (MBR) contain the signature: 0xAA55.

However, the boot code also contains fields that identify drive
number and sector offset where the next stage of the bootloader
is located.  So, in general, it's not safe to copy the boot code
from drive to drive.  This is also why grub fails to boot if
the removal of drives causes the boot drive number to change.

-Dale


More information about the PLUG-discuss mailing list