Bug#984759: grub2-common: grub-install/2.02+dfsg1-20+deb10u4 ignores --bootloader-id=xxx parm; sets grubx64.efi's prefix to /EFI/debian -- prevents system boot

YW yw at wikx.net
Mon Mar 8 03:03:42 GMT 2021


Package: grub2-common
Version: 2.02+dfsg1-20+deb10u4
Severity: important

Dear Maintainer,

Upgrading to grub 2.02+dfsg1-20+deb10u4 caused  grub-install
--target=x86_64-efi  to be executed. It failed (as expected) so I ran
   grub-install --bootloader-id=debian1buster
                --efi-directory=/boot/efi1  /dev/sda
   grub-install --bootloader-id=debian2buster
                --efi-directory=/boot/efi2  /dev/sdb
because I'm running two drives under software RAID1 and I wanted boot
redundancy. In order to get there I have two entries in the EFI as
(sda1)/boot/efi1/EFI/debian1buster  and 
(sdb1)/boot/efi2/EFI/debian2buster  giving  efibootmgr -v  of
        Boot0000* debian1buster  
 
HD(1,GPT,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,0x800,0x100000)/File(\EFI\debian1buster\shimx64.efi)
        Boot0002* debian2buster  
 
HD(1,GPT,xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,0x800,0x100000)/File(\EFI\debian2buster\shimx64.efi)
Where sda2/sdb2 are the RAID1 set.

Upon boot I'd get 'grub>'.
  
Entering 'set' (under 'grub>') showed 'prefix' as '/EFI/debian'.
Running  grep -l '/EFI/debian' /boot/efi1/EFI/debian1buster/* 
returned 'grubx64.efi'.
Leading me to believe that grub-install is not honoring the
--bootloader-id parameter when grubx64.efi is built.
 
 
My temporary solution was to copy
   /boot/efi1/EFI/debian1buster  to  /boot/efi1/EFI/debian
and
   /boot/efi2/EFI/debian2buster  to  /boot/efi2/EFI/debian
and now the system will boot properly.


Without knowing the particulars of Grub, it was a little surprising
that grub-install sets prefix in the first place; before it read
the grub.cfg file in current directory (/boot/efi1/EFI/debian1buster/).

I wonder if BOOTX64.CSV should be effected to prevent both of
the efi1/efi2 entries to be "shimx64.efi,debian,,This is the boot entry
for debian"; such that the ',debian,' should be the --bootloader-id
value as well.


I also wish that my 'debian1buster' entry would stop getting deleted
from EFI. I haven't figured out who to blame yet.


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/vg1bus-lv01 / ext4 rw,relatime,errors=remount-ro 0 0
/dev/mapper/vg1bus-lv09 /usr ext4 rw,relatime 0 0
/dev/sda1 /boot/efi1 vfat
rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
0 0
/dev/sdb1 /boot/efi2 vfat
rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
0 0
/dev/mapper/vg1bus-lv04 /srv ext4 rw,relatime,stripe=4 0 0
/dev/mapper/vg1bus-lv08 /tmp ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv03 /opt ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv10 /var ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv02 /home ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv11 /var/log ext4 rw,relatime,stripe=4 0 0
/dev/mapper/vg1bus-lv07 /var/mail ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv12 /var/spool ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv13 /var/tmp ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv06 /srv/backup ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv15 /srv/tmp ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv14 /srv/vm ext4 rw,relatime 0 0
/dev/mapper/vg1bus-lv05 /srv/docs ext4 rw,relatime 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)    /dev/disk/by-id/ata-CT500MX500SSD1_xxxxxxxxxxxxx
(hd1)    /dev/disk/by-id/ata-CT500MX500SSD1_xxxxxxxxxxxxx
*********************** END /boot/grub/device.map

*********************** BEGIN /proc/mdstat
Personalities : [raid1]
md127 : active raid1 sda2[0] sdb2[1]
      487525376 blocks super 1.2 [2/2] [UU]
      bitmap: 1/4 pages [4KB], 65536KB chunk

unused devices: <none>
*********************** END /proc/mdstat


-- System Information:
Debian Release: 10.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-14-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub2-common depends on:
ii  dpkg                1.19.7
ii  grub-common         2.02+dfsg1-20+deb10u4
ii  install-info        6.5.0.dfsg.1-4+b1
ii  libc6               2.28-10
ii  libdevmapper1.02.1  2:1.02.155-3
ii  libefiboot1         37-2+deb10u1
ii  libefivar1          37-2+deb10u1
ii  liblzma5            5.2.4-1

grub2-common recommends no packages.

grub2-common suggests no packages.

-- no debconf information



More information about the Pkg-grub-devel mailing list