[Bug 1466965] Re: update-initramfs is called twice for the same kernel
Bug Watch Updater
1466965 at bugs.launchpad.net
Fri Feb 28 19:39:59 UTC 2025
** Changed in: dpkg (Debian)
Status: Unknown => New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1466965
Title:
update-initramfs is called twice for the same kernel
Status in dpkg package in Ubuntu:
New
Status in initramfs-tools package in Ubuntu:
Triaged
Status in dpkg package in Debian:
New
Bug description:
When installing/upgrading packages (e. g. a kernel and initramfs-tools),
the same initrd is generated twice. Example from Ubuntu 24.04 (noble):
```
$ apt-get install --no-install-recommends -y zstd initramfs-tools linux-image-generic
[...]
Setting up initramfs-tools-core (0.142ubuntu25.5) ...
Setting up initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin (2.39-0ubuntu8.4) ...
Processing triggers for linux-image-6.8.0-54-generic (6.8.0-54.56) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
Processing triggers for initramfs-tools (0.142ubuntu25.5) ...
update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic
```
This behavior is caused by the kernel postinst running `run-parts
/etc/kernel/postinst.d` where `/etc/kernel/postinst.d/initramfs-tools`
calls update-initramfs. The initramfs-tools package uses the update-
initramfs dpkg trigger. This trigger is executed later and calls
`update-initramfs -u` (which updates the initrd for the latest
kernel).
Original report
===============
A discussion that has come up before, but I figured I'd file a bug.
When you 'apt-get install <some-packages>' often times:
a.) update-initramfs is called more than once for the same kernel
b.) update-initramfs might not even be called (such as in bug 1466960).
some conversation with infinity in #ubuntu-devel [1] indicates that he
and apw have discussed how to do solve this.
[1] http://irclogs.ubuntu.com/2015/06/19/%23ubuntu-devel.html#t18:04
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: initramfs-tools 0.103ubuntu15
ProcVersionSignature: User Name 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
ApportVersion: 2.17.3-0ubuntu4
Architecture: amd64
Date: Fri Jun 19 18:19:15 2015
Ec2AMI: ami-00000425
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: aki-00000002
Ec2Ramdisk: ari-00000002
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1466965/+subscriptions
More information about the foundations-bugs
mailing list