1

How do I reinstall grub, after I have reinstalled Windows XP on dual boot system?

I have Ubuntu 14.10 installed, and I'm trying to reinstall grub from Ubuntu 10.04 Live CD. However, I cannot install boot-repair (E: Couldn't find package boot-repair) and I have no idea what "main partition" refers to here. Is it the partition I have Ubuntu 14.10 installed on (/dev/sda2) or the one with Windows (/dev/sda1)?

Solution: The problem was that I was using Ubuntu 10.04 Live CD. boot-repair installed right away from Ubuntu 14.10 Live USB and it solved the problem.

stanny
  • 313
  • 1
    Let us focus on getting boot repair to work. Specifically what happens when you try to install it? Can you use a newer distro with a Live CD? – Organic Marble Mar 30 '15 at 11:16
  • Well, I add the repository, but when I try to install boot-repair, I get the "E: Couldn't find package boot-repair" error. I've downloaded the Boot Repair Live CD and dd'ed it to a USB, but the USB then doesn't boot up. I'll try installing boot-repair within a newer distro. – stanny Mar 30 '15 at 13:01
  • 1
    Cool! I thought it might be the old distro. – Organic Marble Mar 30 '15 at 15:14

1 Answers1

0

The 'main partition' referred in this answer is the partition on which your Ubuntu is installed. It is the one you mount as file system root (/ directory) when you boot Ubuntu normally. So yes, in your case it would be /dev/sda2.

Your other option was to use boot repair instead of manually reinstalling GRUB. Probably you forgot to install the PPA (sudo add-apt-repository ppa:yannubuntu/boot-repair) or to update your software index list afterwards (sudo apt-get update). Note that you need a working internet connection for this. Otherwise you would have to download it as .deb-file and install it manually with sudo dpkg -i /path/to/file.deb.

But anyway, you should use a newer version of Ubuntu as live system. 10.04 is now 5 years old and hits end-of-life in April 2015. Better use 14.04 LTS (from April 2014, 5 years support) or 14.10 (from October 2014, 9 months support). The next release will be 15.04 (in April 2015, 9 months support).

Byte Commander
  • 107,489
  • I did add the repository and I did update the index list, but now I see that when I do update it, the yannubuntu rep is being ignored (Ign http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/ lucid/main Translation-en_US). Also, I have 14.10 installed (not 14.04 as I said), but the 10.04 is the latest live Ubuntu CD I have and I didn't want to go through the hassle of creating a fresher Live USB. – stanny Mar 30 '15 at 13:14
  • That is not true - the PPA is not ignored, only the en_US translations. Run sudo apt-get update | grep boot-repair and you will see at least one line with "OK" or "Hit" which means that the index is up to date. (Or "Get" if it is fetching a new version). – Byte Commander Mar 30 '15 at 13:20
  • This is the only line I get with grep: Ign http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/ lucid/main Translation-en_US. – stanny Mar 30 '15 at 13:29
  • 1
    I managed to solve the problem from Ubuntu 14.10 Live USB. boot-repair installed right away from 14.10. – stanny Mar 30 '15 at 13:39
  • 1
    Cool. So it seems like it was just that 10.04 is not compatible with the recent boot-repair version. Good to know for further answers. Leave me a comment if you still have problems after trying boot-repair. – Byte Commander Mar 30 '15 at 13:42