i've been pulling my hair out because of this, so i had a dual boot(non UEFI, normal BIOS) of windows 8.1 and ubuntu 14.04 and i decided to replace ubuntu with elementary OS 64 bit then installation fails saying package grub-pc failed to install at /target/ so i choose don't install boot loader, after that i boot into the live system again and try grub-install /dev/sda but i get the error /usr/lib/grub/i386-pc/modinit.sh doesn't exist, i would greatly appreciate any help, thank you.

  • Re-installing while connected to the internet should fix the problem, assuming you weren't before.
    – Lewis Goddard
    Commented Sep 29, 2015 at 18:02
  • @Lewis Gooddard, tried that but no luck
    – user2587
    Commented Sep 29, 2015 at 18:14
  • same problem here... installing while connected to the internet doesn't solve the problem
    – user2623
    Commented Oct 2, 2015 at 0:36
  • what is your exact problem?....not able to boot to any OS?
    – Ravan
    Commented Oct 10, 2015 at 13:20
  • @zola let me know my answer is useful to you =)
    – Ravan
    Commented Oct 20, 2015 at 13:47

2 Answers 2


Open terminal and run:

sudo mount /dev/sda6 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
sudo update-grub

Note: In first command /dev/sda6 is elementary OS /root partition.Replace 6 with your partition number.


I believe I solved this using a live cd to chroot into the target system, then installing grub-pc.

Instructions on how to chroot can be found here: http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

Before you run the grub-install command, run sudo apt-get install grub-pc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.