Home » Questions » Computers [ Ask a new question ]

How to fix GRUB after Windows breaks it, and how to edit the GRUB menu

How to fix GRUB after Windows breaks it, and how to edit the GRUB menu

I had Windows XP and Ubuntu both installed. I could easily boot into either until Windows "fixed" the bootloader so that it now only boots into Windows.

Asked by: Guest | Views: 56
Total answers/comments: 2
Guest [Entry]

"Boot off a live CD (gparted is quick), then in a terminal window enter, (substituting your (drive,partition) pair):

sudo grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0)
quit

Then reboot the system

As root edit /boot/grub/menu.lst, it's fairly self explanatory."
Guest [Entry]

"Sometimes in windows partitioning & formating there's a change
in partition's number. Eg: /dev/sda3 become /dev/sda4
So if U get on booting an error 17... ""cannot mount selected partition""...
Fix it like that:

On grub splash select the line of your entry and press ""e"" to edit
Change the number of the partition... Ex: (hd0,2) -> (hd0,3) and press ""enter""
Reboot
When you can reboot on your system fix menu.lst with new settings..."