Ubuntu 14.04 was complaining that my /boot partition was at 100%, so stupidly I went about deleting files I thought my system didnt need - ie files with names like linux 3.19.0-39-generic etc..

i figured since there was a linux 3.19.0-41-generic, i didnt need the ones below it.

Anyhow, rebooted my system, and grub still loads, but if I select an option, the entire system just reboots and I am presented with GRUB again.

I tried to fix boot by loading LUbuntu on a key, then installing the boot-repair disk, ran through boot repair, but it didnt fix the problem.

What can I do?

  • 1
    This is why I keep /home on another partition, so when things go pearshaped I can reinstall from the Live USB and go back to normal operations after something gets FUBARed. Otherwise you are looking at a 'copy my stuff to an external drive and reinstall from scratch' deal unless someone can recommend a better way of fixing /boot without going with the nuclear option I just outlined.
    – Aren
    Dec 21, 2015 at 3:31
  • unfortunately, I was unable to repair.... so because of a deadline, I had to reformat... luckily I was able to backup data before doing so, however I had to install all programs from scratch :( Jan 6, 2016 at 0:30

2 Answers 2


Here's how to recover your boot:

Boot with a Live Ubuntu Disc and find the drive/partition where you have installed your root filesystem. Normally, it will be automatically mounted under /media. If you don't find it there, use sudo disk -l to see its info.

Assuming your system partition is /dev/sda1 then run the following commands in a terminal:

mkdir mnt
sudo mount /dev/sda1 mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot mnt

You will now be inside a chroot environment meaning that running commands here is equivalent to running them on your installed system. Firstly, try to reinstall GRUB2 to the device so that it copies the correct files into the /boot folder.

grub-install /dev/sda

Find out which packages installed that have files in the boot directory and reinstall them. This will replace the kernel images that have been deleted among other things. The command to find the package is:

dpkg -S /boot

And to reinstall them. For example, reinstall the linux image you told above:

sudo apt-get install --reinstall linux-image-3.19.0-41-generic

After all, update the grub loader:


Finally, reboot your system

  • when I try to install grub its complaining about my encrypted drive... do I need to do anything special if my drive is encrypted? Dec 21, 2015 at 4:34
  • What did you use to encrypt your drive before?
    – Tung Tran
    Dec 21, 2015 at 4:50
  • i used cryptsetup, and before booting the os, it would always ask for the crypt password.. Dec 21, 2015 at 4:51
  • Ok try to decrypt your drive first cryptsetup luksOpen /dev/sda1 encrypted-volume. You may need to install cryptsetup in Ubuntu Live too apt-get install cryptsetup
    – Tung Tran
    Dec 21, 2015 at 4:54
  • since my entire disk was encrypted I had to first install cryptsetup as you mentioned, but then use udisksctl unlock -b /dev/sdb5 udisksctl mount -b /dev/mapper/ubuntu-root-vg to mount it.. Dec 21, 2015 at 6:39

I was able to reproduce this very same problem, here 's what I did to solve it

  1. Boot from Live USB.
  2. Mount encrypted partition . You can do this following Tung Tran 's commands or through Nautilus graphical interface; which will interactively ask for the password of this partition.
  3. Download the boot files that you require. You can download them the usual way Tung Tran 's described or with the command sudo apt-get install linux-image-4.4.0-21-generic. You can also download those files with your browser at ubuntu's official repository (http://packages.ubuntu.com/xenial/linux-image-4.4.0-21-generic)
  4. Copy your files to the /boot directory of the mounted partition.
  5. Reboot your pc and in case it doesn't boot automatically and GRUB menu appears, go to advanced options and select, your image just loaded. In this case that would be linux-image-4.4.0-21-generic

Not the answer you're looking for? Browse other questions tagged or ask your own question.