Linux Cookbook 1: Update or Repair your GRUB installation

How-To Linux GRUB

This is my first blog posts from a distant past! One of first articles I ever tried to write. It is more like a cookbook for me, as I wanted to store this information somewhere and I used it many times in my past. You never know when this can come in handy! Sometimes, something just go wrong, and you won't boot your Linux machine anymore, and you will need to restore your GRUB to boot your lovely Linux again. Back then this could happen for example when you installed the Windows that completely rewritten your bootloader.

I am too lazy to anyhow edit this post, so here it is, in the old good raw form:

(Tested on Linux MINT 16 - CINNAMON 64bit edition)

1) Chose partition for GRUB installation. For list of partition use lsblk:


My output:

NAME   FSTYPE LABEL  UUID                                  SIZE
sda                                                        931,5G
├─sda1 vfat          9829-0270                             100M
├─sda2                                                     128M
├─sda3 swap          99ec4b59-15c7-4e2e-9753-e27c6e55aa30  7,5G
├─sda4 ntfs          6C4E4EDA4E4E9CA8                      146,5G
├─sda5 ntfs Data     FAF4BF3CF4BEF9C9                      638,6G
└─sda6 ext4          223e82d3-c489-4b28-864d-b3d8a89a9946  138,8G
sdb                                                        3,7G
└─sdb1 vfat          AAF7-477E                             3,7G

Let's say we will use: /dev/sda6.

2) Mount chosen partition:

sudo mount /dev/sda6 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc

3) Enter Chroot for /mnt, update GRUB and exit Chroot:

sudo chroot /mnt
sudo update-grub

4) Un-mount at the end:

sudo umount /mnt/dev
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/

5) You are done. Just restart system, GRUB should be there :)

Next Post