I'm desperate. I have windows 7 home premium installed on my notebook and I decided to install ubuntu as usual. Nevertheless, I had several problems with the graphic card while installing and I got some problems and I couldnt run ubuntu properly, so I decided to uninstall ubuntu by formatting the partition and joining it to my data partition (where it originally came from). Afterthat, I cannot enter into any OS. Not even from the BIOS. But the partitions are there. There is no way, I have tried a Windows DVD to repair boot, but no repair option is offered just installation, also I tried "lilo" as this post said.
I tried Super Grub Disk with no luck. Even Boot-Repair from a live-CD where I could just obtain a report.
What can I do? I just want to have my windows boot as usual and then I will try again the linux installation. But I need to come back to my windows boot.
what I get when I boot is:
error: no such partition.
grub rescue> _An ls here get this:
(hd0) (hd1) (hd1, gpt5) (hd1, gpt4) (hd1, gpt3) (hd1, gpt2) (hd1,gpt1) (hd2) (hd2,gpt2) (hd2,gpt1)It is a new computer (asus ux32vd) and the ubuntu version I deleted was 12.10. I don't want to reinstall Windows because i'll lost my license key. I don't know what else can I do.
45 Answers
MttJocy is partially correct, but there's a twist: The computer clearly uses the GUID Partition Table (GPT), which in turn means that Windows was almost certainly installed to boot in Extensible Firmware Interface (EFI) mode. On an EFI computer, GRUB doesn't install to the MBR; it installs to the EFI System Partition (ESP), which is a FAT partition that holds boot loaders. The ESP is usually the first partition on the disk. Furthermore, on an EFI computer, boot loaders normally register themselves with the firmware via an NVRAM entry. The firmware launches boot loaders based on the order in which they appear in the NVRAM. In your case, GRUB is still present in the ESP, and its NVRAM entry is still present, but GRUB's configuration files resided on a Linux-only partition and so are now inaccessible, rendering GRUB essentially useless. (IMHO, this is a bug in Ubuntu's configuration; it should put the GRUB configuration files on the ESP, not in Linux's /boot partition, to avoid precisely this problem.)
In any event, there are at least two solutions to this problem:
- You can delete GRUB from the ESP. To do this, you'll need to boot an emergency system, access the ESP, and delete the EFI/ubuntu directory on that partition. With GRUB gone, your firmware will move on to the next item in its NVRAM boot list, which will probably be Windows.
- You can adjust your NVRAM entries using a tool such as Linux's
efibootmgr. To do this, you'll need to boot with an EFI-mode Linux emergency disc (the Ubuntu installer in "try before installing" mode should work, but you'll need to do asudo apt-get install efibootmgrto install the tool). You can then do anefibootmgr -vto see the NVRAM entries and then use the-ooption to set the Windows boot loader first in the list, as inefibootmgr -o 0001if the Windows boot loader isBoot0001.
These methods both assume that the Windows boot loader is still intact and that its entry still exists in NVRAM. If not, you'll have to use Windows-specific tools to re-install the Windows boot loader or to restore its NVRAM entry. The Windows installation disc should be able to do the job, but I'm not very familiar with details of its operation.
3The problem here will be that while grub itself is still present and functioning in the MBR when you formatted the partition you wiped out /boot which contains alongside the linux kernel images your grub configuration which it needs to produce the menu etc.
You could try manually specifying the partition of your windows install to boot and see if that works for you, as an example:
boot (hd0)Replace hd0 with the disk and partition where windows is installed hd0 is the first HD, hd1 the second etc, partitions are numbered similarly. If that doesn't work only thing that comes to my mind would be to run the ubuntu install again it will install a new bootloader configuration for you, not ideal if trying to remove ubuntu but it would work.
Further if you use the ubuntu partitioner to create a separate /boot partition needs only be around 100MB or so, probably less it would then be possible to remove the main install partition without disturbing the bootloader configuration.
1You could always download and use Resc-a-tux.
This is a live cd with a primary goal: Restoring grub/installing grub. It's a nice program which I used after windows just removed my grub without asking, and it worked like a charm. But in your case, you are installing Grub to boot windows, which isn't a problem at all. Just press restore grub, and it will make a bootloader for you.
3Rescatux features:
Fixes GRUB and GRUB2
Regenerates Debian/Ubuntu grub menues
Check and fix filesystems
Fixes Windows MBR
Blank Windows passwords
Boot Info Script
Change Gnu/Linux password
Regenerate sudoers file
Extra tools:
Synaptic
Gparted 0.7
This is a common problem with Windows - UEFI - Ubuntu(Linux) - GPT.
I never had UEFI so never managed to fix it my own , just read lot of threads about it.
Here is an example with similar problem to yours from Windows-seven forums .Also lot of threads exists at UbuntuForums.org
I have not an easy solution , but just a thought. Try to boot in to your BIOS configuration page and change the Option boot-order first from MBR. (and not UEFI) Then try to repair again with Windows Repair CD.
1A simple, graphical tool that just fixed grub2 for me is "boot-repair". This article on HowToGeek has the full scoop (as well as a description of the non-graphical option), but the simple steps for me were
- Boot into Live CD
Launch Terminal and run:
- sudo add-apt-repository ppa:yannubuntu/boot-repair
- sudo apt-get update
- sudo apt-get install boot-repair
- boot-repair
Click the "Recommended repair" button
- Restart
...booted me right into Windows 7.