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
  • 2
  • 6
  • possible duplicate of [Only 'sdb' shows up when installing 12.04 on a new Dell inspiron 14z](http://askubuntu.com/questions/190689/only-sdb-shows-up-when-installing-12-04-on-a-new-dell-inspiron-14z) – user68186 Jan 09 '14 at 14:16
  • @user68186, not related to that question. – psusi Jan 09 '14 at 16:04
  • @psusi OK. I have retracted the close vote. Intel SRT does show up as RAID0 in Ubuntu and causes problem with HDD recognition. So the question listed in my previous comment may be relevant. If not, I will be happy to delete the comment above. – user68186 Jan 09 '14 at 16:35
  • If the computer came with UEFI hardware and was running Windows 8, then it would by default be using a GPT partition table. If so then removing the GPT would break Window 8 boot. In order to fix the problem it would be helpful to see the output from "fdisk -l -u" and "gdisk -l". – Curtis Gedak Jan 10 '14 at 18:09
  • @CurtisGedak, hi Curtis. He said he got rid of Windows 8 and put 7 on, which explains why it's been switched back to msdos partition table. – psusi Jan 11 '14 at 20:12
  • bt where should i run this command if I m installing fresh ubuntu –  Apr 28 '14 at 10:17
  • on terminal (ctrl+alt+t) – Avinash Raj Apr 28 '14 at 10:26

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,033
  • 2
  • 68
  • 106
  • 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