[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg in Bookworm insists to rebuild initrd



On Thu 10 Feb 2022 at 02:44:50 (-0500), Felix Miata wrote:
> David Wright composed on 2022-02-09 23:36 (UTC-0600):
> > On Wed 09 Feb 2022 at 23:09:40 (-0500), Felix Miata wrote:
> 
> >> # inxi -S
> >> System:
> >>   Host: ab560 Kernel: 5.15.0-3-amd64 x86_64 bits: 64 Desktop: Trinity
> >>     Distro: Debian GNU/Linux bookworm/sid
> >> # dpkg --configure linux-image-5.15.0-3-amd64
> >> Setting up linux-image-5.15.0-3-amd64 (5.15.15-2) ...
> >> /etc/kernel/postinst.d/initramfs-tools:
> >> update-initramfs: Generating /boot/initrd.img-5.15.0-3-amd64
> >> mv: cannot move '/boot/initrd.img-5.15.0-3-amd64.new' to
> >> '/boot/initrd.img-5.15.0-3-amd64': Operation not permitted
> >> run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
> >> dpkg: error processing package linux-image-5.15.0-3-amd64 (--configure):
> >>  installed linux-image-5.15.0-3-amd64 package post-installation script subprocess
> >> returned error exit status 1
> >> Errors were encountered while processing:
> >>  linux-image-5.15.0-3-amd64
> >> #
>  
> >> What can be done to make dpkg stop trying to replace the initrd that I have made
> >> immutable? I don't want it replaced. Nothing (now) in 5.15 will solve the problem
> >> that needs the solution reported here:
> >> https://gitlab.freedesktop.org/drm/intel/-/issues/4762
>  
> > Would:
>  
> > # INITRD='No' dpkg --configure linux-image-5.15.0-3-amd64
>  
> > manage to propagate INITRD through to the third¹ test in
> > /etc/kernel/postinst.d/initramfs-tools?
>  
> > ¹ I'm reading buster; adjust as necessary.
> 
> Didn't help. But, I don't know if your third test equates to my third test.

Yes, as in:

¹ > command -v update-initramfs >/dev/null 2>&1 || exit 0
² > if [ -z "${version}" ]; then
³ > if [ "$INITRD" = 'No' ]; then

It then becomes a matter of where to introduce the INITRD.

So the commandline failed, but there are a couple of configuration
files in /etc/initramfs-tools/. There are environment variables
(uppercase) in initramfs.conf; update-initramfs.conf looks less
promising as the parameters are lowercase.

Greg has pointed to do_initrd in /etc/kernel-img.conf, which might
well work, but won't prevent it trying when, say, grub is upgraded.
Of course, it's always possible that do_initrd might work from
update-initramfs.conf. There might even be some documentation
somewhere (and there's always the source).

> What I did was prepend # to the last line in that file:

Sure. Hacks will usually work, but it's nice to find the
appropriate configuration variable, which the existence of
INITRD seems to confirm as being available somewhere.

> Thanks. That pacified the scripts. Now I can get on with finding a
> kernel that supports booting with two displays connected at boot,
> if there exists one packaged for Debian yet. ;)

Cheers,
David.


Reply to: