[Bug 1928701] [NEW] update-grub does not run on kernel updates
Bas van der Lei
1928701 at bugs.launchpad.net
Mon May 17 16:29:34 UTC 2021
Public bug reported:
A fresh Ubuntu 18.04.5 installation (eg. from ubuntu-18.04.5-server-
amd64.iso) on a EFI machine, will not run update-grub when a kernel is
installed or removed. Resulting in an older kernel being booted or
missing/broken entries in grub.cfg.
It seems the following pre/post hook scripts are missing:
- `/etc/kernel/postinst.d/zz-update-grub`
- `/etc/kernel/postrm.d/zz-update-grub`
This is due to a version mismatch of grub-efi-amd64 and grub2-common. In
2.04-1ubuntu44 of grub2 these scripts are installed as part of
grub2-common package, while in 2.02-2ubuntu8.23 they are conffiles of
the grub-efi-amd64 (or grub-pc, etc) package.
NOTE: A system that previously had an older version of grub-efi-amd64 or
the grub-pc package installed will not encounter this issue since the
scripts are still present as obsolete conffiles:
```
# dpkg --status grub-efi-amd64
<snip>
Conffiles:
/etc/kernel/postrm.d/zz-update-grub 536d9d45e3e547638db3c5d58a925b6c obsolete
/etc/kernel/postinst.d/zz-update-grub 536d9d45e3e547638db3c5d58a925b6c obsolete
```
---
```
$ lsb_release -rd
Description: Ubuntu 18.04.5 LTS
Release: 18.04
$ apt-cache policy grub-efi-amd64 grub2-common
grub-efi-amd64:
Installed: 2.04-1ubuntu44
Candidate: 2.04-1ubuntu44
Version table:
*** 2.04-1ubuntu44 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.02-2ubuntu8.17 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
2.02-2ubuntu8 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
grub2-common:
Installed: 2.02-2ubuntu8.23
Candidate: 2.02-2ubuntu8.23
Version table:
*** 2.02-2ubuntu8.23 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.02-2ubuntu8.17 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
2.02-2ubuntu8 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
```
---
Could also be the cause of #1922234 and #1927857
** Affects: grub2-unsigned (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2-unsigned in Ubuntu.
https://bugs.launchpad.net/bugs/1928701
Title:
update-grub does not run on kernel updates
Status in grub2-unsigned package in Ubuntu:
New
Bug description:
A fresh Ubuntu 18.04.5 installation (eg. from ubuntu-18.04.5-server-
amd64.iso) on a EFI machine, will not run update-grub when a kernel is
installed or removed. Resulting in an older kernel being booted or
missing/broken entries in grub.cfg.
It seems the following pre/post hook scripts are missing:
- `/etc/kernel/postinst.d/zz-update-grub`
- `/etc/kernel/postrm.d/zz-update-grub`
This is due to a version mismatch of grub-efi-amd64 and grub2-common.
In 2.04-1ubuntu44 of grub2 these scripts are installed as part of
grub2-common package, while in 2.02-2ubuntu8.23 they are conffiles of
the grub-efi-amd64 (or grub-pc, etc) package.
NOTE: A system that previously had an older version of grub-efi-amd64
or the grub-pc package installed will not encounter this issue since
the scripts are still present as obsolete conffiles:
```
# dpkg --status grub-efi-amd64
<snip>
Conffiles:
/etc/kernel/postrm.d/zz-update-grub 536d9d45e3e547638db3c5d58a925b6c obsolete
/etc/kernel/postinst.d/zz-update-grub 536d9d45e3e547638db3c5d58a925b6c obsolete
```
---
```
$ lsb_release -rd
Description: Ubuntu 18.04.5 LTS
Release: 18.04
$ apt-cache policy grub-efi-amd64 grub2-common
grub-efi-amd64:
Installed: 2.04-1ubuntu44
Candidate: 2.04-1ubuntu44
Version table:
*** 2.04-1ubuntu44 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.02-2ubuntu8.17 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
2.02-2ubuntu8 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
grub2-common:
Installed: 2.02-2ubuntu8.23
Candidate: 2.02-2ubuntu8.23
Version table:
*** 2.02-2ubuntu8.23 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.02-2ubuntu8.17 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
2.02-2ubuntu8 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
```
---
Could also be the cause of #1922234 and #1927857
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2-unsigned/+bug/1928701/+subscriptions
More information about the foundations-bugs
mailing list