If successful, you will get a response similar to that shown below. This command tells Grub which partition contains the /boot directory, which is where it can find its required files. Using the partition determined in step 1 above, run the root command as shown below. Run the root command to tell Grub which partition contains /boot However, keep in mind that if you are NOT limiting primaries in BootIt BM, not being able to find the file above could just mean that the Linux partition is currently not in the MBR, and therefore is not visible to Grub.Ģ. If neither find command above can find the stage1 file, then reinstalling Grub is not going to work. The notation (hd0,1) means the 2nd partition on drive hd0, while the notation (hd0,0) would mean the 1st partition on drive hd0. The actual partition in your case may very well be different. Please note that (hd0,1) shown above is just an example. In that case, the path to the file stage1 will be /grub/stage1 instead, and so the following command should find it: If the find command returns an error (Error 15: File not found), this likely means that you have a separate /boot partition. In this case, partition (hd0,1) contains the /boot/grub directory. If the search is successful, Grub will return the partition in Grub notation, such as shown below: To determine which partition contains this path/file, run the following command from the Grub prompt: In most cases, the /boot directory will be included in the root partition, so that the path to stage1 will be /boot/grub/stage1. The /boot/grub directory should contain the file 'stage1', which is the file we will look for with the find command. The /boot directory contains the grub directory, which is where Grub will find the files it needs to install. This can be done with Grub's find command. The remainder of this article will cover the steps listed above in detail. Run setup to install Grub to a partition boot sector Run root to tell Grub which partition contains the /boot directoryģ. Run find to determine which partition contains the /boot directoryĢ. Once at the Grub prompt, it is suggested that you follow these steps:ġ. If you prefer, the Grub manual also provides instructions on how to create a bootable floppy disk, or a bootable CD/DVD disc. Both the Grub floppy and the Grub CD/DVD will boot the system up to the Grub prompt. The zip file contains images from which you can create either a Grub floppy disk or a Grub CD or DVD. To obtain one, you can download grub.zip from the TeraByte Unlimited ftp site. If your Linux installation still boots far enough so that you can get to the Grub prompt, then you can reinstall Grub from there. On a fully working Linux installation, the native Grub shell is reached by booting up to the Grub boot menu, and then pressing to get to the Grub command prompt (grub>). This is the preferred and most reliable way to install or reinstall Grub. The method of reinstalling Grub covered here will use the native Grub shell, using commands entered from the Grub prompt (grub>). This article will, instead, cover a generic method of reinstalling Grub that should work for any distribution. But since the procedure to do this can vary from one distribution to another, you will need to refer to your distribution's documentation for instructions. In most cases, the Linux installation itself will still be intact, and you just need to reinstall the Grub boot code so that BootIt BM can boot the partition again.įor some introductory and background information on Grub that may help you better understand this article, please refer to Grub Article #1 - Installation Notes and Background Information.īefore getting started, it should be mentioned that some distributions provide a way to reinstall Grub by booting from the installation CD and choosing that option in some manner. The need to reinstall Grub can come about for several reasons, but usually it is the result of changing your drive/partition configuration in some way. It is written primarily from the perspective of BootIt BM users, who will need to have Grub installed in a partition's boot sector, rather than in the MBR. This article covers the basics of reinstalling Grub, if it becomes necessary to do so. For the equivalent article that is specific to Grub2, please see How To Reinstall Grub2 Important: This article is specific to Grub legacy (the original Grub).
0 Comments
Leave a Reply. |