Re: dpkg in Bookworm insists to rebuild initrd
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. What I did was prepend # to the last line in that file:
# cat initramfs-tools
#!/bin/sh -e
version="$1"
bootopt=""
command -v update-initramfs >/dev/null 2>&1 || exit 0
# passing the kernel version is required
if [ -z "${version}" ]; then
echo >&2 "W: initramfs-tools: ${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} did not pass a version number"
exit 2
fi
# exit if kernel does not need an initramfs
if [ "$INITRD" = 'No' ]; then
exit 0
fi
# absolute file name of kernel image may be passed as a second argument;
# create the initrd in the same directory
if [ -n "$2" ]; then
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
fi
# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "configure" ]; then
exit 0
fi
fi
# we're good - create initramfs. update runs do_bootloader
# shellcheck disable=SC2086
#update-initramfs -c -k "${version}" ${bootopt} >&2
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. ;)
--
Evolution as taught in public schools is, like religion,
based on faith, not based on science.
Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!
Felix Miata
Reply to: