Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
    
Not sure why the commands you followed didn't work, I used the same commands and was able to install. If you "deleted" rather than resized a partition you may have deleted your Ubuntu partition, in which case Boot Repair will fail to fix your problem. If you resized your Ubuntu partition then you may be OK. If you are going to install Windows after Ubuntu, you need reformat a partition to NTFS and it should be the FIRST partition. See this question for instructions on how to do it. –  TrailRider Jul 19 '12 at 1:22
    
I would like to suggest Create boot repair disk, it works in great boot repair. –  K.K Patel Dec 7 '12 at 9:24

5 Answers 5

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: http://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.

share|improve this answer

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 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 "quantal" (without quotes).

  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.

share|improve this answer
    
Thanks, this worked for me. I was using a Linux Mint 12 Live CD I had around to repair my boot sector after installing Windows in another partition. Linux Mint 12 is based on Ubuntu 11.10 (oneiric), and replacing that with quantal as you described allowed me to install boot-repair :) –  waldyrious Jan 10 at 21:40

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)

share|improve this answer
    
I think, this is the same things he has already done. –  Anwar Shah Jul 19 '12 at 6:15
    
@AnwarShah it is more or less, I broke it up into separate steps. I can only assume that he may have typed the commands wrong when he entered them into the terminal, as I was able to use the commands(typed in correctly) and was able to install without any problems. Unless he didn't include some 404 or connection error, there is not much of a reason to think that it was any more than a syntax problem. I just broke up the commands to give him an easy way to cut and paste in the terminal to avoid syntax errors and eliminate that as a possible problem. –  TrailRider Jul 19 '12 at 23:08
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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