Bug#984520: 'error: symbol "grub_register_command_lockdown" not found' and then lightdm fails to start

2021-06-03 Thread Colin Watson
On Thu, Jun 03, 2021 at 11:07:27AM +0200, Jesús Ángel wrote:
> I am also facing this error every now and then. Sometimes GRUB doesn't
> boot and keeps showing "error: symbol `grub_register_command_lockdown'
> not found.".
> On pressing any key, GRUB restarts and I get the same error again.

If you're getting this non-deterministically, it suggests that you have
multiple possible boot disks and either your firmware is picking one or
the other inconsistently, or GRUB isn't properly configured to install
to the right ones.  You should run "dpkg-reconfigure grub-pc" and select
all the disks that your firmware might boot from at the "GRUB install
devices:" prompt.

-- 
Colin Watson (he/him)  [cjwat...@debian.org]



Bug#984520: 'error: symbol "grub_register_command_lockdown" not found' and then lightdm fails to start

2021-06-03 Thread Jesús Ángel
Package: grub2
Version: 2.02+dfsg1-20+deb10u4
Followup-For: Bug #984520

Dear Maintainer,

I am also facing this error every now and then. Sometimes GRUB doesn't
boot and keeps showing "error: symbol `grub_register_command_lockdown'
not found.".
On pressing any key, GRUB restarts and I get the same error again.

I can fix the issue by booting into a Knoppix live, mounting the
filesystem under
/mnt, chrooting into it and running grub-install /dev/sda. However, it's
quite
annoying and time-wasting.

I wonder how is it possible to fix the problem just by running the
grub-install
command again. I don't know either what's triggering this issue, but I
think the
one to blame is some kernel upgrade which triggers a grub-update.


Yours faithfully,

-- Package-specific info:

*** BEGIN /proc/mounts
/dev/mapper/root / ext4 rw,relatime,errors=remount-ro 0 0
/dev/vda1 /boot ext3 rw,relatime,errors=remount-ro 0 0
/dev/mapper/var /var ext4 rw,relatime,errors=remount-ro 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/device.map
(fd0) /dev/fd0
(hd0) /dev/vda
(hd1) /dev/vdb
*** END /boot/grub/device.map

*** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
insmod all_video
  else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  b80ab3af-3b43-40f4-99b1-168a721ea949
else
  search --no-floppy --fs-uuid --set=root b80ab3af-3b43-40f4-99b1-168a721ea949
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=30
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
set timeout=30
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-b80ab3af-3b43-40f4-99b1-168a721ea949' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  
0dfb2e8d-27fe-4ff5-bf51-3d873f3910b9
else
  search --no-floppy --fs-uuid --set=root 
0dfb2e8d-27fe-4ff5-bf51-3d873f3910b9
fi
echo'Loading Linux 4.19.0-16-amd64 ...'
linux   /vmlinuz-4.19.0-16-amd64 
root=UUID=b80ab3af-3b43-40f4-99b1-168a721ea949 ro  quiet systemd.show_status=1 
acpi=force net.ifnames=0 biosdevname=0 
rd.luks.name=c9430ec8-ae4b-4a84-9371-9746e87fff7c=root rd.neednet=1 
ip=10.0.0.121:::255.255.255.0:tornavacas:eth1:none:10.0.0.103:10.0.0.104
echo'Loading initial ramdisk ...'
initrd  /initrd.img-4.19.0-16-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-b80ab3af-3b43-40f4-99b1-168a721ea949' {
menuentry 'Debian GNU/Linux, with Linux 4.19.0-16-amd64' --class debian 
--class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-4.19.0-16-amd64-advanced-b80ab3af-3b43-40f4-99b1-168a721ea949' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; 
fi
insmod 

Bug#984520: 'error: symbol "grub_register_command_lockdown" not found' and then lightdm fails to start

2021-03-04 Thread Colin Watson
On Thu, Mar 04, 2021 at 05:18:18PM +0100, Marco Kühnel wrote:
> after the recent update to grub2/202+dfsg1-20+deb10u4, during boot the 
> mentioned error is thrown. After that, boot continues but lightdm cannot be 
> started anymore.
> This only happens on my laptop containing two bootable hard disks. The 
> separate boot partitions share /boot/efi and from the second hard disk its 
> Ubuntu 
> installation still boots flawlessly. For the Debian installation, /boot and 
> /boot/efi are both on /dev/sda, but by default the laptop boots from /dev/sdb.

