Understanding UEFI boot drives, and how UEFI chooses which drive to boot from

I have two SSDs on SATA, one cloned from the other. Unit is booting from a separate NVMe (with different GUIDs):

devuser@product:~> lsblk -f
NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                
├─sda1      vfat   FAT32       DF1E-A37D                                           
├─sda2      btrfs              de596190-79c1-467a-8998-d00f0d630740                
└─sda3      swap   1           17a16f0d-b6fd-4c89-ac04-b4f0e8324ccd                
sdb                                                                                
├─sdb1      vfat   FAT32       DF1E-A37D                                           
├─sdb2      btrfs              de596190-79c1-467a-8998-d00f0d630740                
└─sdb3      swap   1           17a16f0d-b6fd-4c89-ac04-b4f0e8324ccd                
nvme0n1                                                                            
├─nvme0n1p1 vfat   FAT32       9C8B-F18F                             505.9M     1% /boot/efi
├─nvme0n1p2 btrfs              e0e76da1-95c8-4a39-9aaa-77d6720188c4                
├─nvme0n1p3 swap   1           2e8e317c-cf0b-47ed-bd2b-0c30c340fb6d                [SWAP]
└─nvme0n1p4 btrfs              bbc738d1-eb16-46a4-8335-9580a87c5b3d   50.5G    19% /home
                                                                                  /var
                                                                                  /tmp
                                                                                  /root
                                                                                  /boot/grub2/x86_64-efi
                                                                                  /usr/local
                                                                                  /srv
                                                                                  /boot/grub2/i386-pc
                                                                                  /opt
                                                                                  /.snapshots
                                                                                  /
devuser@product:~> ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Jan 30 13:59 17a16f0d-b6fd-4c89-ac04-b4f0e8324ccd -> ../../sdb3
lrwxrwxrwx 1 root root 15 Jan 30 13:59 2e8e317c-cf0b-47ed-bd2b-0c30c340fb6d -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Jan 30 13:59 9C8B-F18F -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Jan 30 13:59 bbc738d1-eb16-46a4-8335-9580a87c5b3d -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 10 Jan 30 13:59 de596190-79c1-467a-8998-d00f0d630740 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 30 13:59 DF1E-A37D -> ../../sda1
lrwxrwxrwx 1 root root 15 Jan 30 13:59 e0e76da1-95c8-4a39-9aaa-77d6720188c4 -> ../../nvme0n1p2
devuser@product:~> sudo mount /dev/sdb2 /mnt/tmp
[sudo] password for root: 
mount: /mnt/tmp: mount(2) system call failed: File exists.
devuser@product:~> sudo mount /dev/sda2 /mnt/tmp
devuser@product:~> 

Note that both sda2 and sdb2 have UUIDs of de596190-79c1-467a-8998-d00f0d630740, and that /dev/disk/by-uuid/de596190-79c1-467a-8998-d00f0d630740 links to /dev/sda2. Trying to mount /dev/sdb2 fails; mounting /dev/sda2 succeeds.

It prevents an attempt to mount duplicate device.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.