Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Cannot install Windows 7 over a Debian install

27 May 2014   #1

Debian 7 x64 Jessie Distribution
Cannot install Windows 7 over a Debian install


I work in an office center that mainly uses Linux, particurlaly a Debian x64 distribution. The way the hard drive is partitioned (1 TB hard disk) is 30 GB for root, 1 GB for swap and 929 GB for the home directory. I repartitioned the home directory in two chunks of aprox 400 GB, so as to make room for a Windows installation, because certain programs require it.

So I wanted to do it, so that the machine became a dual boot PC. When I try to install I get the following options in the "Where do you want to install Windows?" Screen:

Disk 0 Partition 1 27.9 GB 0.0 MB System
Disk 0 Partition 2 488.3 GB 0.0 MB Logical
Disk 0 Partition 3 414.4 GB 414.3 GB Logical
Disk 0 Partition 4 953.3 MB 0.0 MB Logical

Partition 3 is where I want to install. I've deleted it and clicked on format multiple times. However I always get the message: Setup was unable to create a new system partition or locate an existing system partition. See the Setup log files for more information.

I do not know what this means or how I can see those log files.

I don't want to do a clean install because the machine already has valuable information that should not be lost.

Any help would be greatly appreciated.

My System SpecsSystem Spec
27 May 2014   #2
Microsoft MVP


Win7 can be installed on a Logical partition but only if a Primary is available for housing the boot files and executing the boot. If you have Linux on the Primary it likely is not allowing this. I'd make your target space for Win7 at the end of the drive so you can create it to be Primary, using the booted Win7 installation media first to try creating and formatting during install from Unallocated Space (Free Space must be deleted again in Disk Mgmt to become Unallocated Primary), or if necessary use System Recovery Options Command Line DiskPart Command-Line Options to "Create Partition Primary" there.

Otherwise you can use Partition Wizard boot CD to Create Partition with Partition Wizard - Video Help to create a Primary partition at the end of the drive since there can be three Primary and unlimited Logical but the Logical must be contiguous.

If this fails you may have a conflict with GRUB. You can try uninstalling it but in the past especially with GRUB1 we have had to wipe these drives with Diskpart Clean Command to clear the partition table and boot code to overcome GRUB corruption.

If it succeeds here is a way to Dual Boot - Windows 7 and Linux - Windows 7 Forums
and an alternative Dual boot Ubuntu-Win7
My System SpecsSystem Spec
27 May 2014   #3

Debian 7 x64 Jessie Distribution

Thanks for the advice.

I tried to do what you told me but couldn't. Here is what I did. I used this page as I had no idea how to use diskpart:

I went in to the console.
The commands list volume
Lists two volumes the DVD Rom and a 414 GB NTFS partition assigned the letter C. I select the disk (0) and the volume (1) and try the create partition primary size=400000 command. I get the really long message error

"No usable free extent could be found. It may be that there is insufficient free space to create a partition at the specified size and offset. Specify different size and offset values or don't spcify either to create the maximum size partition. It may be that the disk is partitioned using the MBR disk partitioning format and the disk contains either 4 primary partitions (no more partitions may be created), or 3 primary partitions and one extended partition, (only logical drives may be created)" As far as I can tell neither of these options is my case.

The list partition command lists the following: (The columns are Partition, Type, Size, Offset)
Partition 1 Primary 27 GB 1024KB
Partition 0 Extended 903 GB 27GB
Partition 2 Logical 488 GB 27GB
Partition 3 Logical 953 MB 516GB
Partition 4 Logical 414 GB 517GB

y did select partition 4
and I got: Virtual Disk Service error: The specified partition type is not valid for this operation.

I've tried almost every variation I could think of and I got one of those two errors.

Am I doing something wrong? By the way the grub being used is grub2.

Thanks for your reply.
My System SpecsSystem Spec
27 May 2014   #4
Microsoft MVP


Did you miss that you must delete the empty Win7 target partition down to Unallocated space before creating a Primary partition there?

Use Paartition Wizard CD to Resize your data partition to the left so the space for win7 Primary is at the end of the drive. Then create a new Primary partition there with PW and Modify>Set to active to make sure Win7 knows that's where you want it's boot files. Video in my last post
My System SpecsSystem Spec
28 May 2014   #5
Microsoft MVP

Windows 7 Ultimate SP1 X64 (Windows 10, 8.1, Linux Mint, Windows XP and others in VM)

You also have the option to use VMware player and install it as a virtual machine. This is a tutorial of installing Zorin in a VM with VMware player, but windows can be installed the exact same way, you just may have to allocate more resources to it than Linux, but it works just fine. VMware Player - Install and Setup Zorin
In your situation you would just download VMware player for Linux. It is free for personal use.
My System SpecsSystem Spec
28 May 2014   #6
Microsoft MVP


Good suggestion, Steve. This would allow him to wipe the HD to clear GRUB, Clean Install Windows 7 to the preferred left side of drive for faster reads/writes.
My System SpecsSystem Spec
30 May 2014   #7

Debian 7 x64 Jessie Distribution


First thing. I'm not sure if Virtual machine was an option because the programs needed to be installed needed to download programs through USB port to certain development kits. The support for Linux for drivers and stuff is very limited for our kits.

Second, I was able to do it. I used Partition Wizard as indicated. The key was that Partition Magic (and not GParted which was what I was using) allowed me to mark the partition as Primary. I also moved the partition to the end of the drive as suggested.

Then Windows was installed. Obviously, the machine would only boot windows from then on. So what I did, is I downloaded SuperGrub2 Live CD and simply used it to boot the Debian installation. Once that was done, I was just a matter of reinstalling grub2 from the command line and then running: dpkg --reconfigure grub-pc, and That is it!!

The machine is now dual boot and no previous information was ever touched.

Thanks for all the help!
My System SpecsSystem Spec
30 May 2014   #8
Microsoft MVP


Glad you got it sorted out but beware that Partition Magic is not compatble at all with Win7 and can cause problems. We prefer Partition Wizard which is why I suggested it.
My System SpecsSystem Spec
30 May 2014   #9

Debian 7 x64 Jessie Distribution

jaja Yes!! I'm sorry!!! In my defesense they are similiar...... jajaja. Edited the post!
My System SpecsSystem Spec

 Cannot install Windows 7 over a Debian install

Thread Tools

Similar help and support threads for2: Cannot install Windows 7 over a Debian install
Thread Forum
Solved Windows update fails to install IE10 after repair install Windows Updates & Activation
How to create install disks from an install of Windows 7/Recovery Part General Discussion
windows 7 wont complete install. restarts install or bsod Installation & Setup
Windows 7 Install Disc fails to see hard disk after Ubuntu install Installation & Setup
Boot config not working, tried clean install, can't install windows 7 Installation & Setup

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:57 PM.
Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App