Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I deleted files from /boot to save space, but now when I boot I see:

GRUB loading, please wait ... ERROR 15

/boot still has files corresponding to the 2.6.32-27 version of Linux. But I deleted all others that did not have that string in /boot

How can I fix this?

share|improve this question

migrated from stackoverflow.com May 23 '11 at 18:26

This question came from our site for professional and enthusiast programmers.

Reinstall your OS, man (unless you have backups)... what did you think was going to happen if you went mucking about in the /boot dir? –  Rafe Kettler May 23 '11 at 18:18
Actually, you might be able to recover by reinstalling the boot loader. If the kernel files are still there you have a shot (you probably conked menu.lst or other files important to GRUB). –  ultrasawblade May 23 '11 at 22:13
This has to be a troll. Like that story of that person who wanted to clean up their C:\system32 directory or whatever. –  Falmarri May 24 '11 at 0:27
+1 for a) the humor, and b) the guts to post such a thing to the world. :-) –  Keith May 24 '11 at 6:16

5 Answers 5

up vote 5 down vote accepted

Here are some instructions on reinstalling grub2 in recent versions of Ubuntu.

I'd recommend following the chroot method as I think that will be the easiest and safest way to restore your system.

Additionally, the next time that you want to clean up drive space on /boot, you can use synaptic or apt-get to remove old kernels. For example:

$ sudo apt-get remove linux-image-2.6.31-21-generic

share|improve this answer
It is best (unless you know your boot loader and OS kernel very well) to leave the /boot partition alone. That advice holds true whether we're talking about Linux or a BSD or something else altogether... –  Michael Trausch May 24 '11 at 15:14

Well Error 15 reads "File not found". Restore your /boot from your last backup.

share|improve this answer
Restoring /boot isn't going to be enough, the boot sector may need to be updated with the new files' location. –  Gilles May 23 '11 at 21:42
If it's going into GRUB to display a GRUB error message the boot sector is OK. –  ultrasawblade May 23 '11 at 22:14

You can try to reinstall grub, I think that recreates the boot folder. Not too sure though, but it can't hurt...

share|improve this answer

The MBR is trying to read from a grub install somewhere on disk which has now been deleted.

You'll need to create a grub install and then write it to the MBR. Check the man page for "grub-install".

Basically you need to run:

sudo grub-install /dev/sda

to write create a new grub 2 and write it to the MBR.

You'll need to drop a grub.cfg file to boot up your OS though in /boot/grub. If you don't have one you can regenerate a grub2 config file using grub-setup.

share|improve this answer
Of course he can't do this if he can't boot. He'll need a rescue or live media image to boot from first. –  Keith May 24 '11 at 6:15
sorry - yes, you'll need a live cd that supports grub2. I believe an ubuntu live cd will do the trick. –  ascotan May 24 '11 at 15:39

On a modern Ubuntu installation, you should enter

sudo apt-get install --reinstall linux-image-3.xx.xx-generic

for whichever kernel version you have. This should run a 'depmod' and then create the

  • vmlinuz
  • initrd.img
  • System.map
  • abi
  • config

files. Finally, it creates a new grub.cfg. Hopefully this is helpful.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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