Many HP Laptops come with all 4 primary partitions occupied. To install Linux, more partitions must be created in addition to those already used partitions.
My Laptop has the 1st partition labeled “SYSTEM” in NTFS, and marked bootable. The 2nd partition is also in NTFS format but without a label, it holds the C: drive for windows. The 3rd partition is labeled “RECOVERY”, in NTFS format, and holds the HP Recovery image. The 4th partition is with label “HP_TOOLS” in FAT32 format, and is used for running HP diagnosis.
Some people suggests to remove the bootable SYSTEM partition, then use the Windows repair CD to repair C: and make it bootable. Some others suggest to remove the “HP_TOOLS” partition and create new partitions off the table entry of the 4th partition. After some thinking I decided not to touch the original disk layout. Instead, I changed the 2nd partition into an extended partition, moved the content (disk area) of the original 2nd partition into a logic partition, and created new partitions on the unused space from it.
Steps to Repartition
Boot into SystemRescueCD. You may download and burn the CD, boot from the CD, or create a USB stick to boot into.
Use “sfdisk -l -x -uS /dev/sda” to see the starting and ending sectors of all the partitions. Write those numbers down. Since the unit is in sectors, a number of 2048 means 1024k bytes (a k is 1024). You should notice the partitions are all at 1M (1024*1024) bytes boundary.
Run “gparted” in GUI to shrink the first partition by 1MiG (1M). Now again use “sfdisk -l -x -uS /dev/sda” to see that the first partition has been ending 2048 sectors earlier than before.
Now, use “fdisk” to delete the 2nd partition for C:. Create an extended partition that starts 2048 sectors earlier than before and ends the same as before. The partition table of this extended partition will be held at the last 1MiG disk area of the original 1st partition, this 1MiG is available now because we shrunk the 1st partition by 1MiG.
Create a new logic partition of NTFS format inside the extended partition, and make sure it starts and ends at the same sectors as original C: partition was. Since this partition points to the exact original C: disk area, it will contain the content of C:. Merely creating and deleting a partition only changes the values of a partition table entry, it does not change the content of the disk area for the partition, thus now we’ve got the original partition of C: back as an extended logic partition.
Boot into windows, and it will detect the change of partition tables and search for any inconsistency on the disks. Wait till it finishes. Everything should work just the same as before.
Boot into SysRescueCD again, shrink the partition for C: by the amount you like to release to the new Linux installation. Boot into windows so that it checks the disk again and make sure it works well again.
Now, create new partitions for Linux and install the Linux of your choice to the new partitions. All done!