What do you mean by "the laptop boots from /dev/sdb"?  If your EFI
System Partition is on /dev/sda1, then by definition that's where the
boot loader lives, unless you're doing something else odd.  Do you just
mean that your root file system is on /dev/sdb?

> Tried: grub-install /dev/sda

In UEFI mode, grub-install ignores the device name you give it, and
always installs to the EFI System Partition on /boot/efi.

Could you please post the full output of "grub-install --debug"?

-- 
Colin Watson (he/him)  [cjwat...@debian.org]



Bug#984520: 'error: symbol "grub_register_command_lockdown" not found' and then lightdm fails to start

2021-03-04 Thread Marco Kühnel
Package: grub-efi-amd64
Version: 2.02+dfsg1-20+deb10u4
Severity: critical
Tags: d-i
Justification: breaks unrelated software

Hi,

after the recent update to grub2/202+dfsg1-20+deb10u4, during boot the 
mentioned error is thrown. After that, boot continues but lightdm cannot be 
started anymore.
This only happens on my laptop containing two bootable hard disks. The separate 
boot partitions share /boot/efi and from the second hard disk its Ubuntu 
installation still boots flawlessly. For the Debian installation, /boot and 
/boot/efi are both on /dev/sda, but by default the laptop boots from /dev/sdb.
Tried: grub-install /dev/sda
  
Best
Marco

-- Package-specific info:

*** BEGIN /proc/mounts
/dev/mapper/caspiansea--vg-root / ext4 rw,relatime,errors=remount-ro 0 0
/dev/mapper/caspiansea--vg-var /var ext4 rw,relatime 0 0
/dev/sda2 /boot ext2 rw,relatime 0 0
/dev/mapper/caspiansea--vg-home /home ext4 rw,relatime 0 0
/dev/mapper/caspiansea--vg-tmp /tmp ext4 rw,relatime 0 0
/dev/sdb2 /home/mac/macOS ext4 rw,relatime 0 0
/dev/sda1 /boot/efi vfat 
rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro
 0 0
/dev/mapper/data_crypt /home/codecivil/data ext4 rw,relatime 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
insmod all_video
  else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod lvm
insmod ext2
set 
root='lvmid/149bgo-7vVx-Jo0z-j1LJ-QhnL-YRKD-4hrfSc/ZGzn4Q-OPbT-4vu1-fXw5-pqed-lS5M-Ua8BXs'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root 
--hint='lvmid/149bgo-7vVx-Jo0z-j1LJ-QhnL-YRKD-4hrfSc/ZGzn4Q-OPbT-4vu1-fXw5-pqed-lS5M-Ua8BXs'
  e78fa255-2ca7-4d0b-a72e-ab2c6f4d3ea7
else
  search --no-floppy --fs-uuid --set=root e78fa255-2ca7-4d0b-a72e-ab2c6f4d3ea7
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1440x900
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod lvm
insmod ext2
set 
root='lvmid/149bgo-7vVx-Jo0z-j1LJ-QhnL-YRKD-4hrfSc/ZGzn4Q-OPbT-4vu1-fXw5-pqed-lS5M-Ua8BXs'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root 
--hint='lvmid/149bgo-7vVx-Jo0z-j1LJ-QhnL-YRKD-4hrfSc/ZGzn4Q-OPbT-4vu1-fXw5-pqed-lS5M-Ua8BXs'
  e78fa255-2ca7-4d0b-a72e-ab2c6f4d3ea7
else
  search --no-floppy --fs-uuid --set=root e78fa255-2ca7-4d0b-a72e-ab2c6f4d3ea7
fi
insmod png
if background_image 
/usr/share/desktop-base/futureprototype-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-e78fa255-2ca7-4d0b-a72e-ab2c6f4d3ea7' {
load_video
outb 0x728 1
outb 0x710 2
outb 0x740 2
outb 0x750 0
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  
d64727a5-ce33-4fd8-83be-f941be9779f9
else
  search --no-floppy --fs-uuid --set=root