How to install/Fix Grub 2

This tutorial is meant to help you install fix your grub config file, and by doing so enabling you to boot into your right partitions.

Name-codes used in this tutorial:


USERNAME = your username (ex. john, abby,..)
PASSWORD = your password (ex. pAsSwRd123)
DISKNAME = your disk name (ex. sda, hdb, sdc, etc)
PARTITION = your partition name (ex. sda1, sdb2, hda3,..)
#this is a comment = do not type senteces starting with '#'. This is to explain/comment the command

 

                                         Method #1 – LIVE CD/DVD

1- Boot the computer from an USB or CD ubuntu image. At the boot screen select “Try out”UBUNTU”

screen2

2- After the desktop session has loaded start the terminal or just press CTRL+ALT+t

3- At the terminal type:


sudo su
mkdir /mnt/new
fdisk -l
#now here is the hard part; you have to figure out what is the partition you need to use in the next command, where is your "/" root-linux-system located?
mount /dev/PARTITION /mnt/new #mount the partition where you "/"(root-system) folder is located
grub-install --root-directory=/mnt/new /dev/DISKNAME #install the bootloader in the right disk

4- Now close the terminal, exit the live session, take out the cd and reboot your system.
5- Press “SHIFT” to load the new grub menu, and select “Recovery Mode”
screen

6- In recovery mode , select “UPDATE-GRUB bootloader” and select “OK”;
screen

screen2

7- Exit and reboot normally; You should see that the grub menu has changed (in case you had other OS installed in your machine)

Advertisements

2 responses to “How to install/Fix Grub 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s