Started boot-repair on live-usb, removed grub, and then was instructed to write in terminal sudo chroot "/mnt/boot-sav/sda5" apt-get install -y --force-yes grub-pc linux but I get:

Reading package lists... Done 
Building dependency tree
Reading state information... Done
E: Unable to locate package linux

and it says grub is still absent.


The original command should not be,

apt-get install -y --force-yes grub-pc linux

It should be,

apt-get install -y --force-yes grub-pc

If you run apt-get install -y --force-yes grub-pc linux command, apt-get tries to find and install the packages grub-pc and linux. But there is no such linux package available.

E: Unable to locate package linux

The above part from the error report is your clue.

The presence of "linux" in the install line is a bug in boot-repair, and should be reported there.

  • 1
    thnx alot, it was too confusing for beginners like me. your answer did great help. – Haider Ali Wajihi Nov 15 '14 at 5:10

The command line reported by boot-repair is apt-get install -y --force-yes grub-pc linux

Whether or not the word "linux" should be there is a different question.


When prompted by Boot-Repair, please type this command in the terminal:

sudo chroot "/mnt/boot-sav/sda6" apt-get install -y --force-yes grub-pc

linux command in a terminal on 1 line only. In your question it appears broken on 2 lines.

  • I do write it on one line, it appears broken because it is the end of the line (I copy paste actually) – user271668 Apr 20 '14 at 22:59

I had the same problem with Boot Repair and found that if I omit the word "linux" from the end of the command, then it installs properly. For some reason Boot Repair says you should include the word (but again, you should not).

protected by Community Aug 23 '14 at 6:29

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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