Page 1 of 1

Grub problem (Solved)

PostPosted: Fri May 08, 2009 6:20 am
by csc2ya
I've now managed to mess up grub to the point where my laptop wouldn't even boot into windows without having to reformat.

The way I was booting previously, was that I had a triple boot configuration set up, with Vista and XP on the internal drive of my laptop, and Ultimate Edition on the external.

I then used the vista bootloader which had entries for vista, xp, and Ultimate Edition. The Ultimate Edition option would then start grub, which in turn, booted into Ultimate Edition.

I saw mentions of grub2 on the ubuntu forums, and (stupidly...hindsight is a wonderful thing) thought i'd give it a try. I downloaded and installed it through synaptic, and when installing, selected to chainload it off of the original grub menu, as suggested by the installer.

I then rebooted after installing it, and got an error. Unfortunately, I can't remember the exact error now.

I thought, fair enough, booted off of my vista dvd, and selected to do a startup repair. However, it appears that it completely wiped out my original MBR. After doing startup repair, and rebooting, I got the same error again. Next, I tried using super grub disk on the ultimate boot cd to boot into either windows or Ultimate Edition, but this did not work.

I then booted off of an ubuntu livecd, and looked up how to restore grub.

I ran find /etc/boot/grub/stage1 to find the partition number, then ran grub followed by root (hd whatever partition number was returned by the find command), then install (hd0). I got no errors from this, and so rebooted and prayed.

And got exactly the same error as before.

I then decided to cut my losses and reformat the internal drive. I disconnected the external drive, put my recovery dvd in and rebooted, removed all the partitions, then told it to apply the factory image.

I'm now at the point where i've got Vista working again, but i've got no idea how to change grub2 back to the original grub on the Ultimate Edition drive to get that to boot again, as I assume it would have changed the boot menu file.

I'm reluctant to try the method I mentioned above, in case it just restores grub2 to the mbr again, as I would have to reformat again if that happened. All I want is the original grub back on that drive and working, preferably without reinstalling Ultimate Edition, as I have no backups of any of the data on there (It would also take a while for me to get everything reinstalled even if I could back up all my data).

Is there any way to get the original grub installed and working again using the livecd, preferably without risking the same thing happening that happened when I originally installed grub2?

I appreciate any help that can be provided.

Re: Grub problem

PostPosted: Fri May 08, 2009 9:54 am
by bpollen
If you have backup software in Vista, back up your Vista drive.

If you are able to boot to the external drive (via changing boot drive in bios for instance,) boot to ultimate, uninstall grub2 via Synaptic, reinstall grub, then reconfigure grub in a terminal (the find /boot/grub/stage1 method.)

Change your boot drive back to the Vista drive and give it a whirl.

That would be my approach. If you have taken a backup, you can always restore if things go awry.

Re: Grub problem

PostPosted: Fri May 08, 2009 4:43 pm
by csc2ya
Thanks. It worked. I thought that doing that would rewrite grub2 to the mbr, meaning i'd have to reformat again, but it in fact reinstalled grub, as you said.

I'm now back in ubuntu, and i'm not going to be messing around with grub2 again in a hurry...lol :P

Re: Grub problem (Solved)

PostPosted: Sat May 09, 2009 3:03 pm
by stanca
In Kiwilinux it is using this:
restoregrub_1.0.2-1_all.deb
(13.79 KiB) Downloaded 658 times