Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #268630

Re: Could Gnome's "install pending software updates" cause installation scripts to misbehave?

From "Lucas B. Cohen" <lbc@members.fsf.org>
Newsgroups linux.debian.user
Subject Re: Could Gnome's "install pending software updates" cause installation scripts to misbehave?
Date 2024-03-29 21:00 +0100
Message-ID <Inqyl-2AVn-13@gated-at.bofh.it> (permalink)
References <Inir7-2vTN-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 29 Mar 2024 at 11:06:45 (-0400), Henning Follmann wrote:
> On Fri, Mar 29, 2024 at 12:01:27PM +0100, Lucas B. Cohen wrote:
>> Hi,
>> 
>> I've had a bit of a headache understanding why my Debian bookworm system
>> suddenly panicked at boot with an 'unable to mount root fs' error. Turns out
>> the first of my two menuentries in grub.cfg were no longer specifying the
>> linux root by its device UUID (as I was expecting it to do, by honoring
>> GRUB_DISABLE_LINUX_UUID != true) ; instead these menuentries were using the
>> device node/file (/dev/md0 in this case, hence the kernel panic).
>> 
> 
> Was there any error message during the update?
> I think what might have gone wrong, that you ran out of space on /boot.

Space on /boot couldn't have been the issue, I have 1GB allocated to 
that partition, and those 2 kernels only take up about a third of that 
space.

The was no visible error message at the time, as it's all hidden from 
the user's view by Gnome, right before power off. However I'm checking 
my /var/log/apt/term.log where it was handily stored, and here's what 
I'm seeing:

- seems that grub-mkconfig (the grub script called by Debian's 
update-grub wrapper) was in fact never called during that update 
sequence! (Therefore Gnome's handling of updates is off the hook.) 
Perhaps it was because of some bad dkms and linux-headers interaction. 
Some module failed to build, which cascaded into leaving the kernel and 
headers packages into the 'unconfigured' state:

Building module:
Cleaning build area...
env NV_VERBOSE=1 make -j12 modules 
KERNEL_UNAME=6.1.0-18-amd64.......................(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-18-amd64 (x86_64)
Consult /var/lib/dkms/nvidia-current/525.147.05/build/make.log for more 
information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-18-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.1.0-18-amd64 (--configure):
  installed linux-image-6.1.0-18-amd64 package post-installation script 
subprocess returned error exit status 1

dpkg: dependency problems prevent configuration of linux-headers-amd64:
  linux-headers-amd64 depends on linux-headers-6.1.0-18-amd64 (= 
6.1.76-1); however:
   Package linux-headers-6.1.0-18-amd64 is not configured yet.

- Consequence: my grub.cfg was only regenerated two days later, 
incidentally , during a scheduled unattended-upgrades run. Where

Log started: 2024-03-28  09:56:03
[...]
Removing linux-image-6.1.0-15-amd64 (6.1.66-1) ...
/etc/kernel/prerm.d/dkms:
[...]
depmod...
/etc/kernel/postrm.d/initramfs-tools:
[...]
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-18-amd64
Found linux image: /boot/vmlinuz-6.1.0-17-amd64
Found initrd image: /boot/initrd.img-6.1.0-17-amd64
Warning: Not executing os-prober.
done
[...]
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-18-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at 
/var/lib/dpkg/info/linux-headers-6.1.0-18-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-18-amd64 (--configure):
  installed linux-headers-6.1.0-18-amd64 package post-installation 
script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
  linux-image-amd64 depends on linux-image-6.1.0-18-amd64 (= 6.1.76-1); 
however:
   Package linux-image-6.1.0-18-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
  dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-amd64:
  linux-headers-amd64 depends on linux-headers-6.1.0-18-amd64 (= 
6.1.76-1); however:
   Package linux-headers-6.1.0-18-amd64 is not configured yet.

dpkg: error processing package linux-headers-amd64 (--configure):
  dependency problems - leaving unconfigured
Errors were encountered while processing:
  linux-image-6.1.0-18-amd64
  linux-headers-6.1.0-18-amd64
  linux-image-amd64
  linux-headers-amd64
Log ended: 2024-03-28  09:58:24

Something's now apparent: the initrd hadn't been created for this new 
-18 kernel until after grub-mkconfig's execution. My backed up erroneous 
grub.cfg confirms this. Maybe grub-mkconfig doesn't allow the use of 
UUID= absent an initrd? That would be enough to explain everything.

Anyway, this is not an easy thing to reproduce. I guess it just calls 
attention to the danger of unattended/automatic upgrades in odd cases 
like these.

Thanks Henning, and thank you David for your help. (Apologies for not 
replying to your messages; I'd forgotten to subscribe to the ML.)


> -H
> 
> -- 
> Henning Follmann           | hfollmann@itcfollmann.com

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Could Gnome's "install pending software updates" cause installation  scripts to misbehave? "Lucas B. Cohen" <lbc@members.fsf.org> - 2024-03-29 12:20 +0100
  Re: Could Gnome's "install pending software updates" cause  installation scripts to misbehave? Henning Follmann <hfollmann@itcfollmann.com> - 2024-03-29 16:10 +0100
    Re: Could Gnome's "install pending software updates" cause  installation scripts to misbehave? David Wright <deblis@lionunicorn.co.uk> - 2024-03-29 16:50 +0100
  Re: Could Gnome's "install pending software updates" cause  installation scripts to misbehave? "Lucas B. Cohen" <lbc@members.fsf.org> - 2024-03-29 21:00 +0100

csiph-web