Report forwarded
to debian-bugs-dist@lists.debian.org, in.cognito35@arcor.de, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Wed, 19 Jun 2024 10:57:11 GMT) (full text, mbox, link).
Acknowledgement sent
to Farblos <in.cognito35@arcor.de>:
New Bug report received and forwarded. Copy sent to in.cognito35@arcor.de, Thomas Lange <lange@debian.org>.
(Wed, 19 Jun 2024 10:57:12 GMT) (full text, mbox, link).
Package: dracut
Version: 102-3
Severity: normal
X-Debbugs-Cc: in.cognito35@arcor.de
Dear Maintainer,
thanks for maintaining dracut for Debian and thanks for the extra
effort of migrating to the dracut-ng upstream! Here is probably
a follow-up issue caused by that ...
* What led up to the situation?
Installation of dracut-ng-based dracut package 102-3.
* What exactly did you do (or not do) that was effective (or
ineffective)?
Called my usual "dracut --quiet --force --regenerate-all" command
to manually regenerate dracut initramfs/initrd images after a
configuration change.
* What was the outcome of this action?
Files being generated with names "initramfs-*-amd64.img" and not, as
previously "initrd.img-*-amd64":
------------------------- snip -------------------------
[~]$ ls -al /boot/
[...]
-rw------- 1 root root 28477336 Jun 19 12:08 initramfs-6.6.15-amd64.img
-rw------- 1 root root 28742400 Jun 19 12:08 initramfs-6.7.12-amd64.img
-rw------- 1 root root 28742715 Jun 18 11:07 initrd-fallback.img-6.7.12-amd64
-rw-r--r-- 1 root root 28477398 Jun 18 11:07 initrd.img-6.6.15-amd64
-rw------- 1 root root 28742715 Jun 18 11:07 initrd.img-6.7.12-amd64
[...]
------------------------- snip -------------------------
In above listing, you can nicely see the difference: The files generated
on "Jun 18" have been created by the dracut post-install hooks, the
files generated on "Jun 19" manually.
* What outcome did you expect instead?
I would have expected that a plain
sudo dracut --quiet --force --regenerate-all
would create the same files as the dracut post-install hooks.
My dracut configuration, nothing spectacular:
------------------------- snip -------------------------
[~]$ cat /etc/dracut.conf
hostonly="yes"
add_drivers+=" i915 "
omit_dracutmodules+=" i18n "
# avoid warnings because of dependencies on uninstallable
# tpm2-tss
omit_dracutmodules+=" systemd-pcrphase "
[~]$ ls -al /etc/dracut.conf.d/
total 16
drwxr-xr-x 2 root root 4096 Dec 8 2023 .
drwxr-xr-x 131 root root 12288 Jun 19 12:08 ..
------------------------- snip -------------------------
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.7.12-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages dracut depends on:
ii dracut-core 102-3
dracut recommends no packages.
Versions of packages dracut suggests:
pn dracut-network <none>
-- no debconf information
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Wed, 19 Jun 2024 11:45:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Lange <lange@cs.uni-koeln.de>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Wed, 19 Jun 2024 11:45:07 GMT) (full text, mbox, link).
I rembember there was a discussion about the initrd name and the plan
was to have the same name on all distributions, and there's a new
option in dracut.conf
*initrdname=*"_<filepattern>_"::
Specifies the file name for the generated initramfs if it is not set otherwise.
The initrdname configuration option is required to match the _initr*${kernel}*_
file pattern and only one file with this pattern should exists in the
directory where initramfs is loaded from. Defaults to _initramfs-${kernel}.img_.
But I don't remebmer the details about the change.
It seems that dracut uses initramfs... by default but Debian is using
initrd... when calling /etc/kernel/postinst.d/dracut
So if you still using the kernel postinst hook, things are fine IMO.
--
regards Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Thu, 20 Jun 2024 20:00:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Farblos <in.cognito35@arcor.de>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Thu, 20 Jun 2024 20:00:02 GMT) (full text, mbox, link).
Thanks for your prompt response!
On 2024-06-19 13:41, Thomas Lange wrote:
> I rembember there was a discussion about the initrd name and the
> plan was to have the same name on all distributions
That's reasonable, but regardless of what the "standard" initrd
name is or will be, probably *both* manual dracut and
post-install hooks should use the same standard name, then. Plus
GRUB should pick up that new name. (I haven't checked whether
update-grub picks up the initramfs-*.img names.)
> , and there's a new option in dracut.conf
The "initrdname" option does not seem to be suitable for the
"--regenerate-all" use-case since it does not allow for the
kernel version to be templatized (from /usr/bin/dracut):
if ! [[ $initrdname ]]; then
initrdname="initramfs-${kernel}.img"
fi
[...]
else
outfile="$dracutsysrootdir/boot/$initrdname"
fi
My experiments with 'initrdname="initrd.img"' confirm that:
------------------------- snip -------------------------
[~]$ cat /etc/dracut.conf
[...]
initrdname="initrd.img"
[~]$ sudo dracut --quiet --force --regenerate-all
[~]$ ll -tr /boot
[...]
-rw------- 1 root root 28742715 Jun 18 11:07 initrd-fallback.img-6.7.12-amd64
-rw------- 1 root root 28477336 Jun 19 12:08 initramfs-6.6.15-amd64.img
-rw------- 1 root root 28742400 Jun 19 12:08 initramfs-6.7.12-amd64.img
-rw-r--r-- 1 root root 28538617 Jun 19 13:48 initrd.img-6.6.15-amd64
-rw------- 1 root root 28804327 Jun 19 13:48 initrd.img-6.7.12-amd64
drwxr-xr-x 5 root root 4096 Jun 19 13:58 .
-rw------- 1 root root 28804621 Jun 19 13:58 initrd.img
------------------------- snip -------------------------
> It seems that dracut uses initramfs... by default but Debian is
> using initrd... when calling /etc/kernel/postinst.d/dracut
I dug a bit deeper into this, and for dracut <= 60 there was
patch debian/patches/initrd-not-initramfs.patch. More
specifically:
dracut (059-4) unstable; urgency=low
* Fix file name in patch initrd-not-initramfs.patch
Closes: #1029413, #1030191
Thanks to nabijaczleweli for for the patch
-- Thomas Lange <lange@debian.org> Thu, 09 Mar 2023 19:13:42 +0100
Probably we could have something like that again, to lower user
confusion? I can provide an updated patch, if needed.
> So if you still using the kernel postinst hook, things are fine
> IMO.
Not sure what you mean here. That I call the kernel postinst
hook manually to regenerate the initramfs's?
If yes, using the kernel postinst hook manually has the minor
disadvantage that you have to loop over the installed kernels to
cover all of them, while "dracut --regenerate-all", well, does
*all* kernels out of the box.
Thanks
Jens
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Fri, 21 Jun 2024 09:03:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Thomas Lange <lange@cs.uni-koeln.de>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Fri, 21 Jun 2024 09:03:04 GMT) (full text, mbox, link).
Yes, the initrd-not-initramfs.patch was removed because upstream
developer said it's not needed any more.
The kernel postinst hook is /etc/kernel/postinst.d/dracut
I use
# dpkg-reconfigure dracut
to recreate the initrd for all kernels.
--
regards Thomas
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Fri, 21 Jun 2024 13:09:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Laszlo <laszlo.gombos@gmail.com>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Fri, 21 Jun 2024 13:09:02 GMT) (full text, mbox, link).
Hello !
> The "initrdname" option does not seem to be suitable ...
From the description of the upstream PR -
https://github.com/dracut-ng/dracut-ng/pull/160
> The initrdname configuration option is required to match a initr*${kernel}* file pattern.
Would the following work ? If it does it should be probably added to
the Debian package config.
> initrdname="initrd-${kernel}.img"
Laszlo
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Fri, 21 Jun 2024 21:03:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Farblos <in.cognito35@arcor.de>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Fri, 21 Jun 2024 21:03:02 GMT) (full text, mbox, link).
On 2024-06-20 22:15, Thomas Lange wrote:
> I use
> # dpkg-reconfigure dracut
> to recreate the initrd for all kernels.
Nice, thanks. That suits my needs.
I still feel the inconsistency between manual "dracut --regenerate-all"
and post-install hooks itching, but now less so. So feel free to do
with this bug what you think is right.
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Fri, 21 Jun 2024 21:39:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Jens Schmidt <jens.schmidt35@arcor.de>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Fri, 21 Jun 2024 21:39:02 GMT) (full text, mbox, link).
On 2024-06-21 15:07, Laszlo wrote:
> Would the following work ? If it does it should be probably added to
> the Debian package config.
>
>> initrdname="initrd-${kernel}.img"
You mean as a value in /etc/{dracut.conf|dracut.conf.d/*}?
I haven't tested it, because I thought that the dracut script does
not evaluate the value (as far as I can see from the sources). But
OTOH dracut *sources* the configuration files, so this might
actually work. Of course only if dracut sources them per kernel
version.
I could test it, but only on Monday ...
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Mon, 24 Jun 2024 08:36:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Simon Pilkington <simonp.git@gmail.com>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Mon, 24 Jun 2024 08:36:02 GMT) (full text, mbox, link).
Hello
On Fri, 21 Jun 2024 09:07:04 -0400 Laszlo <laszlo.gombos@gmail.com> wrote:
> Hello !
>
> > The "initrdname" option does not seem to be suitable ...
>
> From the description of the upstream PR -
> https://github.com/dracut-ng/dracut-ng/pull/160
>
> > The initrdname configuration option is required to match a initr*${kernel}* file pattern.
>
> Would the following work ? If it does it should be probably added to
> the Debian package config.
>
> > initrdname="initrd-${kernel}.img"
I can confirm this works but the correct value to match postinst.d is:
initrdname="initrd.img-${kernel}"
The Debian package should probably ship this as the default
configuration under /usr/lib/dracut//as long as Debian is using
this convention.
>
> Laszlo
>
>
Regards,
Simon
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Wed, 10 Jul 2024 09:45:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Philipp Kern <pkern@debian.org>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Wed, 10 Jul 2024 09:45:03 GMT) (full text, mbox, link).
Control: severity 1073825 important
Hi,
On 6/20/24 9:49 PM, Farblos wrote:
> On 2024-06-19 13:41, Thomas Lange wrote:
>> I rembember there was a discussion about the initrd name and the
>> plan was to have the same name on all distributions
> That's reasonable, but regardless of what the "standard" initrd
> name is or will be, probably *both* manual dracut and
> post-install hooks should use the same standard name, then. Plus
> GRUB should pick up that new name. (I haven't checked whether
> update-grub picks up the initramfs-*.img names.)
It'd probably be good to decouple a transition to dracut from a
transition of that well-known name.
>> , and there's a new option in dracut.conf
>
> The "initrdname" option does not seem to be suitable for the
> "--regenerate-all" use-case since it does not allow for the
> kernel version to be templatized (from /usr/bin/dracut):
>
> if ! [[ $initrdname ]]; then
> initrdname="initramfs-${kernel}.img"
> fi
> [...]
> else
> outfile="$dracutsysrootdir/boot/$initrdname"
> fi
IMO we should think this from the intended user experience. In its
current state dracut is incredibly confusing in Debian testing and
unstable. It generates files that do not match what's falling out of the
kernel postinst by default. You need to pass it a target filename that
does not match the pattern and the intended kernel version.
--regenerate-all generates new files that will not be used. At the very
least we should put the name patch back in.
That being said I think there's a more general question here about what
the user interface should be. Admins are accustomed to run
"update-initramfs -u -k all" or for a specific version. Maybe dracut
should divert the tool, given that the interface is so generic and not
plumbing, like dracut itself is? Do we expect everyone to move over to
dracut invocations instead?
It looks like the intended interface as per dracut is:
# All versions
dracut --regenerate-all
# Specific version
dracut --kver <version>
Both of which are currently broken due to this bug.
Kind regards and thanks
Philipp Kern
Severity set to 'important' from 'normal'
Request was from Philipp Kern <pkern@debian.org>
to 1073825-submit@bugs.debian.org.
(Wed, 10 Jul 2024 09:45:03 GMT) (full text, mbox, link).
Marked as found in versions dracut/103-1.
Request was from наб <nabijaczleweli@nabijaczleweli.xyz>
to control@bugs.debian.org.
(Sun, 11 Aug 2024 12:51:04 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Thomas Lange <lange@debian.org>: Bug#1073825; Package dracut.
(Mon, 02 Dec 2024 18:27:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Roman Valov <roman.valov@gmail.com>:
Extra info received and forwarded to list. Copy sent to Thomas Lange <lange@debian.org>.
(Mon, 02 Dec 2024 18:27:03 GMT) (full text, mbox, link).
Hi,
one additional point to consider against using initrd/initramfs path
argument in kernel hooks.
On my system I have set up dracut to generate UKIs using uefi option:
$ cat /etc/dracut.conf.d/99-uefi.conf
uefi=yes
With the option set and output filename not specified,
dracut generates UKIs and places them in /boot/efi/EFI/Linux
But if the output filename is set resulting kernel images overwrite
initrd/initramfs files,
which is confusing and lead to broken boot:
$ sudo apt install --reinstall linux-image-6.11.10-amd64
...
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-6.11.10-amd64
...
$ file /boot/initrd.img-6.11.10-amd64
/boot/initrd.img-6.11.10-amd64: PE32+ executable (EFI application) x86-64
(stripped to external PDB), for MS Windows, 9 sections
Please consider avoiding explicitly specified initrd/initramfs filenames in
kernel hooks.
Best,
Roman
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.