Linux Server Diary

The trials and tribulations of a Linux newbie trying to setup a home server.

Wednesday, May 31, 2006

Restoring GRUB After Windows Install

Way back in March, I talked about my Windows troubles. Finally, I was able to score a copy of Windows XP from work under the campus license. I figured that it wouldn't have a problem with the disk size and disk controller like W2K was, and I was right. The install was quick and easy. I've been missing Windows for a while, especially when I was trying to use audio apps.

However, I don't want to give up Linux. As I suspected, installing Windows erased GRUB from the MBR. I had researched the method for restoring my dual boot setup without having to reinstall Ubuntu, and I found several options.

The cleanest looking method, found here, had me boot from the install CD in rescue mode, and then rerun the GRUB install.

grub-install /dev/hda

Didn't work. The error was: Could not find device for /boot: not found or not a block device. I looked around Google for help, but none was found.

Next, I tried the non-newbie method. It involves booting into the Live CD, and running GRUB in a terminal window. Didn't work either - mostly because I can't get the Live CD to boot on my machine. It's something to do with the video settings.

Finally, I looked at the scary method. Basically, we're asked to run the install program and mess with the partition step. I get a little worried about messing with partitions that contain data, but my frustration got the better of me and I tried. Surprisingly, it worked, and my data is intact!

One hint, step 4 involves mounting the Linux partitions, and at first I wasn't sure what that meant in this context. After a couple of tries, I had things where I needed them.

I hope this helps someone else trying to restore GRUB after a Windows install.

0 Comments:

Post a Comment

<< Home