Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I got quite a problem for some time that prevents me from installing Ubuntu (finally). I got an ASUS laptop bought in late 2012, that came with Windows 7 pre-installed. I upgraded it to Windows 8 (due to low cost of it) and now , after booting Ubuntu (13.04 64bit) form usb, the installer cannot see my Windows installation - it only shows it, as it was free/unallocated space ( and it isn't). I tried using gParted to determine what's wrong, but I got an error with GPT partitioning system. Then I ran fdisk and later gdisk to see how it looks, but was afraid to advance (no chance to backup my data right now). With fdisk I got

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! 
The util fdisk doesn't  support GPT. Use GNU Parted.


Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xbfb81289

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      718847      358400    7  HPFS/NTFS/exFAT
/dev/sda2          718848   251660287   125470720    7  HPFS/NTFS/exFAT
/dev/sda3       251660288  1255428095   501883904    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1029 MB, 1029701632 bytes
19 heads, 50 sectors/track, 2116 cylinders, total 2011136 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc1550fc5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        1520     2011135     1004808    c  W95 FAT32 (LBA)

Then from gdisk I got :

ubuntu@ubuntu:~$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: present

Found valid MBR and GPT. Which do you want to use?
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: 

With 1 I get:

Your answer: 1
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 278A81DE-39C9-489D-BA00-947F39BE2D0E
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries 
Total free space is 209723053 sectors (100.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name 
   1            2048          718847   350.0 MiB   0700  Microsoft basic data
   2          718848       251660287   119.7 GiB   0700  Microsoft basic data
   3       251660288      1255428095   478.6 GiB   0700  Microsoft basic data

And with 2 :

Your answer: 2
Using GPT and creating fresh protective MBR.
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 91B5A850-8718-4D8C-AA48-4DA569E5BEAE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1465149101 sectors (698.6 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Any clues or ideas how to deal with this? Thank You in advance

P.S Sorry for long post...

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You've got an MBR partition table, but you seem to also have some leftover GPT data. My guess is that you had an EFI-based Windows 7 installation, but when you installed Windows 8, you wiped that out and installed in BIOS mode. Windows' partitioning tools are known to do an incomplete wipe of GPT data when converting a disk to MBR mode, so this seems plausible.

Fortunately, the solution is easy: Use FixParts on the disk. IIRC, this program is part of the gdisk package in Ubuntu; or you can download it separately, as described on the FixParts page. When you launch it, FixParts will complain about the stray GPT data and offer to erase it. Tell it to do so, then exit from FixParts by typing q at the main menu. When you launch the Ubuntu installer, the problem should go away.

One caveat about what follows: Be sure that the Ubuntu installer is booted in BIOS mode. If you launch it in EFI mode, it might try to install that way, and the result will be unbootable. Check the mode by dropping to a shell and looking for a directory called /sys/firmware/efi. If that directory is present, you've booted in EFI mode and should fiddle with your boot settings to force a BIOS-mode boot. If the /sys/firmware/efi directory is absent, you've probably booted in BIOS mode and it should work fine.

share|improve this answer
    
Thanks! That did it! And yes, my ubu was actually booted in EFI mode, so I changed it in BIOS and now I've got working dual-boot ;) –  ind00r May 15 '13 at 7:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.