My sister and I have HP laptops that are set up the same way. Here's how I did it for both of us with a dual-boot Ubuntu and Windows 7 system:
Step 1. Delete HP_TOOLS since its small and can easily be recreated on USB/DVD
The easiest solution is to delete the HP_TOOLS
partition, since it's usually only 100 MB or so and it can be easily recreated on a USB flash drive if/when you need it. Or you could back it up to DVD before deleting it.
- This approach is approved by HP Support, and you can download the
HP_TOOLS
installer for a USB flash drive from here
Step 2. Shrink the Windows C drive, and use Ubuntu installer LiveCD(or on USB) to create an extended partition there
Once you delete that partition, shrink the Windows partition to create free unallocated space for Ubuntu. You can do this from Windows (disk management), or from the Ubuntu LiveCD with gparted (use "Try Ubuntu..." when booting).
After that, you can use the Ubuntu Installer to create an extended partition in the freed-space, on which it will put all the Ubuntu (logical) partitions.
Note: You can use gparted to try to move the Recovery partition to the right or left to utilize the 100MB or so of space freed by the HP_TOOLS partition, but I don't recommend it unless you are really desperate for that much space, since the move can take quite a bit of time.
First, if Windows 8 was pre-installed on the computer, it probably used the GUID Partition Table (GPT), which does not suffer from the 4-partition limit of the older Master Boot Record (MBR) partitioning system. Therefore, I recommend you check your partition table type. You can do this from an Ubuntu live disk (or your installed Ubuntu, if you've gotten that far) by typing sudo parted /dev/sda print | grep Table
. (This assumes you've got just one disk; if you've got more than one disk, do the same for each one, such as /dev/sdb
, /dev/sdc
, and so on.) If the output reads Partition Table: gpt
, you're using GPT, and something other than the 4-partition limit is causing you problems; if it reads Partition Table: msdos
, then you're using MBR. All this said, your symptom certainly sounds like the MBR 4-partition limit, so I'll assume that's what you're encountering. (Windows 8 may use MBR if you installed it or re-installed yourself, especially on an older computer.)
In Linux, if you type sudo parted /dev/sda print
, you'll see your partitions. Primaries are numbered 1-4 and logical partitions are numbered 5 and up. The same is true if you use sudo fdisk -l /dev/sda
. In GParted, the same numbering applies, but you'll also see the representation in the GUI shows logical partitions contained in the pale blue extended partition. This is easy to overlook, but it's pretty clear once you know about it. Third-party Windows tools should make this clear, too, although I'm not familiar enough with any of them to give you details. Unfortunately, the stock GUI tools that come with Windows are as clear as mud about this, so I don't recommend you use them for this purpose. Also, do not use the stock Windows tools to create partitions, particularly if that would bring their number over 4; these tools tend to convert from a plain-vanilla MBR setup to a proprietary Windows format atop MBR, and that proprietary format is essentially unusable for Ubuntu.
As to converting partitions from one type to another, it is possible, using the fixparts
program that comes with Ubuntu in the gdisk
package. See its online documentation for details. (Note: I'm the author of FixParts.) The big caveat is that converting to logical form requires a small gap before each to-be-logical partition. Given your layout, you might need to slightly shrink the partition before your Linux partition to make this work. Some third-party Windows tools can also reportedly do this conversion, but I'm not familiar enough with them to give details. There is a Windows version of FixParts, too. Whenever you muck with partition tables, there's some risk of catastrophic data loss, so you should definitely do this only after backing up important data. That said, the primary-to-logical conversion is simple compared to some (such as partition resizing, especially resizing from the front of the partition).
Swap space is optional for most purposes. Today, it's most useful if you want to perform suspend-to-disk operations, in which case you need at least as much swap space as you have RAM. It's also useful if you've got relatively little RAM, and to help the kernel improve performance by allocating RAM efficiently. (It can swap out programs you haven't used in ages, freeing up the RAM for use by caches.) You can set up a swap file rather than a swap partition, if you so desire.
Best Answer
Windows only ever allows 4 primary partitions, because the phrase "primary partition" is only applicable to MBR partition tables and MBR partition tables only allow four primary partitions.
In the above screenshot it was clearly shown that you had 6 partitions which exceeds 4,so it's not MBR.
In GPT partition table (available since Windows Server 2003 on 64-bit versions of Windows) you can have up to 128 partitions and do not need to distinguish between "primary" and "extended" partitions.
So you can erase any one of the partition other than the Windows partition and install Ubuntu on it.