Ubuntu – Installing Ubuntu along with windows 7 on shrunk partition

bootdual-bootinstallationwindows 7

I am new to Ubuntu OS and ask Ubuntu community. First this is not a duplicate question. Actually this a question which is a summery of all solutions and questions were posted in this community, related to Install Ubuntu along with Windows 7.

I have bought a new Hp laptop with its original windows 7.I want to install Ubuntu along with windows 7 64 bit. I ran the Ubuntu 12.4 Desktop installation CD. But Ubuntu installer doesn't show the "along with windows 7 option"only it is showing two options. I read some questions and answers posted on this community. Specially following link

Ubuntu 12.04 installer does not see Windows already installed on my computer

I tried following thinks,

  • I ran the terminal in live CD and tried sudo dmraid -rE command and dmraid remove command .But terminals says there is no dmraid partitions.

  • So I tried another scenario checked my partitions with g parted.There are some partitions labeled C,HP tools,Recovery and System. C is containing windows 7 Files.

  • So I shrank the volume of C Drive.

  • Now I have 50000Mb of unallocated disk. I tried with Gparted to create a partition on that allocated space.It says some thing that you can't create more than four primary partition.Of course all other four partitions were created on widows are actually type of primary partition.

  • So I went back to Windows 7 and tried to create a new volume on unallocated space.But unfortunately it says,If i create a new volume it will be the type of Dynamic partition.It says we cant boot another OS from that partition. So i cancelled that step.

Now i have 50000Mb unallocated space but how can i install Ubuntu on that partition without harming the existing Windows 7? Because still I have only two options:

  1. Erase and install Ubuntu.
  2. Try something else.

(I can see my unallocated space by going to "something else" option.)

Best Answer

I have just lived through this!

Consider what I have done as an unfinished test. I don't really know (and may never need to know) if what I did will work for me in all situations.

Steps:

  1. I created the HP/Win7 back up DVDs. I think you will need 5 DVDs to do this. There were 4 primary partitions on my HP HDD. I think they were the BOOT(small), MAIN(huge), BACKUP(not big) & HPTOOLS(small) partitions. I am lead to believe that the software to create the DVDs is in the HPTOOLS partition. And that the DVDs are a copy of the BACKUP partition. But I could be wrong about that last point. Regardless, HP will only let you create (at least they say so when you do the backup) 1 set of DVDs per laptop. By all means do this. It only costs you your time and 5 DVD.

  2. At this point I felt I could do away with either the BACKUP partition or the HPTOOLS partition. I chose to delete the HPTOOLS partition even though the placement of the undeleted BACKUP partition meant I would not be able to use about 5% of the HDD. As an added precaution, I did a disk dump of the HPTOOLS partition to an ordinary file in the Win7 partition. The "dd" (disk dump) application is an old Unix command. I was booted up in the Ubuntu Live CD under "try it" when doing this backup.

  3. After the precautionary "dd" I deleted the HPTOOLS partition. I believe this was primary partition number 4 (of 1 to 4).

  4. While booted up in Win7 you should probably run the de-fragmentation application on your Win7 partition. Make sure the disk is empty enough to be shrunk to the desired size.

  5. I used gparted to shrink my Windows 7 partition. The Ubuntu installer might be able to do this as well.

  6. Now the Ubuntu installer should offer up the option of installing Ubuntu "alongside" Win7. Before, with 4 primary partitions already on the HDD, the Ubuntu installer only offered me to install Ubuntu "into" the Win7 partition.

That got me to being able to dual boot my new HP laptop.