3

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.

4

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.

| improve this answer | |
  • 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
1

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.

| improve this answer | |
0

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.

| improve this answer | |
  • 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
0

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).

| improve this answer | |

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