The problem:
I first installed Windows 10. It created the following partitions:
- System partition (Primary partition).
C:
partition (Primary partition)- Recovery partition (Primary partition).
Then when installing Ubuntu, I tried using the installer's partition tool to resize the C:
partition to create a 10GB NTFS partition which would be accessible via Windows and via Ubuntu (I've done this in the past). However, I was informed by the software, that I'd have to create it as (I think) an extended partition. This meant that the 10GB partition would be a logical partition and I'd have to create any extra partitions only within the logical partitions of the extended partition, so I couldn't install Ubuntu into a primary partition. So I rebooted and selected the "Install Ubuntu alongside Windows" option, and did the install. Now I see that there are five primary partitions.
So why am I not allowed to create more than 4 primary partitions, but the system can create how many ever partitions it likes? I don't seem to have any "overlapping partitions" issues as this question mentions.
ps: What I really want now, is to be able to resize the 343GB partition and create a 10GB partition which will be accessible from Windows and from Ubuntu (to be able to share files between the OS'es).
Update: Checked on Ubuntu. So it was indeed an extended partition. Now I'm in a quandry about how to create that 10GB partition that's accessible by Windows and Ubuntu. I used to be able to create it when I was using Windows 8.1 and Ubuntu 16.04.
The old MSDOS partition table can contain only 4 primary partitions, but one of them can be an extended partition and contain 'any number' of logical partitions.
The new GUID partition table, GPT, can contain 'any number' of partitions, and does not use extended partition and logical partitions. I have read that Windows can 'only' manage 128 partitions on GPT, but it might be old information. Anyway it should be enough for almost all cases. It seems Linux can manage more partitions (if you have a tool for it), according to this link 255 partitions.
In a fairly new computer I would recommend that you use GPT and UEFI mode. This is not necessary for Windows 10, but if/when you want to upgrade to Windows 11 it will be necessary. (It is not necessary for Ubuntu, but it is better, and more 'future proof').
It is best to start by installing Windows, and install Ubuntu afterwards. Otherwise, if you start with Ubuntu and install Windows afterwards, Ubuntu's grub bootloader will be overwritten and must be repaired, because Windows does not recognize it. This is possible but means extra work that can be avoided.
Edit 1: When you boot from a live Ubuntu system, typically from a USB pendrive, you can run
gparted
and edit the partitions. If a partition is mounted or 'swapped on', unmount or 'swap off' and it will be available for editing. (Ubuntu cannot let you edit partitions that are used by the running Ubuntu operating system, this is why you should boot from an external drive.)Finally, it is a good idea to backup everything that you cannot afford to lose before using
gparted
, because editing partitions is risky, it can destroy the whole partition table.Edit 2: When running gparted from Ubuntu live in an external drive,
/dev/sda6
: the padlock symbol shows that it is mounted, so unmount it.data
.