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

Installing the MBR on a new Hard Drive



	I have made a copy of the / file system from the boot
drive on a Debian Squeeze system to a new flash drive as the
original drive is about 13 years old, works fine, but I don't
want to push my luck too far. I used fdisk to format the new
drive, made Partition 1 bootable and then used rsync to copy all
the files one can from the old drive to the new one.

	It came time to install a MBR on the new drive so I
found some instructions which raise a question.

	I know you are supposed to copy the image of a boot
floppy to the first 446 bytes of the new drive which is what I
did. This is done by

#   dd if=/dev/hda of=/dev/sdb bs=446 count=1

	It appears to have worked but I have not yet installed
the drive in the system and booted from it but there was also an
alternative instruction:

#   dd if=/dev/hda of=/dev/sdb bs=512 count=2

	What, besides the obvious fact that one is copying more
bytes, is the difference between copying just the MBR and
copying the 1024 bytes?

	Was this even necessary since I had already made
fdisk set Partition 1 bootable before doing mkfs?

	For anybody interested in doing this, make sure you know
your drive device designations as they will be different than
what I used in this example and you could really mess up your
day if you don't be careful.

Martin McCormick


Reply to: