2

I did that to save space.

Now I see

GRUB loading, please wait ...
ERROR 15

when booting.

What can I do ?

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

7
  • 1
    If you deleted the /boot/grub directory, then you lost your GRUB menu, and all its other files. You should be able to boot from a Live CD and copy the /boot/grub directory from a working system onto the damaged one. May 23 '11 at 18:15
  • 2
    You deleted files in /boot to save space? Do you know what you deleted? You may look at this HOWTO though.
    – slhck
    May 23 '11 at 18:15
  • 2
    Also, for the future, in order to save space, you should use the package management (e.g. Synaptic) to remove old versions of linux-image and not just delete some files at random.
    – slhck
    May 23 '11 at 18:23
  • 2
    Helpful suggestion... Don't be logged in as root in the future if you don't know what you are doing...
    – David
    May 23 '11 at 18:41
  • 1
    Deleted boot and now it won't boot? I wonder....
    – n0pe
    May 23 '11 at 19:25
6

When it comes to cleaning up /boot, especially on an Ubuntu box, use the package manager to remove the kernels. You've wiped out the bootloader that boots your system, now you get to rebuild it by hand, or else reinstall. We'll go at it with the rebuild-by-hand method.

  1. Boot your machine with an Ubuntu LiveCD. Once booted, you'll need to mount the boot partition from your hard drive.

  2. Copy the grub directory from /boot/grub on the LiveCD to the mounted boot partition

  3. Edit the menu.lst in the mounted boot partition, and modify the first entry to point to the kernel you have left on the disk.

This may get you going. Worst case, boot from the LiveCD, copy any data you need to a backup location and reinstall. Moral of the story: Use the package management included with your distribution to clean up your disk, and ALWAYS be careful as root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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