how to recover GRUB without original installation CD
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, it relates to the MBR. To boot grub, you need to install to the MBR - that means by definition hd0. Change the above to "setup (hd0)".
*note:* This will (probably) not resurrect your ability to boot FC4. You will need to enter the appropriate information in menu.lst/grub.conf The installer (used to be Anaconda, presumably still is) sets all this up for you when you install FC.
Search here on LQ should give you enough info to sort it out.
after booting from ubuntu live CD, I mount fc4 filesystem on
/mnt/fc4, and copy /mnt/fc4/boot/grub to /boot/grub, in
this directory ther are stage1 stag2 and others including
menu.list. is this step necessary?
because I do not know when I run grub, if it will use /boot/grub
files, if it does, then since I copied from original FC4, it
should be fine.
Quote:
Originally Posted by syg00
Yes, it relates to the MBR. To boot grub, you need to install to the MBR - that means by definition hd0. Change the above to "setup (hd0)".
*note:* This will (probably) not resurrect your ability to boot FC4. You will need to enter the appropriate information in menu.lst/grub.conf The installer (used to be Anaconda, presumably still is) sets all this up for you when you install FC.
Search here on LQ should give you enough info to sort it out.
When you observe that "I've reinstalled XP and now Grub has disappeared," stop and consider exactly what has (and has not) happened, and the solution will present itself:
XP has installed itself, on the appointed partition, but it has not eliminated nor written-to any other partition, so Grub and Linux are both "still there, somewhere," and untouched.
XP has rewritten the Master Boot Record (MBR), this being the bootstrap program loaded by the BIOS which, in turn, loads the Windows-XP boot loader (NTLDR), which loads Windows-XP.
The solution, therefore, is to reinstall the original MBR, which points to Grub. You can do this from any Linux LiveCD. You do need to know upon which drive, and in which partition, the /boot partition is located.
You don't have to reinstall Linux, or Grub, or anything else, because they are still there.
Incidentally, this is one of the reasons why I consistently advocate the use of a separate drive or drives when you want to run Linux and Windows on the same computer. With this strategy, Windows could have overwritten the MBR on its drive with complete impunity... because the BIOS would still be set to read the MBR from the Linux drive, and therefore would continue to boot Linux (that is to say, Grub). Furthermore, if you chose to select the Windows drive as your boot-drive, what Windows would have done would have been exactly correct.
P.S. It is my recollection that you do not have to chroot anywhere to rewrite the Grub MBR. All that Grub needs to know is which drive is to be rewritten, and which partition (counting from zero, remember...) contains the /boot material.
Last edited by sundialsvcs; 12-07-2005 at 10:52 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.