I have a CentOS 6 server with two hard drives in it. My old 3TB drive has been giving me some issues so I'm moving things over to a new drive. Because my / and /home partition are managed by a LVM it was easy to migrate those to the new drive. Now I want to move over my /boot partition and the MBR that makes it all start up.
I loaded up a live CD and rsynced over my /boot partition to the same size partition on my new drive. I also tried to copy over my MBR with the following commands:
dd if=/dev/sda of=mbrbackup bs=512 count=1
dd if=mbrbackup of=/dev/sdb bs=446 count=1
After doing this I rebooted, told my BIOS not to look at the old hard drive during the boot cycle and only look at the new drive but all I ended up with was a blinking cursor.
Did I miss a step here? Or is there something else I need to do to make things boot so I can completely remove my old drive?
EDIT: I'm starting to think rsync was not the way to copy the /boot partition from one drive to another. Based on this guide, I tried using the dump command instead. In this command I copied my old, unmounted boot partition to my new, empty, mounted boot partition.
dump -0f - /dev/sdaX | (cd /mnt/boot; restore -rf -)
I'm getting a grub error 15 on boot which is better than a blinking cursor but I don't know if that is any closer to a solution.