...An Easy Fix
Ubuntu uses the
GRUB2 boot loader/manager and has since version 9.10 If you like to
play around with the most recent Linux Distro's, as I do, then you
may from time to time have a need to re-install the GRUB2 boot loader.
It is quite simple to do, all you need is a live CD/DVD of a Ubuntu
release 9.10 or newer... or for that matter any live disk that uses
GRUB2 boot loader.
Fire up the terminal
once the disk finishes loading (Ctrl,
Alt + T) and enter the following commands:
I) Lets find the
specifics as to where Ubuntu is installed on your Hard Disk:
sudo fdisk -l
(the return from
this command should look something like this)
Device Boot
Start End Blocks Id System
/dev/sda1 *
2048 167456767 83727360 83 Linux
/dev/sda2
167458814 234440703 33490945 5 Extended
/dev/sda5
226107392 234440703 4166656 82 Linux swap / Solaris
As you can see
above, my Ubuntu partition is /dev/sda1 (it has the asterisk
under Boot).
II) Armed with this
information, we can now mount the Ubuntu partition:
sudo mount
/dev/sda1 /mnt
III) Now we can install the
GRUB2 boot loader:
sudo grub-install
- -root-directory=/mnt /dev/sda
NOTE: That's
/dev/sda – the hard disk itself, NOT the Ubuntu partition
/dev/sda1.
IV) Unmount the
Ubuntu partition:
sudo umount
/dev/sda1
V) If you have more
than one OS installed, re-detect OS's like so:
sudo update-grub
VI) Restart the computer:
sudo reboot
That's it! You will now be greeted by the familiar GNU GRUB boot menu.
No comments:
Post a Comment