« HOWTO install folding@homeHOWTO get x2x working. »

HOWTO: Put grub back when Windows screws it up

11/07/08

HOWTO: Put grub back when Windows screws it up

When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)

Follow up:

Grub settings for:
linux32 it is 'root (hd1,0)'  & 'setup (hd0)'.  
linux60 it is 'root (hd0,1)'  & 'setup (hd0)'.  
Code:
sudo grub

This will get you a "grub>" prompt (i.e. the grub shell). At grub> enter these commands. You may need to us both of the find commands. It depends on whether boot is in the root '/' partition or in a partition of its own. If it is in a partition on its own then it will be found with the second find command

Code:
find /boot/grub/stage1 
find /grub/stage1

This will return a location. If you have more than one, select the installation that you want to provide the grub files. Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)

Code:
root (hd1,0)

Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)

Next enter the command to install grub to the mbr

Code:
setup (hd0)

Finally exit the grub shell

Code:
quit

Now make sure that Windows is included in the menu of grub. You can use what I do.
The text on the title line can be anything

Example /boot/grub/menu.lst Entry
title   Expensive non Linux OS or buggy insecure bloatware  
root  
 
title           M$ Winpdoz,  
root            (hd0,0)  
makeactive  
chainloader     +1  
TIP:
You can hide the Windows lines from the menu until you movethe cursor over them by using this simplle trick. Before the title line in the above example add the following another title line but do not add any text at all.

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
What can birds and aeroplanes both do?
antispam test