Changes to grub in ubuntu 10

Posted by jdege on Server Fault See other posts from Server Fault or by jdege
Published on 2010-05-09T00:31:23Z Indexed on 2010/05/09 0:38 UTC
Read the original article Hit count: 376

Filed under:
|

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.

© Server Fault or respective owner

Related posts about ubuntu-10.04

Related posts about grub