Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I messed up with my computer and need help.

Generally: install Windows 7 from USB.

Problem: "setup was unable to create a new system partition"

When first attempt to install Windows 7 failed I tried Linux live USB, installed distro to HDD, and erased all the existing partitions. Current state (fdisk -l): [writing from other computer so no copy and paste]

/dev/sda1   305GB   Linux
/dev/sda2   7GB Extended
/dev/sda5   7GB Linux Swam / Solaris

To create a new, NTFS partition:

fdisk /dev/sda
n (for new)
p (for primary)
3 (for partintion number)
"No free sectors available"

All the HDD was formatted couple of minutes before so there is a lot of free space but how to resize a parition?

I cannot find an option for resizing in man fdisk. Some people say I should use gparted but my distro doesn't not contain this package. And my distro doesn't support wireless drivers so I have serious problems with downloading stuff.

I tried also using cfdisk but any command results in:

"cfdisk bad primary partition 1 partition ends in the final partial cylinder"

I tried also removing partition 1 and then creating a new one (so there is no "no free sectors"). I'm receiving a warning:

"Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at the next reboot."

After restarting: grub rescue, no known filesystem

It may indicate that some changes have been made BUT when running Windows 7 installed some another error: Windows cannot be installed to Disk 0 Partition 1

More detailed: Windows cannot be installed to this hard disk space. Windows must be installed to a partition formatted as NTFS.

So formatting drive using Windows 7 installer

BUT this time yet another error: "Setup was unable to create a new system partition or locate an existing system partition. See the setup log files for more information"

Apparently I cannot access logs (how?) and I am back to drawing board with my live USB (this time showing partition as HPFS/NTFS).

Any suggestions how to install Windows 7? Should I reinstall Linux to HDD, erase existing partitions once again, and use Parted rather than gparted (parted is included in the distro). Or maybe should I create another bootable USB such as PartedMagic to painlessly create partitions?

I just want to install Windows 7 from USB, my laptop is semi-operational and I am ready to receive some help regarding fdisk and creating NTFS partitions.

UPDATE: I did as suggested (removed all the partitions) and tried to install in unallocated space. Tried to create a new partition and format it. Same error: "setup was unable to create a new system partition"

Came to the conclusion it may have something to do with TrueCrypt I have recently installed. Right now trying to FIX MBR (as I haven't got possibility to create rescue disc without optical drive)

share|improve this question
1  
I have no idea what was this question about... Generally: don't be on fire, don't play with encryption, MBR, etc :) –  Michal Stefanow Sep 10 '12 at 10:41
    
did you find a solution to your Problem? if so please post it and mark it as the answer or mark one of the answers already listed. it gives you some Reputation as well as the person who posted the answer. and helps other people when they stumble upon this question looking for a similar answer. –  Malachi Oct 19 '12 at 14:20

2 Answers 2

@kobaltz kind of hinted at this, but I am going to say it anyway:

  1. Save all the important data from the computer on removable disks
  2. Then format and install Windows 7
  3. After you have installed Windows 7 install Linux, it will make a partition for itself

I have never tried to install Windows on a Linux machine; I have installed Linux on a Windows machine though. You can set up the boot loader to automatically boot into one or the other or let you pick each time you boot up.

Addition

when Windows 7 is the only thing on the computer, Windows 7 doesn't give you a very big "window" to change the boot order. you have to stop the boot loader from booting straight into Windows. on startup I had to hold a key at a certain point so that I could get it to check a USB or CD for the install of Ubuntu. it will most likely be specific to your computer, which key you have to hold and when you have to press it. other than that it is a pretty easy process. I would Google some things about the different linux partitions and partition formats. as I did when I installed Ubuntu. I would give more info on it but it was over 2 years ago that I did this. now I have a dedicated Linux machine and on my Windows machine I am trying to uninstall Linux and return it to a Windows dedicated machine.

share|improve this answer

Is there a reason why you can't use Linux to delete all of the partitions. Boot Win 7 Installation from USB Drive, and then install normally? With no partitions, the Win 7 installer will allow you to create a new partition and automatically format it to NTFS plus a 100MB System Partition.

share|improve this answer

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.