Making sense of partition tables

Why is /dev/sd4 marked as bootable if I boot to GRUB2?

The bootable is a flag in the MBR (actually a byte which is compared to 0x80). That entry is marked as bootable. A 'traditional' bootloader reads the MBR, looks for an entry with the bootable flag, and passes control to it. As you are using grub, it does something completely different, as it instead uses its configuration file. But the tools are telling you how are partitions configured (actually, you may have a bootloader in the MBR jumping you to /dev/sda4, and grub2 installed there).

What is /dev/sda3? What is its type (primary/logical)? Why it is not displayed in cfdisk?

/dev/sda3 is a primary partition of type extended partition. It's a partition used as container for other partitions. gparted is showing it quite well on its graphic.

You could argue if it's actually a partition or not, on the one hand it takes a slot in the MBR, on the other hand it's a container of partitions, you don't put a filesystem there.

Partition tools treat them specially, so cfdisk seems to prefer not to show it. fdisk for instance also doesn't allow some actions on those partitions.

Why is that free space (I suppose 124768 in cfdisk) marked as unusable?

I think those are the 116.20 GiB showed by gparted at the end

You can only have up to 4 primary partitions (counting the extended partition). That comes from the number of slots at the end of the MBR. As you already have 4 of them, that unallocated space at the end can't be partitioned (you can't put a logical partition there, since you can only have a single extended partition, and it shall be contiguous).

Your (easy) options to use that space would be to either:

  • extend /dev/sda4 to use it
  • extend /dev/sda3 to include /dev/sda4 (and preferably also to the end of the disk) and make /dev/sda4 a logical partition

What does NC flag mean in cfdisk for swap partition?

Quoting the cfdisk man page: "The flags can be Boot, which designates a bootable partition, or NC, which stands for "Not Compatible with DOS or OS/2"." Not something to worry about


Let's start out...

  1. It's marked as bootable, so that Windows can load its boot loader from it. Even though Grub may load first, it will "chainload" into the Windows boot loader, if Windows is selected from the list. For the Windows Bootloader to run, it needs to be on a bootable partition (Could someone double check this for me? I've never tried removing the Bootable flag on a Windows 7 install...)

  2. SDA3 is actually an Extended partition. Your disk is formatted as MBR, instead of GPT. One of the restrictions is that MBR can only have up to 4 primary partitions. To get around this, you can use an Extended primary partition, to then create multiple smaller logical partitions inside (getting you more than 4 partitions).

  3. Because of the MBR limitation, it can't create a 5th primary partition outside of the Extended Logical partition. This is normal. If you extend the Extended Partition, then you should be able to create a new partition inside of it, and use the rest of your disk.

  4. From the cfdisk Man pages:

The flags can be Boot, which designates a bootable partition or NC, which stands for "Not Compatible with DOS or OS/2".