Click to See Complete Forum and Search --> : OOPS! I broke my GRUB....
bigmac99
03-30-2004, 02:55 PM
I broke my GRUB! ...and my linux. =(
I have a machine with 2 hard drives, and was dual booting between WinXP and Suse 9.0 with Grub.
I got a little brave, and decided I was going to install Gentoo from a stage 1 tarball. Well, after several hours, I hit a roadblock (I apparently missed a step real early in the process), so I had to stop the install. Now, when I boot my machine, all I get is a black screen with GRUB in the top left corner. I have tried typing on this screen but don't seem to be able to do anything from here. Anybody able to help me get my XP up and running so I can reinstall Suse??????
Thanks in advance for helping an adventurous newbie. =)
-Charles
JamminJoeyB
03-30-2004, 03:02 PM
Did you make a boot disk? Not sure if Suse's cd can be used as a resue cd to help here.
If you could boot off a floppy or cd you might beable to restore your grub. I think I saw some posts on here on how to do it.
edit
********
hayl has a better idea. why didn't I think of that
********
boot the Gentoo Live CD and then mount all the partitions again, then chroot back in and reinstall GRUB.
bigmac99
03-30-2004, 05:10 PM
Hayl, I think I can get past mounting the drives, but then how would I reinstall Grub at that point? That won't affect my XP partition will it?
Thanks again.
Charles
mdwatts
03-31-2004, 12:44 PM
As root
Install in the mbr
grub-install /dev/hda
Install in a partition
grub-install /dev/hda#
Change # to the correct partition.
Actually searching the JL forums for 'reinstall grub' would likely have found you those same commands. :)
Dark Ninja
04-01-2004, 02:44 PM
I had a similar problem, though I couldn't use my Gentoo CD to get back in (because I wasn't familiar enough with Linux). If this is your case, you could also possibly throw in the Windows CD and boot off of that. Use the recovery tools to recreate your MBR (basically Windows will allow itself to be the only OS to boot).
That will at least get you back to a stage where you can fix your Linux boot.
knute
04-01-2004, 03:09 PM
OMG People, grub has the capability to boot the OS from the promt just as easily as from the menu.
If you have the grub prompt, you simply put in the commands as they appear in the menu, and viola, you are booting into that OS!
It's part of the power of grub, and one reason that I use grub.
So you want to boot into xp. Ok. What partition is it on? /dev/hda1? or hd(0,0)?
Assuming it is there, then issue the following commands at the grub> prompt
rootnoverify hd(0,0)
chainloader +1
makeactive
boot
If you are booting xp from another partition you will have to issue the appropriate commads to make it think that it's on the first partition.
HTH
Originally posted by knute
OMG People, grub has the capability to boot the OS from the promt just as easily as from the menu. I don't think it's the Grub prompt that bigmac99 is describing.
Under certain circumstances, Grub will hang right at the point of transitioning between the first stage of the loader (on the MBR) and the second stage (or stage 1.5) loader. When it does, all you get is a black screen with "GRUB" in the upper left-hand corner. This isn't the Grub prompt; it should then proceed to print something similar to:
"loading stage 2" or "loading stage 1.5"
If it doesn't get past the "GRUB", she's hung hard- you have to do a hard power down.
afaiq
04-01-2004, 05:19 PM
The easiest option that I have used in a similar situation is to boot off the SuSE 9.0 CD1. Pick the 'Repair' option. On the next screen you have several options for scanning your system for repair, pick the 'expert' option. Next screen has several items that you can repair, one of them is writing GRUB back to MBR. This will re-install your old GRUB back to the MBR. Hope this helps, good luck bigmac99 !
bigmac99
04-01-2004, 05:28 PM
Thanks guys for all your replies, luckily I fixed the problem last night.
Since I had blown away my existing SUSE install (trying) to install GENTOO, I just reinstalled SUSE again and everything is now back to the way it should be.
Thanks
Charles
ps - DMR was correct, it was the black screen that says GRUB in the upper left corner, and I couldn't type anything.