Public bug reported:

Hi,
As discussed with Julian Andres Klode on IRC, there are cases where the value 
of grub-efi/install_devices is affected by the value of LC_COLLATE.

This is caused by this unique sort: https://git.launchpad.net/~ubuntu-
core-dev/grub/+git/ubuntu/tree/debian/grub-multi-
install?h=debian/2.06-2ubuntu7#n220

# lsb_release -rd
Description:    Ubuntu 22.04 LTS
Release:        22.04

From what I see, this can only happen on systems with NVMe drives:

# find -L /dev/disk/by-id/ -samefile /dev/nvme0n1p1
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b44455555555-part1
/dev/disk/by-id/nvme-WDC_CL_SN720_SDAQNTW-512G-2000_xxxx-part1

Let's assume grub-efi/install_devices has the following value:

# debconf-show grub-efi-amd64 | grep grub-efi/install_devices:
* grub-efi/install_devices: 
/dev/disk/by-id/nvme-WDC_CL_SN720_SDAQNTW-512G-2000_xxxx-part1, 
/dev/disk/by-id/nvme-WDC_CL_SN720_SDAQNTW-512G-2000_yyyy-part1

This was obtained with this LANG/LC_COLLATE:
# echo $LANG
C.UTF-8
# dpkg-reconfigure grub-efi-amd64
│ GRUB EFI system partitions:                                                   
         │
│                                                                               
         │
│    [*] /dev/nvme1n1p1 (535 MB; /boot/efi) on 512110 MB WDC CL SN720 
SDAQNTW-512G-2000  │
│    [*] /dev/nvme0n1p1 (535 MB; ) on 512110 MB WDC CL SN720 SDAQNTW-512G-2000  
         │
# debconf-show grub-efi-amd64 | grep grub-efi/install_devices:
* grub-efi/install_devices: 
/dev/disk/by-id/nvme-WDC_CL_SN720_SDAQNTW-512G-2000_xxxx-part1, 
/dev/disk/by-id/nvme-WDC_CL_SN720_SDAQNTW-512G-2000_yyyy-part1

We can see that the boxes are properly ticked here.

However:
# export LANG=en_US.UTF-8; dpkg-reconfigure grub-efi-amd64
│ GRUB EFI system partitions:                                                   
          │
│                                                                               
          │
│    [ ] /dev/nvme1n1p1 (535 MB; /boot/efi) on 512110 MB WDC CL SN720 
SDAQNTW-512G-2000   │
│    [ ] /dev/nvme0n1p1 (535 MB; ) on 512110 MB WDC CL SN720 SDAQNTW-512G-2000  
          │

The boxes are not ticked, if I tick them, I get the following:

# debconf-show grub-efi-amd64 | grep grub-efi/install_devices:
* grub-efi/install_devices: 
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b44455555555-part1, 
/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b44666666-part1

I assume the postinst script for grub-pc exhibits the same bug with the
value of grub-pc/install_devices.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1969841

Title:
  grub-efi-amd64: grub-efi/install_devices depends on the value of
  LC_COLLATE/LANG

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1969841/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to