Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I get this error when I run grub-install:

cp: cannot stat `/usr/local/lib/grub/i386-pc/*.mod': No such file or directory

I thought I'd run grub-mkconfig for a fresh configuration file that grub-install could then use, but it still didn't help. Then I did some stupid things like deleting files in /boot/grub and reinstalling grub packages in hopes to restore them, to no avail. Why does this error come up, and what can I do to reinstall a completely fresh grub system, including any files related to grub.


share|improve this question
After some investigation, I found that the directory /usr/local/lib/grub doesn't come standard in Ubuntu (and probably linux in general). This folder exists because I compiled the grub source. Not sure why reinstalling grub didn't work though. – ladaghini May 7 '11 at 6:09
up vote 0 down vote accepted

Reinstall grub2:

sudo apt-get purge grub grub-pc grub-common

sudo apt-get install grub-common grub-pc

sudo update-grub

share|improve this answer
this will also purge grub legacy (you probably don't and shouldn't have it installed) – Richard May 3 '11 at 14:36
Now I get << The following Linux command line was extracted from /etc/default/grub or the `kopt' parameter in GRUB Legacy's menu.lst. Please verify that it is correct, and modify it if necessary.>> and an empty Linux command line. – ladaghini May 3 '11 at 15:55

Have you ever tryed Grub-Customizer? Maybe you'll like it:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer && sudo apt-get update

Then, install it:

sudo apt-get install grub-customizer.

You can controll all of your boot system from here with safety and less headache.

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.