User Tools

Site Tools


howtos:reinstall_grub

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:reinstall_grub [21/02/2007 17:10] domingohowtos:reinstall_grub [02/12/2018 21:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Restoring the GNU Grub ======
  
 +  - Get yourself a LiveCD
 +  - Boot using the LiveCD and mount the partition containing your distribution (if it hasn’t been already mounted by the LiveCD distro)
 +  - Open a terminal window, gain root access, and type: "chroot /mnt/hd??" OR "chroot /media/hd??" where the first "?" stands for the hard disk letter and the second "?" stands for the partition number. Note that some distributions use "/media" for mounting drives, so check both "/mnt" and "/media" before attempting to manually mount the partition. If you don’t know which is the distribution partition (e.g. If you have multiple distros installed) then just navigate to the directories you mounted on the previous step until you determine which is the right one. Typing just "mount" should reveal any automounted filesystems
 +  - Type "grub", a message saying "Probing devices to guess BIOS drives" should appear, just wait for a couple of minutes and soon you will see the grub prompt (it looks like "grub> _")
 +  - Type "find /boot/grub/stage1". The result will be like "(hd0,5)" or perhaps "(hd0)". Keep this in mind because it is a key-text for the next steps.
 +  - Type "root (hd?,?)", replace the question marks with what the output of the command above was.
 +  - Now we are ready to install grub, select one of the following options depending on the place you want to install grub:
 +          * If you want to install grub on the MBR (recommended for most installations) type "setup (hd?)" where "?" is the result BEFORE the comma that command in step 5 returned
 +          * If you know what you are doing and want to install it on a separate partition, type "setup (hd?,?)" where the first "?" stands for the pre-comma output of the command of step 5 and the second "?" stands for the partition number.
 +  - Type "quit" to exit the grub prompt
 +  - Reboot the computer and remove the LiveCD, grub should now appear
 +
 +
 +
 +//Source: http://lignuxer.blogspot.com/2007/02/restoring-gnu-grub_15.html //
howtos/reinstall_grub.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1