1

I tried to install Ubuntu 14.04 into my laptop which already has got windows 8 installed in it. I had a 30GB free space and I allocated 29 out of that 30 as primary partition for Ubuntu. I wanted to use the remaining 1GB as my swap area. But once the partition for Ubuntu installation is created, the rest of the free space became unusable.

I searched through the web and realized that I have already got maximum number of primary partitions in my HDD. Now I need to know that,

  1. How to know whether a particular partition is a primary one or a logical one(In this case, I would appreciate if you can provide me a way to know that in Windows environment.).
  2. Can I convert the partition type into logical from primary?
  3. If partitions can be converted into logical from primary, how to do so?
  4. Will it harm my files in the particular partition?
  5. Finally, If I have a big enough RAM, Do I need to create a swap area.?
3

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.

  • This is a good one +1 – Pilot6 Jun 12 '15 at 7:25
0

You can boot from Ubuntu LiveCD, run Gparted and get full information about your partitions.

  1. You can see it in gparted or Windows Disk Formatter

  2. You can convert a primary partition to a logical using Fixparts but it is not a straightforward procedure. And there is a risk to lose your data. Since you have to backup it either way, it is much easier to remove a primary partition and a new one.

  3. See p.2.

  4. See p.2 and p.3

  5. You can get all kind of answers. But firstly it depends on what is "big enough RAM".

Also if you have HDD partitioned as GPT, then you can create only primary partitions. You do not need to worry about extended or logical ones.

I suggest that you boot from LiveCD and get a screenshot of gparted.

Then you can ask another question about practical issues you will face. Attaching the screenshot will be very helpful.

  • Then,should I go with "Install ubuntu alongwith windows" option in ubuntu installation? – vigamage Jun 11 '15 at 16:04
  • This is not a bad way to install. All partitions will be created automatically. – Pilot6 Jun 11 '15 at 16:13
  • u mean the option "Install ubuntu alongwith windows"? – vigamage Jun 11 '15 at 16:20
  • IF Windows 8 was pre-installed then it is UEFI boot with gpt partitioning. Only if you installed it yourself may it be BIOS with MBR. Technically you can convert logical to primary and vice-versa within all the partitioning rules (or often not possible). You can use fixparts or sfdisk to convert. – oldfred Jun 11 '15 at 16:25
  • If I cannot create a swap area, Don't I have any way to install ubuntu using the option "something else"? – vigamage Jun 11 '15 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.