Page 1 of 1

Can't create a partition for windows 7

Posted: Mon Sep 10, 2012 6:33 pm
by lamprecht
I'm trying to install windows 7 (I need it for a class) and I want to partition my HD. I downloaded GParted but it wont let me do anything to the major partition unless I unmount it, and it won't let me unmount it. What should I do?

Image

http://i.imgur.com/WdT4H.png

Re: Can't create a partition for windows 7

Posted: Mon Sep 10, 2012 8:45 pm
by Reorx
Boot Linux Mint from a live medium - preferably a USB flash drive. Gparted will be on the medium. Start it and it should be able to do anything you want with the partitions on your HD.

Caveats >>> ALWAYS back the data on a partition before manipulating the size of that partition.

NOTE WELL >>> Installing windows will break GRUB (your MBR will be overwritten by Windohs). Learn how to re-install GRUB correctly (after the borkage) before you break it! This thead in the newbie section should describe the fix in detail >>> http://forums.linuxmint.com/viewtopic.php?f=90&t=112204

Enjoy!

P.S.: What distro are you running?

Re: Can't create a partition for windows 7

Posted: Tue Sep 11, 2012 6:00 pm
by HughT
hi lamprecht, note that it's best to install Windows on the first partition sda1, by default the Windows bootloader assumes it'll find Windows there. Then install Mint on another partition, making sure you put grub on the disk's master boot record ie sda, rather than on the partition boot record. Then grub will identify that Windows is sharing your hard drive and will make it an option on the grub menu when you boot. regards

Re: Can't create a partition for windows 7

Posted: Wed Sep 12, 2012 6:14 am
by oobetimer
HughT wrote:hi lamprecht, note that it's best to install Windows on the first partition sda1, by default the Windows bootloader assumes it'll find Windows there.
That is not necessary. Windows needs one primary partition, which can be sda1, sda2, sda3 or sda4 for example, which can be on the end of disk also.

PS. Windows 7 needs two partitions (boot and C).

Re: Can't create a partition for windows 7

Posted: Wed Sep 12, 2012 6:52 am
by AlbertP
Windows 7 creates two partitions by default if you let it install on empty space. But if you let it install on an existing NTFS partition it does not create a boot partition.
At least on BIOS based systems this is the case. It may be different on UEFI.

Re: Can't create a partition for windows 7

Posted: Wed Sep 12, 2012 7:56 am
by mintybits
lamprecht wrote:I'm trying to install windows 7 (I need it for a class) and I want to partition my HD. I downloaded GParted but it wont let me do anything to the major partition unless I unmount it, and it won't let me unmount it. What should I do?
To summarize what's already been said:

Unlike with Windows linux partitions cannot be resized if they are mounted (in use). So you have to boot a different linux to run Gparted such as a live CD/USB.

Shrink sda1 to make an unallocated gap for Windows to be installed to. You must not already have 4 primary partitions. You need to make the gap at least 20GB in my experience, preferably >30GB. WIndows sometimes makes 2 partitions but doesn't have to...let it decide.

The WIndows installer will reset your MBA boot code to the standard one. If you want to use Grub's you'll need to boot the live CD/USB again and re-install it to the MBR:

Code: Select all

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
Then once you've booted Mint, run

Code: Select all

sudo update-grub
to add Windows to the Grub boot menu.