Sorry if a similar thread already has been posted. There are a zillion threads about Grub, but I could not find this specific error.
Subtitle: how to clone a linux disk
This happened after I did a disk clone on a disk of dissimilair size.
I connected the empty disk to the secondary IDE. It became /dev/hdc. With cfdisk I created the partitions as I liked them, and formatted them to ext3 with mkfs.
(If you do this, don't forget to inititalize a swap partition with mkswap, and tell the kernel about it with swapon once you booted from the new disk)
Then using the dd command, I copied every partition to the new disk:
dd if=/dev/hda1 of=/dev/hdc1 bs=8192
...etc for the other partitions I have.
I mounted /dev/hdc1 to /mnt/hdc1 in the current tree. /dev/hdc1 is the partition which contains the /boot dir.
At the very last I made a grub install on /dev/hdc with this command:
# grub-install --root-directory=/mnt/hdc1 /dev/hdc
This gives the error:
"/dev/hdc does not have any corresponding BIOS drive"
To solve this, add this line to the /mnt/hdc1/boot/grub/device.map:
(hd2) /dev/hdc
The important thing is that you have to edit the device.map which is in <root-directory>/boot/grub, and NOT the file on the drive you booted from.
You can also clone the MBR using the dd command, but I consider this more safe. If you make a mistake with dd here, you delete the partition table and you have to start over again.
(I can't imagine that on some other platforms you have to struggle with Norton Ghost etc.
)
jlinkels