Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have Windows XP installed on C: drive and Windows 7 installed on F: drive. I want to install Ubuntu 12.04 along with Windows (keeping both XP and 7) in drive G: without losing any data stored in the computer. I have a hard disk of 500 GB size with C: (14.8 GB left), D:, E:, F:, and G: (15.7 GB left). I tried to install Ubuntu 12.04 from DVD and getting stuck at the time of selecting partitions.

How do I select the device for boot loader installation? Will the installation of Ubuntu into G: drive affects the data stored in the hard disk or in G: drive especially? After installing Ubuntu can I use Windows XP and Windows 7? This is my first attempt to use Ubuntu. Can any body help me please?

share|improve this question
    
Hi beanaroo. I found your suggestions extremely useful. Now I have a small problem. How to change the primary boot drive? I have installed Ubuntu as mentioned above. During installation I encountered a problem. I was intended to install Ubuntu in G drive. But while using GParted, it shows that G drive is not an extended partition. We can create 2 new partitions in an extended partition only. So I found my E drive an extended partition and installed Ubuntu in it. Now I can Boot in to Windows XP and 7. How to change the primary boot drive so that on booting I can enter in to XP, 7 or Ubuntu? –  Anand A J Apr 11 '13 at 7:31

2 Answers 2

up vote 3 down vote accepted

Kevin provides a good explanation of the different options. For your scenario I would make the following suggestion:

This isn't always required for installing Ubuntu but because you have a busy setup going on, we wanna fine tune our partitions before starting the setup. Just so we can be sure of what's gonna happen with our data and drives and partitions etc.

Boot your Live USB/CD into "Try Ubuntu" mode:

  1. Open a program called GParted
  2. Select your G: Drive in the top right corner, in this case it will be named according to Linux methodology. Something like /dev/sde
  3. Resize until you have the 15GB free space Unallocated
  4. Create a 2GB partition as Swap. Learn more here
  5. Create a partition in the remaining space as ext4
  6. Remember to Apply the changes!

During the Installation process (called Ubiquity), at the partitioning step:

  1. Select Something Else and click next.
  2. Then double-click the prepared ext4 partition on your intended drive for mounting "/". We call this the root structure, the entire file system falls under this. Just like a C: drive in Windows. You can tick the format box if you want even though we just did it.
  3. The swap partition should automatically be detected, you can double click to check if it's "used as swap area".
  4. The bootloader can also go on the 'G: drive' so we don't have to bugger up the windows bootloaders. Underneath the partitions, in the dropdown, select /dev/sde or whatever this one may be.
  5. Continue installation.
  6. IMPORTANT: When restarting, open your BIOS and select your G: drive as the primary boot drive so that it loads the linux bootloader (Called GRUB) before the Windows ones. Grub allows you to select which operating system you want to boot (Dual/Triple boot) and will use Ubuntu as default, you can always change this using grub-customizer

Now we should have installed Ubuntu alongside the rest without messing with the other drives or their operating systems.

Let us know if this worked for you! Good Luck!

share|improve this answer
    
one question I have in mind... Windows 7 allows at the most 4 primary partitions, out of which 2 are used by windows 7 one for boot(around 100mb) and other for installing windows, similarly windows XP will take a primary partition, now you need a primary partition for ubuntu + swap. My question is can you do it successfully if you have only one disk drive. –  AurA Feb 21 '13 at 14:33
1  
Hi, AurA, the 4 primary partition limitation is due to MBR table. With GPT you can have more than four but I believe this technology is restricted to computers with UEFI enabled. Either way I always partition my drives before installing OS's. Windows 7 can still operate off one partition. So after creating 1:swap 2:root(ext4) 3:home(ext4) 4:windows(NTFS) with gparted on a live CD/usb, I can install Windows 7 to the last partition without having to format again during setup. –  beanaroo Feb 23 '13 at 2:22
    
thanks, I actually did just the opposite, I used to install windows first and partition my drives at that time only, because windows will replace grub bootloader and I it would save my effort of restoring grub. –  AurA Feb 24 '13 at 5:39
    
It's not the opposite :) I was a bit unclear. I always partition with a live linux cd first. Then install windows. Once it's up and running, install linux and let it overwrite the bootloader. The first part isn't really necessary, I just like being in total control of my disk space. –  beanaroo Mar 29 '13 at 23:26
    
Hi beanaroo. I found your suggestions extremely useful. Now I have a small problem. How to change the primary boot drive? I have installed Ubuntu as mentioned above. During installation I encountered a problem. I was intended to install Ubuntu in G drive. But while using GParted, it shows that G drive is not an extended partition. We can create 2 new partitions in an extended partition only. So I found my E drive an extended partition and installed Ubuntu in it. Now I can Boot in to Windows XP and 7. How to change the primary boot drive so that on booting I can enter in to XP, 7 or Ubuntu? –  Anand A J Apr 11 '13 at 7:30

You can install Ubuntu alongside Windows XP and Windows 7 just fine. Assuming you're trying to go the easiest route, boot from your Ubuntu LIVE CD/USB and select "Install Ubuntu".

In the very early steps it will ask you what you want to do:

  • Install Ubuntu Alongside [existing Operating System/s]. This will replace Windows MBR bootloader with GRUB/GRUB2 bootloader.

  • Replace [existing Operating System/s] with Ubuntu (this will format your entire drive and install Ubuntu). Like above, this will include the GRUB/GRUB2 bootloader.

  • Something Else (this is for if you have created a partition explicitly for Ubuntu with the appropriate file format [ext4] and want to install Ubuntu here). This is a bit trickier though because the installer will expect the drive to be bootable.

You'll be presented with a menu [GRUB/GRUB2] during the boot process (as long as there is more than one Operating System present) that will allow you to choose which operating system you want to start up from.

Hope this helps with your question.

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.