Windows 7 setup can't create a new partition or locate an existing one | Joachim De Zutter
After the computer's power button is pressed, there's an error message and the operating system doesn't start.

When we boot from the Windows 7 installation CD to install Windows 7, Windows setup shows the following error:

"Setup was unable to create a new system partition or locate an existing system partition. See the setup log files for more information".

or

"We couldn't create a new system partition or locate an existing system partition. See the setup log files for more information".

To resolve the error the following steps work:

Use a bootable USB stick to start Ubuntu Linux without installing.

Press Ctrl+Alt+T to open a Terminal.

Use sudo bash to execute the following commands with root privileges.

Use fdisk to partition the hard disk where Windows 7 should be installed, for example fdisk /dev/sda

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
Now print the partition table with p.
Remove all unwanted partitions (if any) on the disk with d.
Create a new partition with partition type 7 (HPFS/NTFS/exFAT) with n.
Write the table to the disk with w.

Now format the partition for Windows 7 with for example mkfs.ntfs /dev/sda1

Now restart the computer and boot from the Windows 7 installation CD and Windows setup should not show the error message anymore so that the installation can proceed.