Recover grub bootloader after win install!
I am using Fedora Core 3 and recently i had to reinstall Winxp on my system. Problem is I no longer have access to the Grub and I cannot boot Linux anymore. Please help me with some advice on how to avoid this on future Windows installations. Because, trust me, they are needed. Is there a software that saves my boot config and rewrites it after a new install? I really cannot afford to install 3Gb worth of Linux every time!!! Help!
|
You should be able to boot with fedora cd1 and at the boot prompt enter "linux rescue".
Once booted run: chroot /mnt/sysimage /sbin/grub-install /dev/hda This should put grub back on the mbr. |
If you still have the Fedora Install CD:
1. Boot off the cd. 2. At the boot prompt, type 'linux resucue' (no quotes) and hit enter. 3. continue with the default options through the prompts. 4. when you get to a bash prompt, type 'chroot /mnt/sysimage' (I think that's the path). 5. then, type '/sbin/grub-install /dev/hda' (assuming, hda is your system drive). 6. reboot your computer off the drive. If that doesn't work, I have a different procedure, but I don't remember all of the steps right off the top of my head. ;) *edit: Aw junk, someone beat me to the answer..... |
Quote:
'/dev/mapper/pdc_ebajbgad' and its the same device hda mapped to pdc_ebajbgad and should be work sorry for my english |
Thanks guys
Ok, thanks a lot for the advice. As i'll use Linux more and more i'll get the hang of this.
|
there is a nice guide at http://wiki.ubuntu.com/RecoverGrub in case anyone needs :)
|
As for avoiding this in the future:
Put GRUB on a floppy |
Quote:
|
Grub put on a floppy----->Chapter 3.1 of Grub Manual refers
Grub put on a CD--------->Chapter 3.4 of Grub Manual refers A bootable Grub floppy or CD is the most lethal weapon in the booting business. There is no PC system such weapon cannot boot. If a PC system is bootable then a Grub floppy or CD can fire it up and you don't even need to tell Grub what that system is. For a Linux you can remove every trace of its boot loader and Grub can still fire it up. If you know how to use a bootable Grub floppy or Grub CD then you can kiss all your booting problems good bye. --------------------------------------------------- As an example how I would use Grub to solve the OP problem as follow. (1) I boot up a Grub CD (or a floppy) to get a Grub prompt. (2) I type Code:
geometry (hd0) Code:
root (hd0,2) If I want to be lazy I can ask Grub to find out which partition has grub.conf by command Code:
find grub.conf I can also restore the Grub without booting up Fedora by Code:
root (hd0,2) Also if the Fedora still doesn't boot I can ask Grub to diaplay its cconfiguration file by Code:
cat (hd0,2)/grub/grub.conf A Grub floppy or CD can fire up the XP, say if it is in the 1st partition, by Code:
root (hd0,0) You see one humble Grub floppy (with only 2 files inside) or Grub CD (with only one file inside) can solve your booting problems for good! |
link to manual for convenience http://www.gnu.org/software/grub/man...l#Installation
PS. "If you know how to use a bootable Grub floppy or Grub CD" doesn't look so easy to grasp |
I got nothing to do with Grub and just like you I am no more than an end user.
My Grub Manual is exactly the same one you can read from the Internet and does not contain one extra word in it. I would say it is fair to say Grub Manual isn't easy to understand for a beginner because Grub's ambition lies beyond Linux and so the notations, the methods, the explanations are generic. However once you start to refer to it when you have a problem you can see a solution there. Grub never told us it can boot every system manually, nor it ever makes the claim that there is no PS system it can't boot. The folks who wrote Grub were only interested to provide the functionalities. It is up to the users to apply the tool. In a nutshell a user should look upon Grub as a mini operating system loaded before the Linux kernel. There is a lot he/she can do with this mini operating system which is lightening fast, seldom hangs and is remarkably flexible. My whole point is you can talk to Grub, interact with it and let this bugger teaches you all the tricks it can do. Grub always responds error or warning if it cannot accept a command so one can learn from Grub very quickly by booting systems manually. The commands on how to boot systems are already written in grub.conf (or menu.lst). The whole thing is a lot easier than many people think. |
Yes definitely, Grub is so easy and yet powerful, reading and applying the read is the only way to go, i read a lot about grub, learning along the way and now i find myself absolutely at ease with it.
Edit: And saikee, all your links have become my bookmarks long back, thanks for that, and that 100+ systems blew away many of my Windows friends,lol :) |
shrikant.odugoudar,
Glad you found Grub easy. So I haven't been telling lies after all. |
Super grub problem
Hey
Hope it's not of topic. I tried Super Grub Disk, Auto Super Grub Disk that is, and it installed fine. But when i booted with it, it found the partition with boot files (grub.conf), but it hanged when trying to boot.. Is there something wron with my system? Booting with a cd. Seems pretty unpractical to have a cd every time you start the computer... |
Thanks very much.
Quote:
Thanks very much David Ross. Its very useful for me. Thanks once again. |
All times are GMT -5. The time now is 10:01 AM. |