My PC has a hard disk at /dev/hda and boots from its MBR using the GRUB bootloader.
I connected a second hard disk at /dev/hdc, formatted it and copied to it all files from my original hard disk.
Now I want to make the second hard disk bootable, when it is connected as the primary hard disk (i.e. as /dev/hda).
(The second hard disk has different partitioning, so dd if=/dev/hda of=/dev/hdc won't cut it.)
Note that in both disks, the first partition (/dev/hda0 and /dev/hdc0) is the /boot partition, which includes the Linux kernels and ./grub subdirectory.
My naive attempt to use the commands:
grub> root (hd1,0)
grub> setup (hd1)
while the cloned hard disk was /dev/hdc (known as hd1 to grub)
caused garbage to be displayed when booting from the cloned hard disk (when connected as /dev/hda).
What is the correct way to configure grub on a cloned hard disk, if one does not want to boot the PC from a diskette or CD-ROM due to any reason?