When a Windows installation already occupies the entire hard drive, its partition needs to be shrunk, creating free space for the Ubuntu partition. See How to Resize Windows Partitions to learn how to do this.
This can be done through Control Panel -> Administrative tools -> Computer Management -> Disk Management. You can then use the partition manager to shrink the partitions. As a side note, you can only create free space to the right of a partition.
If you have resized the windows 7 /vista partitions and cannot boot up windows, you can use the instructions from WindowsRecovery to fix it. Once free space has been created on the hard drive, it is easy to install Ubuntu as the second operating system (and it is done automatically) from the Ubuntu LiveCD. Allow the Ubuntu LiveCD to install to "largest available free space" (if you have left unallocated free space), or manually into a partition that you have already created for Ubuntu.
you want to install Ubuntu on a single partion Dual Booting, Select Guided – resize. In the New partition size area, drag the area between the two partitions to create your desired partition sizes. Click 'Forward. The Who are you? window appears.
