Linux Blog

Fix For Grub Problem After Fedora Update

Filed under: General Linux — TheLinuxBlog.com at 10:06 am on Tuesday, February 24, 2009

After updating a Fedora installation a development server froze sitting there with GRUB on the screen at boot.
It had been like this all night after a successful upgrade earlier that day. yum update was run from a screen session and then connected to from home. What had caused the problem was the kernel and possibly grub had been updated. This caused the system to need a reboot, but after the reboot the drive map had changed.

Fortunately when I came in the next morning I had an e-mail with a link to this website: http://readlist.com/lists/redhat.com/fedora-list/51/259917.html with a solution to the problem.

Here are the step by step instructions since they are not clearly lined out on the site:

1) Insert Fedora installation media
2) boot to rescue mode
3) choose language, skip network settings
4) once you are at a shell, type:
5) grub –device-map=/tmp/drivemap
6) quit
7) vi,pico or nano /tmp/drivemap and move sda and sdb around, or perhaps hda.
8) chroot /mnt/sysimage
9) I had checked that /tmp/drivemap had stayed the same by running cat /tmp/drivemap
10) grub –device-map=/tmp/drivemap
11) quit
12) grub-install
13) reboot

After grub gave its usual message I rebooted, removed the CD and everything worked as expected. Excellent. I’ve always used lilo over grub, but recently the distributions I’ve been using use grub and more importantly the servers I manage. Therefore I guess I better get more accustomed to grub. Luckily the server this went wrong on was a development server and nothing mission critical, so thankfully no one had to make the long haul into the data center to fix this issue at 1:00am. Hopefully you will be just as lucky if you run into this issue.





Random Man Pages:
st
pam
menger
nologin

2 Comments »

Comment by P. Wells

March 6, 2009 @ 6:22 pm

I think in step (7) you mean nano /tmp/drivemap (i.e without the /etc). This certainly helped me get going again. Thanks.

Comment by TheLinuxBlog.com

March 6, 2009 @ 11:48 pm

Thanks @P. Wells for the pointer. I’ve updated the article to reflect your attention to the detail that I thought I had :)

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>