Just gonna throw my 2 cents in because I reinstalled GRUB.
I have been dual booting XP Pro and Ubuntu for a couple years and never had a problem, did a fresh install of Ubuntu Studio 9.1 and everything ran perfect. Then I decided to install Windows 7, did a fresh install and after couldn't boot into Ubuntu because Windows writes to the MBR, but I knew that would happen. Most of the posts that I read say to boot into the live CD, but unfortunately I downloaded an alternate version which apparently doesn't boot into the live cd. So instead after booting the install cd I choose to "FIX A BROKEN INSTALL", followed the regular install routine until it comes up with a list of options to perform, one of the being to install GRUB. Choose that and the location to install, (hd0,0) and it installs in a matter of seconds, then in the menu choose to reboot.
After rebooting in the GRUB menu my Ubuntu Studio is there but the Windows installation is showing as Windows XP which I can't boot into. I boot into Ubuntu and check the file /boot/grub/grub.cfg and find Windows XP listed in the boot options. Opened Terminal and ran "sudo update-grub" which updated the grub.cfg file and now reads windows 7.
Now everything works perfect. Sorry for the long winded post.
posted the same thing twice in error.
Last edited by Ramanjit81; November 28th, 2009 at 08:24 PM. Reason: posted the same thing twice in error.
Hello people. First of all I'd like to thank Olecarne as your post has been the most helpful.
I'm a newbie who installed ubuntu 9.10 on a window vista machine. I resized the vista partition and reduced it's size to make a 20 GB partition for ubuntu. Ubuntu has been great by far but vista hasn't been loading at all even though it is listed under grub.
So, attempting to revive vista as well, I got to the recovery console and tried fixboot and fixmbr. Now none of the OSes are working and I started getting the error NTLDR is missing.
I have managed to reinstall grub as follows: (Olecarne's approach worked for me but I'll insert a few steps to eliminate any possibility of confusion.)
- Get a ubuntu live cd and boot into ubuntu.
- then go to system>administration>Gparted. Please the partion which has the original ubuntu installation. (just newbies, it will more than likely have an ext3 or ext4 file system). Please note this partition as you will need to select this at step 15.
- Get a Debian netinst installer on http://www.debian.org/devel/debian-installer/ (I used the full version and not the businesscard version. Either might work though)
- Burn the image to a cd/ usb or floppy as you prefer. (Please ensure that you have downloaded the right file format for your preferred media i.e. cd/ floppy/usb.)
- Boot it and then at the the menu list select advanced options and press enter.
- choose rescue mode(not graphical rescue mode) and press enter
- select language and press enter.
- select country and press enter
- select keyboard layout and press enter
- now the cd will detect hardware and load additional components.
- Then it will come to a select the network interface you may want to use. press tab key to get to go back and press enter.
- this will give you the debian installer main menu.
- go to "enter rescue mode". and press enter.
- It will ask you for the device to use as root file system and list the various options i.e. the various hdds and the partitions on them are listed.
- select the partition that has the original ubuntu installation on it and press enter.
- select "reinstall GRUB boot loader" and press enter.
- if you want the GRUB to be loaded to the MBR i.e. Master Boot Record, the enter (hd0) and press TAB to select continue and press enter.
- then the enter rescue mode menu comes up again after grub is installed.
- go to "Reboot the system" and press enter.
- on the computer boot up you should see the grub menu with the list of your installed OS.
Your GRUB should now work properly. (Mine did.)
Here's an even simpler if not very attractive fix, for the real beginners. I'm sure it's been mentioned but I've spent too long already messing about with this problem.
I removed a partition which killed GRUB. I tried the first few pages of this thread trying to get it fixed, but nothing worked. In the end I just loaded a second copy, in the space where I had removed the partition. I know installing from a live CD/USB Stick works, so I just did that alongside my existing stuff.
A crude fix but ever so quick and easy.
make changes to partitions locations below
boot from cd/usb/network/yomomma
sudo mkdir /mnt/fixboot
sudo mount -t ext4 /dev/sda5 /mnt/fixboot
sudo mount -t proc non /mnt/fixboot/proc
sudo mount -o bind /dev /mnt/fixboot/dev
sudo chroot /mnt/fixboot /bin/bash
sudo grub-install /dev/sda
sudo umount /mnt/fixboot/dev
sudo umount /mnt/fixboot/proc
sudo umount /mnt/fixboot
using this you boot live cd and then you can become root of the os and reinstall, update grub.
start wiht number 4 as the others have to do with reinstalling the os.
Why not just install legacy grub?
I just did one today like this:
(1) Using the Live CD installer at the last step click on Advanced and choose not to install grub at all!
(2) When installation is done don't choose to restart, rather choose to keep using the Live CD.
(3) Since you just installed you should know the drive/partition # of your Karmic (or Lucid) so keep that in mind. If you have no idea the Boot Info Script should be helpful:
(4) From the Live Desktop run:
sudo mount /dev/sdXY /mnt
(of course XY must represent your drive and partition #'s!)
sudo mount --bind /dev /mnt/dev && sudo mount --bind /proc /mnt/proc && sudo mount --bind /dev/pts /mnt/dev/pts && sudo cp /etc/resolv.conf /mnt/etc/resolv.conf && sudo chroot /mnt
You should notice that the command prompt changes from ubuntu@ubuntu$ to # which means you're now root in that OS. I like to be sure I am where I want to be with "cat /etc/issue" and "df -H".
And when you're done:
sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt