2

I've been running CentOS 5 for some years. I've decided to upgrade to Ubuntu, and with 10.04 just out, this seemed like a good time.

I'm a tad paranoid, so I started off with a new set of drives - one to install on, one to backup to, and one as a spare. I removed my existing CentOS 5 drives, and did an install, and had no problems. I installed the server version, and used the default full-disk LVM installation.

Next, I copies my backup scripts over, edited them to work with the new configuration, and did a test backup. That worked fine, as well. Then comes the real test, could I do an install of the backup onto the spare drive? (I won't put anything of importance on a system that doesn't have a reliable backup, and if I've never done a restore, it's not reliable.)

I booted from a System Rescue CD (ver 1.5.3), with the spare drive as /dev/sda, and the backup drive as /dev/sdb. I had no trouble in partitioning, configuring LVM, formatting, making swap, or restoring the file systems. But when I got to restoring grub to the MBR, I ran into problems.

My restore instructions from CentOS 5 said run grub, then enter two commands:

root (hd0,0) setup (hd0)

The first command exits with an error: "Checking if /boot/grub/stage1 exists ... no"

I did some googling around, and found that the Grub2 included in recent Ubuntus is very different than the Grub 0.97 included in CentOS 5. One site suggested I use:

grub-install --root-dir=/mnt/restore /dev/sda

That appeared to work, but when I booted from the drive, I ended up at a grub prompt.

Any ideas as to what I need to do? It seems like a simple problem, but my attempts at searching out answers on the web are being swamped by references to the old version of Grub.

Help would be appreciated.

jdege
  • 193
  • 9

1 Answers1

1

My restored drives had all of the proper grub installation and configuration on them, it was just a matter of getting things to where I could execute them.

I booted off the Ubuntu install CD, selected "rescue", and then set my new root directory as the root directory, and started a shell in that directory.

I then mounted /boot, and ran update-grub and grub-install, and everything worked fine.

jdege
  • 193
  • 9
  • Hmm... disappointed..would have preferred to see more details as what this fixed. Also with the previous grub prompt did you try booting by manually configuring from the grub shell? – Software Mechanic May 16 '11 at 12:23