I have done this before several times with Ubuntu and Debian without problem on different computers. Up front I should say that resizing partitions creates a risk of data loss (mostly in the case of system failure). First I will cover the simpler case of dual-booting. The procedure I have used:
- Install Windows (from your question, this is already handled).
- Boot into live OS.
sudo apt-get install gparted
if it is not already installed.
sudo gparted
to run it. Resize a partition.
- Use gparted to make a partition with the empty space. Don't put a filesystem on it.
- Run Ubuntu setup, use empty partition that you created when asked. If you follow the default options for the bootloader, then it will install GRUB with both Ubuntu and Windows available. Every recent version of Ubuntu and Debian I've used will autodetect Windows 7 and add it.
About extented partitions:
I have run into a similar issue on the main desktop I use now. When I installed, it created a separate partition for swap space. And Windows uses a separate partition for its boot manager ("System Reserved"). That means all four primary partitions were used. I also wanted a data partition. The solution I used (and actually am still using):
I left the Linux install, swap space, and Windows "System Reserved" partition as primary. I know the System Reserved needs to be primary, but I left the others just to avoid needless copying. I know the large Windows partition can be a logical one on the extended partition, no problem.
If you have a fourth primary partition, you will need to delete it before you create an extended one. In my case, I used the dd command piped into gzip to copy an image of my Windows partition onto an external drive, then I deleted the partition, created an extended partition, then created partitions inside of the extended one for Windows and the storage partition.
IIRC, when you boot Windows the bootloader will not immediately find the Windows partition (since you moved it), but if you use the automatic boot recovery, it should find it. If you don't change the partition of System Reserved or the Linux boot partition, everything should be fine.
2
The community is really good about walkthroughs: have you Googled it? This seems to focus on the dual-booting aspects.
– new123456 – 2011-05-19T02:30:35.603I'd like to point out that it's ALWAYS a good idea to have a full backup of your hard disk, whether you're installing an OS or not. Remember, you don't have an effective backup procedure unless you also have an effective restoration procedure, making it much less risky to repartition your hard drive. – user55325 – 2011-05-19T02:53:03.163
1
There's a SE forum for ubuntu now, http://askubuntu.com/
– eduardocereto – 2011-05-19T04:00:11.923@new123456 I google for walkthrough, step by step walkthroughs, written posts about installation...I find something, but not as same like my problem. – kvizii – 2011-05-19T11:32:03.703
@ZlateWay It'll help us more if you can tell us how your issue is different from standard dual booting - multiple partitions? encryption? Your description in the other problem is a little brief. – new123456 – 2011-05-19T20:14:13.253
My partitions are in simple volume not primary. When I want to install Ubuntu, there are not 5 partitions I made earlier, but only two - 350 split to two partitions. And I don't know how to extend or make new partition via Ubuntu built in partition resizer via the installation... – kvizii – 2011-05-20T01:30:15.173
Start the live Ubuntu on the disk/usb and use gparted, a nice GUI partitioning program, to set up the partitions. – Rob – 2012-01-25T21:49:49.030