18.04LTS upgrade of grub-common:amd64 FAILs in post-install; incorrectly REWRITES user's /etc/default/grub
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub2 (Ubuntu) |
Triaged
|
Low
|
Mate Kukri |
Bug Description
upgrading packages, as usual, on a long-time-
lsb_release -rd
Description: Ubuntu 18.04.4 LTS
Release: 18.04
uname -rm
5.3.0-40-generic x86_64
today's update included grub,
cat /var/log/
Start-Date: 2020-03-19 08:58:38
Commandline: apt-get upgrade
Upgrade: grub-common:amd64 (2.02-2ubuntu8.14, 2.02-2ubuntu8.15), grub2-common:amd64 (2.02-2ubuntu8.14, 2.02-2ubuntu8.15), grub-pc:amd64 (2.02-2ubuntu8.14, 2.02-2ubuntu8.15), grub-pc-bin:amd64 (2.02-2ubuntu8.14, 2.02-2ubuntu8.15)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2020-03-19 09:01:52
the update FAILs in grub post-processing
apparently, the install is -- new behavior -- REWRITING, incorrectly, the 'GRUB_CMDLINE_
before
cat /etc/default/grub
...
GRUB_
53 GRUB_CMDLINE_
dolvm lvmwait=
rootfstype=ext4 rootdelay=90 rootflags=
noresume pcie_aspm=off max_loop=256 transparent_
scsi_
net.ifnames=1 biosdevname=0 \
showopts noquiet \
log_buf_len=16M print_fatal_
mitigations=auto spec_store_
"
...
exec an update, as usual
apt-get update && apt-get upgrade
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
-> Y
Do you want to continue? [Y/n] Y
now, fails
Setting up grub-pc (2.02-2ubuntu8.15) ...
Sourcing file `/etc/default/grub'
/etc/
dpkg: error processing package grub-pc (--configure):
installed grub-pc package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)
it's incorrectly re-written /etc/default/grub
cat /etc/default/grub
...
GRUB_
53 GRUB_CMDLINE_
dolvm lvmwait=
rootfstype=ext4 rootdelay=90 rootflags=
noresume pcie_aspm=off max_loop=256 transparent_
scsi_
net.ifnames=1 biosdevname=0 \
showopts noquiet \
log_buf_len=16M print_fatal_
mitigations=auto spec_store_
"
prepending the EXISTING 'GRUB_CMDLINE_
fyi,
apt-cache policy grub2
grub2:
Installed: (none)
Candidate: 2.02-2ubuntu8.15
Version table:
2.
500 http://
2.02-2ubuntu8 500
500 http://
Changed in grub2 (Ubuntu): | |
status: | Triaged → Incomplete |
tags: | removed: regression-update |
tags: | added: id-5e74bf26da55cf464815d182 |
tags: | added: regression-update |
Changed in grub2 (Ubuntu): | |
status: | Incomplete → Triaged |
tags: | added: fr-306 |
This is a regression
Marking triaged, easily reproducible:
*BEFORE* dist-upgrade:
1. edit /etc/default/grub LINUX_DEFAULT from: E_LINUX_ DEFAULT= "quiet splash" CMDLINE_ LINUX_DEFAULT= "quiet \"
2. change GRUB_COMLINE_
GRUBCMDLIN
to:
GRUB_
splash"
3. run a dist-upgrade
Expected result: update-grub/install completes successfully
Actual result: update-grub fails (or apt fails), because /etc/default/grub now has a mangled GRUB_CMDLINE_ LINUX_DEFAULT:
GRUB_CMDLINE_ LINUX_DEFAULT= "quiet splash"
splash"
I am setting importance to medium because it will only impact users with continuation lines.