I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.
How can I get Ubuntu back?
|
I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back? |
|||||||||||||||||||||
|
|
When you install Windows, Windows assumes it is the only operating system (OS) on the machine, or at least it does not account for Linux. So it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply Here's how:
If you cannot boot normally, and didn't do step 8 because there were no error messages, try again with step 8.
|
|||||||||||||||||||||
|
|
On EFI-based systems (such as most systems that shipped with Windows 8 or later), Windows will sometimes update its boot loader or reset it to be the default boot loader. This is particularly common when re-installing the OS or performing a major system update (upgrading to the latest Windows release, for instance). Note that Windows is unlikely to actually erase any GRUB files on an EFI-based computer. Everything needed to boot Ubuntu is still in place; it's just being bypassed. In these cases, a complete re-installation of GRUB is overkill, and in fact that carries a (small) chance that it will create new problems. Thus, instead of re-installing GRUB in these cases, I recommend resetting GRUB (or whatever boot loader or boot manager you prefer) to be the default. There are several ways to do this, including:
There are other variants on these procedures, such as using Note that none of the preceding applies to BIOS-mode installations; however, as most computers that shipped with Windows 8 or later boot in EFI mode, BIOS-mode installations are becoming increasingly rare, so in many cases it's better to deal with the issue in the EFI way rather than by blindly re-installing GRUB. |
|||
|
|
|
Just install Add New Entry > Linux/BSD > (select ) Grub2 > (push) Add Entry Then you can choose Ubuntu on the Windows 7 bootloader to go to Grub2 (previous bootloader). |
|||||||||
|
|
Windows does not see Linux formatted partitions. You need to use gparted from a liveCD and create a primary partition formatted NTFS with the boot flag. Some have had issues if the new primary partition is after the extended partition as Windows does not always reset partition table correctly. Best to have good backups and a separate backup of partition table. Backup partition table to text file & save to external device.
This is only for MBR (msdos) systems. If your Ubuntu install is in GPT partition drive you can only install Windows in UEFI mode or convert drive back to MBR (msdos). |
|||||||||
|
|
I never got in trouble by using these instructions: First of all, you must start your system from a live cd. Then
|
|||||||||||||||||
|
|
The Windows installer doesn't care about other OS in the system. So it writes own code over the master boot record. Fortunately the solution is easy too. You need to repair the MBR. Do the following Boot using a live usb/cd of ubuntu.
Use After booting with live usb/cd, run following command in terminal:
Use
More info - https://help.ubuntu.com/community/Boot-Repair |
|||||||||||||||||||||
|
|
There is now a simpler solution:
This has been tested on a Samsung Series 7 Chronos laptop dual booting Windows 8 and Ubuntu 13.10, secure boot disabled, UEFI and legacy boot enabled. |
|||||
|
|
Boot from a live Ubuntu USB pendrive or CD
and Open the terminal and run the following commands
After completing the installation you can launch it from System->Administration->Boot-Repair menu if you use Gnome, or search "boot-repair" in the dash if you use Unity. Then follow the following screenshots: Method 1
Press Apply and Reboot the system Method 2
|
|||||||||
|
|
Boot-Repair worked for me. It's very very easy to use graphical application, you do not need to use the command line, you only have to click a button :) All the available repair options are described in the Ubuntu documentation and there is a separate page explaining how to start Boot-Repair (by creating a bootable disk or installing it in an existing Ubuntu live disk) and how to use it. Just boot a Ubuntu live CD, install Boot-Repair and run it. |
|||||
|
|
When GRUB is broken, the user generally does not have access to systems, so repair must be performed from a live-session (live-CD or live-USB). There are many possible causes to a GRUB break: Windows writing on the MBR, DRM preventing GRUB from installing correctly, installer bug, hardware change... Updating GRUB as proposed initially by Scott is generally not sufficient, reinstalling GRUB as proposed by Marco is more efficient, but still there are various situations requiring other tweaks (adding options to kernel, unhiding GRUB menu, changing GRUB options, choosing the right host architecture...). Other difficulties for repairing GRUB is the use of chroot, and the choice of the right partitions /disks. All of this has been made easy in a little graphical tool: Boot-Repair. It shall be integrated in Ubuntu 12.04 CD for easier use, but for people needing it now, there are already some distros integrating it: Ubuntu-Secured-Remix (Ubuntu CD integrating Boot-Repair), Boot-Repair-Disk (CD running Boot-Repair at start-up), ... Hope this helps. |
|||
|
|
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?