I'm trying to understand these partitions
My current Ubuntu installation shows 3 partitions. I thought I had deleted every partition from my Windows 10 SSD before installing Ubuntu 20.04.
- Did Ubuntu reuse my Windows boot partition instead of making a new one? I noticed it's still FAT32 formatted. Is there some way at this point to convert it to a Linux filesystem if it really is the boot partition?
I'm sure the second 1TB partition showed up after installing Timeshift. I didn't pay attention to which 1TB partition was there first, but I assume sda2. I uninstalled Timeshift briefly to see if one of the 1TB partitions would go away, but both remained.
- Did Timeshift create this second partition, or is it some artifact I can safely delete? How can 2 partitions share the same physical drive when they overlap like this?
Thank you very much!
$ sudo fdisk -l
Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 850
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x52e04291
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 1953523711 1952471042 931G 5 Extended
/dev/sda5 1052672 1953523711 1952471040 931G 83 Linux
$ sudo mount | grep sda
/dev/sda5 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sda5 on /run/timeshift/backup type ext4 (rw,relatime,errors=remount-ro)
Solution 1:
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 1953523711 1952471042 931G 5 Extended
/dev/sda5 1052672 1953523711 1952471040 931G 83 Linux
This is typical for a UEFI installation of Ubuntu in MBR ("msdos").
-
sda1
: ESP (EFI System Partition); required (as FAT32) and not exclusively "Windows", it's for all installed OSes. Please read the UEFI guide in order to understand what it entails, all computers now (and form a decade ago) are UEFI, not BIOS; users must understand UEFI going forward. -
sda2
: Extended partition that the Ubuntu installer usually creates whenever it detects "msdos" partitioning type. -
sda5
: Logical partition insidesda2
, that's why they "overlap" (not really, one is a logical partition inside a primary partition) and despite the label is probably your root file system (if you have no other drives it certainly is; removing it will remove your Ubuntu installation.
Additional considerations:
It would have been better to create an entirely new GPT partition table instead of keeping the old MBR ("msdos"). It can be easily done in a live session, before installing Ubuntu, with GParted: Devices menu → Create new partition table → GPT. This blanks the drive completely. Then the Ubuntu installer, using the default settings would only (re-)create the ESP and the root (/
) file system since currently there's no need for a separate swap partition.
Solution 2:
The /dev/sda1
partition is the EFI partition. If it were the actual Windows 10 partition, it would be formatted with NTFS and not FAT32. If your computer is set to boot via UEFI, the EFI partition must exist and must be FAT32, regardless of the operating system you use. Do not change this partition or your computer may stop booting.
To explain the two 1TB partitions please note that one of the partitions (/dev/sda2
) is marked as the "Extended" partition. Before UEFI format was introduced, the entire information about partitions on disk was held in the MBR (Master Boot Record). There was space only for 4 entries there, so you could have only 4 partitions on the disk. Because of this, something called extended partition was invented. Extended partition is not a "real" partition that holds data, but it is rather some kind of a "container" that has other partitions (called logical partitions) inside. So you could have 4 partitions in the MBR, one (and only one) of them being extended partition, and you could have further partitions inside the extended partition, to overcome the 4 partitions limit.
It was common in MS DOS days to have disk partitioned so that the first (boot) partition was the system partition, and the second was an extended partition that contained inside a single logical partition for data, filling up the entire extended partition - just because MS DOS "fdisk" tool was setting it up in that way. You could not create two "regular" (primary) partitions using that tool.
For some reason, your system was installed in that way also. Your actual Linux partition is /dev/sda5
(the mount
command shows that root filesystem is mounted on it) which is a logical partition inside the extended partition /dev/sda2
.
It is a bit strange. With UEFI, there should be no extended partitions. You usually have extended partitions when there is non-UEFI partitioning; but EFI partition should be not present then. You got a strange mixture of an UEFI and non-UEFI setup, I don't know why. But besides of being strange, everything is OK and as it should be. Don't change anything as you will break your system.