4

I am trying to install Windows 7 on Ubuntu. I created NTFS partition for Windows 7 but I deleted a 5GB partition so I got a error message when I reboot Ubuntu.

grub rescue error

To solve this error, I tried installing boot-repair software. Here are the steps I followed:

  1. Boot to LiveCD
  2. Connect to Internet
  3. Open terminal
  4. Give command sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
  5. Then give command sudo apt-get install -y boot-repair && boot-repair

Now I get this error message:

Reading package lists... Done Building dependency tree Reading state information... Done 
E: Unable to locate package boot-repair
Peachy
  • 7,235
  • 10
  • 40
  • 47

6 Answers6

6

If your are using an older version of the Ubuntu Live CD, you might need to change the package source (I had this problem with the Natty (11.04) Live CD).

  1. Start Synaptic, and in the menu go to SettingsRepositories. Go to the Other Software tab, and select the line http://ppa.launchpad.net/yannubuntu/boot-repair/u... main and then click on the Edit button down below.

  2. In the new window that pops up change the distribution: field to quantal.

  3. Repeat steps 1 and 2, except this time select http://ppa.launchpad.net/yannubuntu/boot-repair/u... (Source Code), and then close the window.

  4. Now, either click the Reload button in Synaptic, or enter into the terminal:

    sudo apt-get update
    sudo apt-get install boot-repair
    

That's it! Boot Repair is now installed.

Stephen
  • 161
4

I had a similar grub error after installing Lucid (10.04.4) on an older Dell and found a solution that allowed me to install boot-repair by modifying the instructions from here: https://askubuntu.com/a/245571/285018. Modifications are noted in bold

  1. Start Synaptic, and in the menu go to Settings -> Repositories. Go to the "Other Software" tab, and select the line
    http://ppa.launchpad.net/yannubuntu/boot-repair/u... main and then click on the Edit button down below.

  2. In the new window that pops up change the distribution: field to "precise" (without quotes).

  3. Step 3 in the referenced instructions said to change the "Type" to "Source" instead of "Binary" in the same window where you changed the field to "precise," but that was not necessary for me. I left the "Type" as "Binary"

  4. Now, either click the reload button in synaptic and install boot-repair from there, or enter into the terminal:

     sudo apt-get update
    
     sudo apt-get install boot-repair
    

As a side note, after performing steps 1-4 above and selecting "origin" at the bottom-left of the main synaptic page, the ppa yannubuntu was included in the list of available sources.

wilmc
  • 41
3
LovinBuntu
  • 3,785
3

wilmc's answer didn't work for me, but it was on the right track which helped me find the answer. This is what I did to get this to work.

First, type in these commands:

cd /etc/apt/sources.list.d
sudo nano yannubuntu*

You should see a line that says:

deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu vivid main

Change the word before "main" (in this case "vivid") to "precise". Save it and exit. Now simply run:

sudo apt-get update
sudo apt-get install boot-repair

And it should work.

amihart
  • 31
0

Try doing it using these commands.

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install boot-repair

These are the instructions from the following webpage

"Boot-Repair": Fix Ubuntu Boot Issues (After Installing Another OS Or Faulty GRUB Upgrade)

TrailRider
  • 7,157
0

Solution based on 12.04:

Go the Update Manager

Open Settings

Go to the 2nd tab (Other Software)

Find the line saying http://ppa.launchpad.net/yannubuntu/boot-repair

Select it

Press Edit

Add /ubuntu at the end of the line

.. The line should now look like this:

.. http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu

Press Ok, Close, e.t.c. (whatever is needed to save and close)

Go back to the terminal and repeat the usual installation process

It will install normally now

In the Terminal commands do NOT change anything (Do NOT add /ubuntu at any terminal command, I didn't try it)

At least this is the solution that worked for me.

Good luck!

..............................

In the Terminal I used

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

Mukund
  • 2,122