Tuesday, May 8, 2012

Repairing grub by booting from the Ubuntu live-CD

I just installed the new version of Ubuntu (12.04). The installation went fine but the bootloader installation at the end did not work. When I turn on the computer, the new version of the ubuntu does not show in the old bootloader (grub2) menu. What to do? #Boot the computer with the Ubuntu live cd, mount the / partition under /home/ubuntu/a and issue the following command : sudo mount --bind /dev/ /home/ubuntu/a/dev sudo mount --bind /proc/ /home/ubuntu/a/proc sudo mount --bind /sys/ /home/ubuntu/a/sys sudo chroot /home/ubuntu/a #Then let grub2 create /boot/grub/grub.cfg by autodetecting the present OS'es sudo update-grub Found linux image: /boot/vmlinuz-3.2.0-23-generic Found initrd image: /boot/initrd.img-3.2.0-23-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Found Ubuntu 10.10 (10.10) on /dev/sda6 done #Exit from the modified chroot exit #Run grub-install sudo grub-install --root-directory=/home/ubuntu/a /dev/sda You should get the message : Installation finished. No error reported.

No comments:

Post a Comment