LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Is the second EFI partition redundant? (https://www.linuxquestions.org/questions/linux-software-2/is-the-second-efi-partition-redundant-4175719421/)

Matthew Wai 12-04-2022 02:04 AM

Is the second EFI partition redundant?
 
Code:

Matthew_Wai@My-PC:~$ lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda1  8:1    0  100M  0 part /boot/efi
├─sda2  8:2    0    16M  0 part
├─sda3  8:3    0  70.4G  0 part /media/Matthew_Wai/Windows 10
├─sda4  8:4    0  499M  0 part
├─sda5  8:5    0  300M  0 part
├─sda6  8:6    0    4G  0 part [SWAP]
├─sda7  8:7    0  75.7G  0 part /
└─sda8  8:8    0 314.8G  0 part

"sda1" was created automatically by "Windows Setup".
"sda5" was created manually by me just before I installed Linux.
Both are EFI partitions. Only "sda1" is present in "/etc/fstab" as shown below:
Code:

Matthew_Wai@My-PC:~$ cat /etc/fstab
# /dev/sda7
UUID=9c04423a-f1fa-4b10-a89d-c1d306fb50b0      /              ext4            rw,relatime    0 1

# /dev/sda1 LABEL=EFI\040system\040partition
UUID=F816-2029          /boot/efi      vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro  0 2

# /dev/sda6
UUID=a820f9da-9e3d-4215-ad17-11ada6c96053      none            swap            defaults,pri=-2 0 0

Am I right in thinking that "sda5" is redundant? If so, may I simply delete it?

syg00 12-04-2022 02:22 AM

Quote:

Originally Posted by Matthew Wai (Post 6395975)
[CODE]Am I right in thinking that "sda5" is redundant? If so, may I simply delete it?

Only if it is empty.

If it isn't empty, it is potentially worse in that it may be lead to confusion to the system as well as you.

Matthew Wai 12-04-2022 04:46 AM

Quote:

Originally Posted by syg00 (Post 6395979)
Only if it is empty.

I used "gnome-disk-utility" to mount it. Then...
Code:

Matthew_Wai@My-PC:~$ lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda1  8:1    0  100M  0 part /boot/efi
├─sda2  8:2    0    16M  0 part
├─sda3  8:3    0  70.4G  0 part /media/Matthew_Wai/Windows 10
├─sda4  8:4    0  499M  0 part
├─sda5  8:5    0  300M  0 part /media/Matthew_Wai/C80E-202D
├─sda6  8:6    0    4G  0 part [SWAP]
├─sda7  8:7    0  75.7G  0 part /
└─sda8  8:8    0 314.8G  0 part /media/Matthew_Wai/HDD

The mount point is "/media/Matthew_Wai/C80E-202D" as shown above.
Code:

Matthew_Wai@My-PC:~$ ls /media/Matthew_Wai/C80E-202D
Matthew_Wai@My-PC:~$ sudo ls /media/Matthew_Wai/C80E-202D
[sudo] password for Matthew_Wai:
Verification successful
Matthew_Wai@My-PC:~$

Is it empty?

allend 12-04-2022 06:26 AM

According to the UEFI specification (see section 5.3). the primary partition table is stored at the start of the disk and the backup partition table is stored at the end of the disk. The space in between is the usable space. Your sda5 partition will not have been used during Linux installation (only the primary partition table and backup partition table will have changed). As your sda5 shows as empty it can be safely removed.

mrmazda 12-05-2022 12:21 AM

Quote:

Originally Posted by Matthew Wai (Post 6395975)
Am I right in thinking that "sda5" is redundant? If so, may I simply delete it?

To confirm it's both unneeded and perfectly safe to remove, examine /boot/efi/EFI/. You should find directories there for Linux, for Windows, and likely one named BOOT. Each should contain at least one file used for booting.

Matthew Wai 12-05-2022 05:12 AM

Quote:

Originally Posted by mrmazda (Post 6396142)
examine /boot/efi/EFI/

Code:

Matthew_Wai@My-PC:~$ sudo ls /boot/efi/EFI/
[sudo] password for Matthew_Wai:
Verification successful
Boot  Microsoft  ubuntu  UOS


Debian6to11 12-05-2022 11:44 PM

And it is better to use 'ls -a -l' to check again '/sda5' in case there are any hidden files in there.

Matthew Wai 12-06-2022 12:21 AM

Quote:

Originally Posted by Debian6to11 (Post 6396314)
And it is better to use 'ls -a -l' to check again '/sda5' in case there are any hidden files in there.

Code:

Matthew_Wai@My-PC:~$ sudo ls -a -l /media/Matthew_Wai/C80E-202D
[sudo] password for Matthew_Wai:
Verification successful
total 8
drwxr-xr-x  2 Matthew_Wai Matthew_Wai 4096 Jan  1  1970 .
drwxr-xr-x+ 8 root        root        4096 Dec  6 14:18 ..


computersavvy 12-06-2022 07:49 PM

That shows the partition is definitely empty and as such can be removed if you want.

Make sure you unmount it before deleting.


All times are GMT -5. The time now is 03:00 AM.