0

After having some compatibility issues with some software on Ubuntu, I decided I should dual boot windows 7 so I can use that software. After booting from an Ubuntu live CD and partitioning off 100GB of my Ubuntu hard drive, I got this message from the windows 7 live cd when trying to install onto the blank partition:

Windows cannot be installed to this disk. The selected disk is of the GPT partition style

After doing some research, the only solutions I could find involve formatting the whole hard drive, which I can't do because I want to keep Ubuntu, and I have no where to put a 400GB backup

Result of sudo parted -l:

Model: ATA ST1000DM003-1ER1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  538MB   537MB   fat32                                 boot
 2      538MB   884GB   884GB   ext4
 3      884GB   992GB   107GB                   Basic data partition  msftdata
 4      992GB   1000GB  8468MB  linux-swap(v1)

(Number 3 is the partition I want to install to, so the reason it has no file system is because I deleted the partition while using my windows installation disk)

3
  • Post this and we can tell by your partitions if UEFI or BIOS install. sudo parted -l Windows only installs to gpt with UEFI and only BIOS with MBR(msdos). If booting in BIOS mode with gpt partitioning then the virtual install should be your first perhaps only choice. Softwre will run ok, but not particularly good for gaming. And whatevery you do figure out a good backup procedure. Hard drives fail, users make errors and things happen, you really need backups.
    – oldfred
    Apr 5, 2015 at 14:38
  • @oldfred I added the result to my question Apr 5, 2015 at 14:47
  • You have an UEFI install. So you either can install Windows in UEFI boot mode or virtual memory. If Windows 7 I believe you have to convert installer to flash drive and make a couple of minor changes for Windows & to boot in UEFI mode. How it boots is how it installs.
    – oldfred
    Apr 6, 2015 at 3:28

1 Answer 1

1

This is really a Windows issue, not an Ubuntu issue, but it does interact with Ubuntu, so it merits an answer.

Your first task is to figure out your Ubuntu boot mode. If the directory /sys/firmware/efi is present, you're booting Ubuntu in EFI mode. This is the best possibility for overcoming your problem. If that directory is not present, then you're almost certainly booting in BIOS/CSM/legacy mode, which could complicate matters. I'll take the simpler case first.

If you're booting Ubuntu in EFI mode, then the solution is to get the Windows installer to boot in EFI mode, too. I just did a Web search and found this forum post on the subject. I can't promise it's 100% accurate. If you have problems, try a Web search of your own or ask on a Windows forum.

If you're booting Ubuntu in BIOS/CSM/legacy mode, then you need to figure out if your computer is capable of EFI-mode booting. If it is, you can install Windows in EFI mode and then install an EFI boot loader for Linux (see below), thus getting both Windows and Linux booting in EFI mode. If the computer is BIOS-only, then you're faced with the need for more complex or ugly workarounds, such as:

  • Run Windows in a virtualized environment (such as under VirtualBox).
  • Convert the disk from GPT to MBR form (which you can do with gdisk, with some caveats), then install Windows in a conventional dual-boot configuration.
  • Create Windows partitions and then create a hybrid MBR that contains those partitions to keep Windows happy.

I've listed these options in more-or-less the order I recommend them, although details of your configuration and needs might change that order.

Note that when you install Windows, in any boot mode, it's likely to either partially overwrite GRUB or configure its own boot loader as the primary one. (Using VirtualBox is the only solution that will eliminate this risk.) Thus, I wouldn't invest much effort in making Ubuntu boot loader changes before installing Windows. The Boot Repair utility can fix many Ubuntu boot problems; but it's important that you boot the emergency disk that you use to run it in the same mode you use for booting your OSes (BIOS/CSM/legacy vs. EFI/UEFI). To control this boot mode, you may need to use your firmware's boot manager, and details of how to do that vary from one computer to another.

Another boot loader repair option, albeit only for EFI-mode boots, is to use my rEFInd boot manager. You can download the CD-R or USB flash drive version, boot from it, and boot into Ubuntu in EFI mode. You can then install rEFInd from its Debian package or PPA; or run Boot Repair and be confident you're doing it in EFI mode.

1
  • I found my Ubuntu boot mode is EFI, but the forum didn't help, and just asked me to do things I've already tried to do. I'm considering just dealing with how annoying playonlinux is, rather than installing a new OS, but I'll do some research anyway Apr 5, 2015 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .