1

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.

Thanks.

1
  • 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, 2011 at 6:09

2 Answers 2

1

Reinstall grub2:

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

sudo apt-get install grub-common grub-pc

sudo update-grub

2
  • this will also purge grub legacy (you probably don't and shouldn't have it installed)
    – Richard
    May 3, 2011 at 14:36
  • 1
    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, 2011 at 15:55
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .