Easy method to update bootloader in linux

Recently I had an issue with my linux box bootloader. I had install Windows 7, Fedora and Ubuntu in my machine. After the installations over I restart my machine and found that there was no fedora entry in the bootloader of ubuntu. Ubuntu failed to update the fedora linux grub in my case. So I checked the recovery options and found the following useful method.

First login into ubuntu linux and open your terminal, search the list of available partitions

I used fdisk -l command to check all the available partitions and found that I have installed fedora linux in the partition /dev/sda10.

root@linuxinternetworks.com:/home/tamil# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xba25ecb1

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   157288447    78540800    7  HPFS/NTFS/exFAT
/dev/sda4       157294590   976771071   409738241    f  W95 Ext’d (LBA)
/dev/sda5       367224832   576944127   104859648    7  HPFS/NTFS/exFAT
/dev/sda6       576946176   681807871    52430848    7  HPFS/NTFS/exFAT
/dev/sda7       681809920   786671615    52430848    7  HPFS/NTFS/exFAT
/dev/sda8       786673664   891535359    52430848    7  HPFS/NTFS/exFAT
/dev/sda9       891537408   976771071    42616832    7  HPFS/NTFS/exFAT
/dev/sda10      157294592   239214591    40960000   83  Linux
/dev/sda11      239216640   243312639     2048000   82  Linux swap / Solaris
/dev/sda12      243314688   367212543    61948928   83  Linux

Partition table entries are not in disk order

Now get the UUID of the partition, Use blkid to list all the partition’s uuid.

root@linuxinternetworks.com:/home/tamil# blkid

/dev/sda1: LABEL=”System Reserved” UUID=”F6A0AD3EA0AD0669″ TYPE=”ntfs”
/dev/sda2: UUID=”5A3EB3133EB2E6E3″ TYPE=”ntfs”
/dev/sda5: LABEL=”Wonder Lands” UUID=”646C6E706C6E3D44″ TYPE=”ntfs”
/dev/sda6: LABEL=”Tech Repository” UUID=”4698EE2398EE10EB” TYPE=”ntfs”
/dev/sda7: LABEL=”Repository” UUID=”9C24D99624D9742C” TYPE=”ntfs”
/dev/sda8: LABEL=”Virtual World” UUID=”5EF8C806F8C7DA83″ TYPE=”ntfs”
/dev/sda9: LABEL=”My dOcs” UUID=”5250B5BF50B5A9DD” TYPE=”ntfs”
/dev/sda10: UUID=”35971cd4-cf87-4b6c-b2ee-3845aca3b45b” TYPE=”ext4″
/dev/sda11: UUID=”a5648ff5-3aa8-4767-b441-41e59f5a349d” TYPE=”swap”
/dev/sda12: UUID=”867500e3-d5d1-4284-b13e-bb37cd0048e1″ TYPE=”ext4″

Now open the fstab file and add the fedora partition entry as shown below.

root@linuxinternetworks.com:/home/tamil# vim /etc/fstab

# /etc/fstab: static file system information.
# Use ‘blkid’ to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda12 during installation
UUID=867500e3-d5d1-4284-b13e-bb37cd0048e1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda11 during installation
UUID=a5648ff5-3aa8-4767-b441-41e59f5a349d none            swap    sw              0       0

#Fedora Partition
UUID=35971cd4-cf87-4b6c-b2ee-3845aca3b45b       /mnt/   ext4    defaults           0      0  

save and quit the file.

Restart the machine and enter into Ubuntu Recovery mode at ubuntu bootloader

I selected the grub update option in the recovery mode list and it started the ubuntu recovery. Finally ubuntu found fedora linux in the partition /dev/sda10 and updated it in the bootloader entry.

The Bootloader problem solved :)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Add a Comment

Your email address will not be published. Required fields are marked *