2

So, I'm trying to set up a dual-boot of Windows 7 Ult 64-bit with Ubuntu on my computer. The computer has UEFI firmware and originally came with Win 8. It has a 16GB SSD and a 1TB HDD. I intend for Ubuntu to go on the SSD and Windows to remain on the HDD.

When I try to install Ubuntu, the installer does not detect the Windows partition. In addition, GParted does not detect the Windows partition, stating that there traces of a GPT partition scheme but no fake ms-dos on the hard drive. When I ran fixparts I got the same message, stating that there were traces of a GPT partition on the drive.

Now, despite the installer and GParted failing to read the HDD, when running Ubuntu off of a live disk, I can successfully access the Windows file system, read, and write files into it.

How can I get Ubuntu to correctly recognize the Windows partition? I do not have a Windows disk with me, so can't reinstall it.

Will removing the GPT destroy the Windows partition, or will it leave it intact and still bootable?

Alex
  • 45

1 Answers1

6

You need to remove the broken GPT. Run sudo gdisk /dev/sda and use the x command to enter the expert menu, then the z command to zap the GPT.

psusi
  • 37,551
  • Hang on though psusi, I'm getting a message from gdisk saying that "this operation is potentially destructive". I would really like to keep that Windows partition intact. – Alex Jan 09 '14 at 16:21
  • @AlexMundy, yes, you are destroying the GPT because you are using an msdos partition table instead, and whatever tool you used to repartition the disk did not understand GPT so did not remove it. – psusi Jan 09 '14 at 16:22
  • Is there a reason someone downvoted this? – psusi Jan 09 '14 at 16:40
  • 1
    As gdisk's author, I can say that psusi's answer is correct, at least assuming that I understand correctly that Alex Mundy has converted from GPT to MBR using Microsoft's tools. That said, do not accept the option to erase the MBR! A simpler and safer way to do this is to use FixParts; accept the option to erase the stray GPT data. I've upvoted this answer. IMHO, whoever downvoted it should undo that action. – Rod Smith Jan 11 '14 at 18:03
  • FixParts got it. Ubuntu now recognizes Windows and has put it in the GRUB. – Alex Jan 12 '14 at 13:39
  • I had similar problem, not an Windows partition, but ext4. The partition table was created while being attached to an Asus router running ddwrt few years ago. Had 256MB swap, and remaining 140+GB of ext4. Ubuntu disks saw the swap and ext4 just fine, but gparted saw it as entire swap space. Running gdisk said Found invalid GPT and valid MBR; converting MBR to GPT format in memory. I went ahead and accepted gpt by pressing w and it worked! Thank you @RodSmith for the great work! – Adarsha Jul 29 '19 at 03:10