0

I have a hard disk that's failing, so before it dies completely and I have to resort to backups I want to copy everything (OS and all) onto a new disk, and put that back in the machine the failing disk came from so I don't even have to do an OS reinstall. I am doing all this on my normal Linux desktop machine (with the new disk connected via SATA hotswap), although the disk will eventually be booted by, and run in, another machine (one of my home Linux servers.)

I have partitioned and formatted the new disk, and copied all the files across. The only thing left is to install GRUB on the new disk, so I can boot from it once it is installed in the target machine.

Unfortunately I can't figure out how to do this from my desktop PC. If I use grub-install, it complains that the disk has no BIOS ID in my BIOS, which is pointless as my PC is never going to boot this disk.

$ grub-install --root-directory=/mnt/newdisk /dev/sdh
/dev/sdh does not have any corresponding BIOS drive.

It's going to be the only disk in the server, so presumably the BIOS ID will always be 0x80.

How can I tell GRUB to install itself on this disk, and to act as if it's the only disk in the system? (without stuffing up the GRUB config on my desktop PC in the process!)

1 Answer 1

0

I would look up Clonezilla which would be similar to what you want to do. You create an image of your drive and you would be able to reload it in minutes on a new drive when needed. http://clonezilla.org/ is where you can find the info and download. Hope it helps.

1
  • Interesting. Unfortunately I don't think it will work in this situation as I am copying a 1TB RAID0 array onto a single 120GB disk, so I need to manually choose what to copy and what to leave out. Plus I have already copied all the data, all I need to do is install GRUB and it's done.
    – Malvineous
    Sep 4, 2012 at 23:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .