Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install Ubuntu 12.04 via manual partitioning because I want to remove an existing Windows 7 operating system but keep all my other partitions with their contents intact. My questions are:

  1. What Partition Types should I choose for the swap area and the root? (Mind you, I am not asking about File System.) One excellent answer on manual partitioning advises Primary for swap and Logical for root, but I want to recheck because there seem to be divergent tips on this in the various discussions I have been able to check.

  2. For "Device for bootloader installation" should I choose the entire HDD (which is given as the default choice) or the particular partition where Ubuntu is to be installed?

share|improve this question
BIOS based Computers only boot from MBR, so you have to install grub2's boot loader to the MBR or choose entire drive or sda. If you install to a partition it will never be found unless you have another install of grub. Default install usually puts swap in a logical partition. It really does not matter whether logical or primary other than future partition planning, so usually logical works better. – oldfred May 11 '14 at 16:36
Thanks. In short,then,I choose the entire drive or sda as the Device for Bootloader Installation while installing Ubuntu in one partition? My overriding concern, as you will understand, is only that this does not hurt the other partitions and their contents. – user255726 May 12 '14 at 6:15
up vote 5 down vote accepted

For root and swap you can choose logical or primary your choice but remember you can only have 4 primary partitions on the hard disk after that no more partitions(logical or primary) will be created(i mean you cannot create partitions after that). If you want to create partitions you should convert one primary to extended(or logical) partition and split that into several partitions.

so if you are out of primary partitions then its recommended to install both in logical, if not you can install them on primary partitions(if you don't have any use of primary partitions in future like installing windows again)

I hope that helps

share|improve this answer
Yes, it's helped, thanks. Can you throw some light on my second question (about the Device for Bootloader Installation)? – user255726 May 12 '14 at 6:25
You have to select the entire hard disk which is default – Sudheer May 12 '14 at 12:25

First, why Ubuntu 12.04? Version 14.04 is available now, and includes a number of improvements.

Second, the answer to your question depends greatly on your boot mode, which you haven't specified. You can identify your Windows boot mode by examining the partition table type -- if your boot disk uses the Master Boot Record (MBR), your computer is booting in BIOS mode; but if it uses the GUID Partition Table (GPT), it's booting in EFI mode. See here for more on identifying your boot mode. Once you've identified the boot mode, your question can be answered:

BIOS-mode Booting

Most PCs sold prior to Windows 8's release booted in BIOS mode, but some Windows 7 PCs sold after mid-2011 used EFI mode by default, and even a few older computers can be configured to use EFI.

If you're booting in BIOS mode, you'll be limited by MBR's restrictions, which begin with a 4-primary-partition limit. This limit can be gotten around by creating a special type of primary partition, known as an extended partition, which serves as a placeholder for an arbitrary number of logical partitions. Linux doesn't care much about the distinction between primary and logical partitions; you can use either type as you see fit, within the MBR's limits. Those limits become important because many PCs shipped originally with four primary partitions, making it impossible to create new partitions, even after resizing an existing partition. If you run into this problem, you must either delete a partition that's of little value (typically one holding manufacturer-specific tools) or convert one from primary to logical form. The latter task can be done with my FixParts program, which is part of the gdisk package in Ubuntu. Don't convert the Windows boot partition from primary to logical, though; that will render it unbootable!

Another meaning of "partition type" is a type code, which for MBR is a 1-byte (0-255, or 0x00-0xFF hexadecimal) value that identifies the intended use of a partition. The Ubuntu installer will set the type code appropriately if you create a partition using the Ubuntu installer. If you use some other tool, give the Linux swap space a type code of 0x82 and all Ubuntu system and data partitions a type code of 0x83. There are other type codes for uses like Linux LVM (0x8E), NTFS (0x07), etc.

Note also that you should NEVER use the standard Windows partitioning tools to create partitions. These tools will convert the disk from MBR to Microsoft's proprietary Logical Device Manager (LDM) format if you create a layout with more than four partitions. You can't install Ubuntu directly to an LDM disk, so if you make this mistake, you'll have to convert back with the help of third-party tools.

EFI-mode booting

If you're booting in EFI mode, you'll use GPT, which supports up to 128 partitions by default (and this value can be raised, if necessary). GPT doesn't distinguish between primary, extended, and logical partitions, although some partitioning tools still prompt for primary vs. logical status when you create partitions on GPT disk. (These tools then ignore what you say, since it's meaningless.)

GPT also supports partition type codes, but instead of a single byte, GPT uses a 16-byte Globally Unique Identifier (GUID), which is awkward to display or enter. Thus, partitioning tools generally set the GUID automatically based on your stated use for the partition or use some sort of code. Tools based on libparted (including parted, GParted, and the Ubuntu installer) do the former, so you shouldn't have to explicitly set a type code. If you use GPT fdisk (gdisk, sgdisk, or cgdisk), you'd set a type code of 8200 for Linux swap, 8300 for a Linux filesystem, 8E00 for Linux LVM, 0700 for NTFS, and so on.

share|improve this answer
Thanks. Mine is MBR. What I understand is that whether it's Primary or Logical for both root and swap, it doesn't matter. But can you say something about my second question? – user255726 May 12 '14 at 6:28

Your Answer


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.