Ubuntu does not recognize existing Windows partitions in a GPT disk
I just built a new computer and installed a clean copy of Windows 7 Home Premium (64-bit) on it. Other than verifying that the Windows install completed successfully, I have done absolutely nothing else to the computer. I now want to install Ubuntu 13.04 on the same machine in a dual-boot setup. However, the Ubuntu installer starts out by giving me the message
This computer currently has no detected operating systems.
followed by the single option
Erase disk and install Ubuntu
I expected it to say that it detected an existing Windows 7 installation and ask me if I wanted to get rid of it or keep it as a dual-boot.
I've checked out a few existing AU questions on this topic (Ubuntu 13.04 not detecting Windows 7 during Install; "This computer currently has no detected operating systems" when installing; Ubuntu 12.10 install don't recognize Windows 7; Ubuntu 12.04 installer does not see Windows already installed on my computer) and they all seem to lead to the same two conclusions:
- use
fixparts
- use
gparted
When I tried to use fixparts
, the system told me it was the wrong tool, with the output
$ sudo fixparts /dev/sda
FixParts 0.8.7
Loading MBR data from /dev/sda
This disk appears to be a GPT disk. Use GNU Parted or GPT fdisk on it! Exiting!
I think gparted
is a non-option for me because I want to dual-boot and — to the best of my understanding — it would wipe out the Win7 install. However, I did open it up just for inspection purposes. Here's a screenshot of everything I did:
For what it's worth, the hard drive itself doesn't seem to be corrupted; I can open it up in Ubuntu and see all the Windows files and directories there that I expect. (It's the middle right window in the screenshot.)
What else can I do here to get Ubuntu to install side-by-side with Windows?
Solution 1:
Ha!! Thanks a lot for this answer! When I wanted to install Ubuntu 13.04 alongside Windows 7, I had the same problem - Ubuntu's installation wouldn't recognize that Win 7 was installed, so it never offered the possibility to install Ubuntu alongside Windows.
Trying to troubleshoot, GParted recognized the HD as 1 non-allocated space. This is even though Ubuntu 12.10 was installed (but corrupted because of an update, which was the reason for upgrading to 13.04 in the first place...)
Bottom lines:
By using Window 7's diskmgmt.msc I recreated free space where Ubuntu 12.10 was originally installed.
I ran the 13.04 installation - and boom! Ubuntu recognizes Windows - I see the option to "Install Ubuntu alongside Windows 7". FYI, Ubuntu installation overtook all the un-allocated disk space automatically, and also allocated SWAP space.
When rebooting I faced another problem - instead of Ubuntu 13.04, I was still seeing Ubuntu 12.10... This was clearly a grub problem.
To solve this problem, I used the default instructions for BootRepair: Found here: https://help.ubuntu.com/community/Boot-Repair
5. Hallelujah !! ;)
Solution 2:
I worked around this by taking a detour into Windows and playing with partitioning. After rebooting into Win7, I opened up the Windows Disk Management utility (diskmgmt.msc
). The system was still set up to use basically the entire disk as one giant Windows partition (AKA the C:
drive). I used Disk Management to chop off a 120GB segment, left it as "unallocated space" and rebooted.
(Actually, I then went back and reformatted it as NTFS, but in retrospect, I believe that that was unnecessary.)
At that point, I reopened the Ubuntu installer. The installer still didn't recognize the existing Windows install, but it did offer a "Something else" option (screenshot at debianadmin.com) of making custom adjustments to partitions. I selected that option and found the 120GB partition I created in Windows, and selected it as the partition in which to install Ubuntu.
The installer then gave me the error
No root file system defined.
Please correct this from the partitioning menu.
Some quick searching for that error message led me to an AU answer with a helpful screenshot that I won't repeat here.
After that, I got yelled at by the system for trying to use NTFS — a no-no, according to Ubuntu's Linux Filesystems Explained wiki — and for not setting any swap space — again, see Ubuntu's excellent wiki — but after I switched to Ext4 and carved a 5GB swap area out of the 120GB partition, installation proceeded without a hitch.