17-03-2011, 03:33 AM
How to install / repair your Grub (1.98) install from the Ubuntu 10.04 live CD
With the recent saga of my XP install failing.
http://mcompute.co.uk/showthread.php?tid=836
I re-installed Windows XP, and as we know the rule of thumb is install the older version of Windows first then Linux. So installing Windows XP when Ubuntu is install is going to wipe Grub out and replace it with Windows MBR, (which doesn't recognise Linux installs). Problem.. you can now only boot into Windows.
Solution
1) Boot off the Live CD and click "Try it"
2) When In the desktop environment, open a terminal and escalate to root. (sudo su)
3) Find out with partition your Linux install in on, (can do this using gparted)
4) mount /dev/sda3 /mnt
5) grub-install --root-directory=/mnt /dev/sda
6) umount /mnt
7) exit
8) reboot
Now, you can boot back into your Linux install, but not your Windows ! So, go ahead and boot back into your Linux install as normal then open a terminal and type
9) sudo update-grub
It should now recognise you have Windows installed and update Grub for you.
Job done.
With the recent saga of my XP install failing.
http://mcompute.co.uk/showthread.php?tid=836
I re-installed Windows XP, and as we know the rule of thumb is install the older version of Windows first then Linux. So installing Windows XP when Ubuntu is install is going to wipe Grub out and replace it with Windows MBR, (which doesn't recognise Linux installs). Problem.. you can now only boot into Windows.
Solution
1) Boot off the Live CD and click "Try it"
2) When In the desktop environment, open a terminal and escalate to root. (sudo su)
3) Find out with partition your Linux install in on, (can do this using gparted)
4) mount /dev/sda3 /mnt
5) grub-install --root-directory=/mnt /dev/sda
6) umount /mnt
7) exit
8) reboot
Now, you can boot back into your Linux install, but not your Windows ! So, go ahead and boot back into your Linux install as normal then open a terminal and type
9) sudo update-grub
It should now recognise you have Windows installed and update Grub for you.
Job done.