Heads up: removing the mkinitrd wrapper
Hi, As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`). Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary). Timeline: - March 2021 : Upstream support removed - https://github.com/dracutdevs/dracut/commit/43df4ee2 - May 2021 : Deprecation announcement on the Factory mailing list - https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/G... - September 2022 : Bugs were opened for each affected package - https://bugzilla.opensuse.org/show_bug.cgi?id=1202352 - https://bugzilla.opensuse.org/show_bug.cgi?id=1202353 - https://bugzilla.opensuse.org/show_bug.cgi?id=1202443 - https://bugzilla.opensuse.org/show_bug.cgi?id=1203019 - https://bugzilla.opensuse.org/show_bug.cgi?id=1203025 - https://bugzilla.opensuse.org/show_bug.cgi?id=1203052 - April 2023 : Removal of the `dracut-mkinitrd-deprecated` package Best regards.
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Hi Carlos, On Thu, 30 Mar 2023, 10:47:09 +0200, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
you see the various calls in /var/log/YaST2/mkinitrd.log, just use # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log HTH, cheers. l8er manfred
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
On Thu, 30 Mar 2023, 10:47:09 +0200, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory Laicolasse:~ # -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Thu, 30 Mar 2023, 10:57:49 +0200, Carlos E. R. wrote:
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
On Thu, 30 Mar 2023, 10:47:09 +0200, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory Laicolasse:~ #
Then you haven't actually invoked mkinitrd at all... # grep log /usr/sbin/mkinitrd logfile=/var/log/YaST2/mkinitrd.log $cmd " -L Disable logging." -L) logfile=;; [[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile" You should just run "sudo mkinitrd", then you have it ;) Cheers. l8er manfred
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2023-03-30 a las 11:13 +0200, Manfred Hollstein escribió:
On Thu, 30 Mar 2023, 10:57:49 +0200, Carlos E. R. wrote:
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
...
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory Laicolasse:~ #
Then you haven't actually invoked mkinitrd at all...
Oh, sorry, that's a freshly installed machine. Telcontar:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.101-default 5.3.18-150300.59.101-default I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.98-default 5.3.18-150300.59.98-default I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.101-default 5.3.18-150300.59.101-default I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.98-default 5.3.18-150300.59.98-default I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.101-default 5.3.18-150300.59.101-default I: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force --force-drivers "pata_jmicron ata_piix ata_generic netconsole xennet xenblk" /boot/initrd-5.3.18-150300.59.98-default 5.3.18-150300.59.98-default Telcontar:~ # - -- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCZCVUohwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVC1oAnA67sj8ud8/R6O+N1Ezk aqJ9kJMrAJ9YykTm94aU/5Liw5P01dR5Lmz51Q== =ateh -----END PGP SIGNATURE-----
Carlos E. R. wrote:
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory
Okay, so no one ever ran mkinitrd on that system :-) Here are some examples: https://paste.opensuse.org/pastes/de4265244862 Right now: dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd3 6.2.8-1-default -- Per Jessen, Zürich (15.6°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-30 12:35, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory
Okay, so no one ever ran mkinitrd on that system :-)
Yeah, it was installed two days ago :-D -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-30 12:35, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 10:55, Manfred Hollstein wrote:
Hi Carlos,
you see the various calls in /var/log/YaST2/mkinitrd.log, just use
# grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log
Laicolasse:~ # grep /usr/bin/dracut /var/log/YaST2/mkinitrd.log grep: /var/log/YaST2/mkinitrd.log: No such file or directory
Okay, so no one ever ran mkinitrd on that system :-)
Yeah, it was installed two days ago :-D
My system (Tumbleweed) was installed 2016, and is updated regularly. The timestamp of /var/log/YaST2/mkinitrd.log is June 11, 2021.....
On Fri, Mar 31, 2023 at 2:08 PM Pit Suetterlin via openSUSE Factory <factory@lists.opensuse.org> wrote:
The timestamp of /var/log/YaST2/mkinitrd.log is June 11, 2021.....
If you read the original announcement you will see "all known packages that required [mkinitrd] in their spec file or were found to be using it have been fixed". mkinitrd has not been used by *packages* for quite some time. The whole discussion is about using mkinitrd interactively.
On Thu, Mar 30, 2023 at 11:47 AM Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
dracut --regenerate-all should be the direct equivalent (it rebuilds all existing initrds like mkinitrd did). For more advanced invocations you are invited to read the dracut man page.
On 2023-03-30 10:58, Andrei Borzenkov wrote:
On Thu, Mar 30, 2023 at 11:47 AM Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
dracut --regenerate-all
Thanks.
should be the direct equivalent (it rebuilds all existing initrds like mkinitrd did).
For more advanced invocations you are invited to read the dracut man page.
Ok :-) I just searched: <https://doc.opensuse.org/documentation/leap/startup/single-html/book-startup/index.html> <https://doc.opensuse.org/documentation/leap/reference/single-html/book-reference/index.html> and "dracut --regenerate-all" is not mentioned at all. Nor "mkinitrd", anyway. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package? RPM packages create the initrd automatically when needed, so a manual invocation should not be needed, Andreas -- Andreas Jaeger aj@suse.com Twitter: jaegerandi SUSE Software Solutions Germany GmbH, Frankenstr.146, D 90461 Nürnberg (HRB 36809, AG Nürnberg) GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman GPG fingerprint = EF18 1673 38C4 A372 86B1 E699 5294 24A3 FF91 2ACB
On 2023-03-30 11:16, Andreas Jaeger via openSUSE Factory wrote:
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed, I don't remember why I did the last time (last November), but did so. Probably because I did some configuration change.
For example, when adding/removing a filesystem in fstab that is read or something during boot (worst case, a separate /usr). Or when cloning a machine to a new machine. Or when replacing the hard disk. Others I now can't remember. When kernel fails to boot; then boot a rescue system, mount failed system, chroot, mkinitrd. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Thu, 30 Mar 2023, 11:28:57 +0200, Carlos E. R. wrote:
On 2023-03-30 11:16, Andreas Jaeger via openSUSE Factory wrote:
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed, I don't remember why I did the last time (last November), but did so. Probably because I did some configuration change.
For example, when adding/removing a filesystem in fstab that is read or something during boot (worst case, a separate /usr). Or when cloning a machine to a new machine. Or when replacing the hard disk. Others I now can't remember.
When kernel fails to boot; then boot a rescue system, mount failed system, chroot, mkinitrd.
Exactly! I just copied /usr/sbin/mkinitrd to /usr/local/sbin/mkinitrd on my systems... ;) Cheers. l8er manfred
On 2023-03-30 11:34, Manfred Hollstein wrote:
On Thu, 30 Mar 2023, 11:28:57 +0200, Carlos E. R. wrote:
On 2023-03-30 11:16, Andreas Jaeger via openSUSE Factory wrote:
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed, I don't remember why I did the last time (last November), but did so. Probably because I did some configuration change.
For example, when adding/removing a filesystem in fstab that is read or something during boot (worst case, a separate /usr). Or when cloning a machine to a new machine. Or when replacing the hard disk. Others I now can't remember.
When kernel fails to boot; then boot a rescue system, mount failed system, chroot, mkinitrd.
Exactly! I just copied /usr/sbin/mkinitrd to /usr/local/sbin/mkinitrd on my systems... ;)
yeah, will do. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 30/03/2023 11.40, Carlos E. R. wrote:
On 2023-03-30 11:34, Manfred Hollstein wrote:
On Thu, 30 Mar 2023, 11:28:57 +0200, Carlos E. R. wrote:
On 2023-03-30 11:16, Andreas Jaeger via openSUSE Factory wrote:
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed, I don't remember why I did the last time (last November), but did so. Probably because I did some configuration change.
For example, when adding/removing a filesystem in fstab that is read or something during boot (worst case, a separate /usr). Or when cloning a machine to a new machine. Or when replacing the hard disk. Others I now can't remember.
When kernel fails to boot; then boot a rescue system, mount failed system, chroot, mkinitrd.
Exactly! I just copied /usr/sbin/mkinitrd to /usr/local/sbin/mkinitrd on my systems... ;)
yeah, will do.
FTR, it will continue to be available on GitHub until the SUSE/059 branch: https://github.com/openSUSE/dracut/blob/SUSE/059/suse/mkinitrd-suse.sh
On Thu, Mar 30, 2023 at 12:16 PM Andreas Jaeger via openSUSE Factory <factory@lists.opensuse.org> wrote:
Carlos, why do you need to run mkinitrd yourself?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed,
a) you changed something that is used during initrd (/etc/crypttab is the most obvious example) b) initrd has leftovers after removing some packages (common problem during removal on NVIDIA drivers, I do not know if it still valid) or was not updated after installation of a package because packager forgot it c) changed hardware and want to make sure initrd includes necessary drivers (usually called via chroot) Just to name a few. Maybe developers sometimes need to read user forums to get a feeling about real problems users have. There is life beyond "zypper dup".
On 2023-03-30 11:37, Andrei Borzenkov wrote:
On Thu, Mar 30, 2023 at 12:16 PM Andreas Jaeger via openSUSE Factory <factory@lists.opensuse.org> wrote:
Carlos, why do you need to run mkinitrd yourself?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed,
a) you changed something that is used during initrd (/etc/crypttab is the most obvious example) b) initrd has leftovers after removing some packages (common problem during removal on NVIDIA drivers, I do not know if it still valid) or was not updated after installation of a package because packager forgot it c) changed hardware and want to make sure initrd includes necessary drivers (usually called via chroot)
Just to name a few.
Right, I have done all of that.
Maybe developers sometimes need to read user forums to get a feeling about real problems users have. There is life beyond "zypper dup".
+1. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On Thu, 30 Mar 2023 11:16:11 +0200 Andreas Jaeger via openSUSE Factory <factory@lists.opensuse.org> wrote:
Carlos, why do you need to run mkinitrd yourself? Or do you need to update an RPM package?
RPM packages create the initrd automatically when needed, so a manual invocation should not be needed,
In our local wiki mkinitrd is mentioned here: "Comment out omit_drivers in /etc/dracut.conf/60-nvidia-default.conf # https://bugzilla.opensuse.org/show_bug.cgi?id=1173733 # omit_drivers+="nvidia nvidia-drm nvidia-modeset nvidia-uvm " than run mkinitrd" Without this, no bootsplash after updating Nvidia drivers. Replace now with "dracut --regenerate-all" Bye, Carsten -- Various documentation updates and bugfixes (the best way to know that a stable kernel is approaching is to notice that somebody starts to spellcheck the kernel - it has so far never failed) -- Linus Torvalds in the annoucement for pre-2.1.99-3
Carsten Ziepke composed on 2023-03-30 17:54 (UTC+0200):
In our local wiki mkinitrd is mentioned here:
"Comment out omit_drivers in /etc/dracut.conf/60-nvidia-default.conf # https://bugzilla.opensuse.org/show_bug.cgi?id=1173733 # omit_drivers+="nvidia nvidia-drm nvidia-modeset nvidia-uvm " than run mkinitrd"
Without this, no bootsplash after updating Nvidia drivers.
Replace now with "dracut --regenerate-all"
That does not look like an actual equivalent to simply mkinitrd: MKINITRD(8) dracut MKINITRD(8) NAME mkinitrd-suse - is a compat wrapper, which calls dracut to generate an initramfs SYNOPSIS mkinitrd [OPTION...] DESCRIPTION mkinitrd creates an initramfs image <initrd-image> for the kernel with version <kernel-version> by calling dracut. Notice "an" initrd, twice. I certainly don't want all initrds rebuilt. Once an initrd worksforme, I don't want it to be altered: # lsattr /boot/initrd*t ----i---------e------- /boot/initrd-5.14.21-150400.24.18-default ----i---------e------- /boot/initrd-5.14.21-150400.24.21-default ----i---------e------- /boot/initrd-5.14.21-150400.24.33-default # Notice the newest above is not current. Newer kernels have broken support I require: https://bugzilla.opensuse.org/show_bug.cgi?id=1206935 IN_PROGRESS for nearly 2 months. :( -- 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
On 30/03/2023 10.47, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
There is no direct match between the arguments accepted by both commands. I'm afraid you need to check what arguments you're currently using with `mkinitrd`, and find their corresponding `dracut` arguments. Both commands provide `-h` for quick usage help. The main difference is that `mkinitrd` updates the bootloader configuration by default, using the `update-bootloader` command internally, unless called with the `-B' option.
On 2023-03-30 11:14, Antonio Feijoo via openSUSE Factory wrote:
On 30/03/2023 10.47, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
There is no direct match between the arguments accepted by both commands. I'm afraid you need to check what arguments you're currently using with `mkinitrd`, and find their corresponding `dracut` arguments. Both commands provide `-h` for quick usage help.
I don't remember ever using any parameter with mkinitrd, unless being told to do so at some point.
The main difference is that `mkinitrd` updates the bootloader configuration by default, using the `update-bootloader` command internally, unless called with the `-B' option.
I don't know that that command is. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
On 30/03/2023 11.30, Carlos E. R. wrote:
On 2023-03-30 11:14, Antonio Feijoo via openSUSE Factory wrote:
On 30/03/2023 10.47, Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
There is no direct match between the arguments accepted by both commands. I'm afraid you need to check what arguments you're currently using with `mkinitrd`, and find their corresponding `dracut` arguments. Both commands provide `-h` for quick usage help.
I don't remember ever using any parameter with mkinitrd, unless being told to do so at some point.
`mkinitrd` = `dracut -f --regenerate-all --logfile /var/log/YaST2/mkinitrd.log ; update-bootloader --refresh` - If you just want to build your current initrd, you can avoid `--regenerate-all`. There is also a nice `--parallel` option to speed up this process (not available using `mkinitrd`). - If you still want a log file, you can set `logfile=` in /etc/dracut.conf to avoid using `--logfile` on every call.
The main difference is that `mkinitrd` updates the bootloader configuration by default, using the `update-bootloader` command internally, unless called with the `-B' option.
I don't know that that command is.
For the purpose of the initrd generation, it updates `grub.cfg`, among other things.
Carlos E. R. wrote:
There is no direct match between the arguments accepted by both commands. I'm afraid you need to check what arguments you're currently using with `mkinitrd`, and find their corresponding `dracut` arguments. Both commands provide `-h` for quick usage help.
I don't remember ever using any parameter with mkinitrd, unless being told to do so at some point.
I think you can rest assured that you will be given direct instructions for dracut too :-) If you should have ideas of running it zourself, whether mkinitrd or dracut, reading the man page is advisable. I had the need when I was working on my new mythtv setup about a month ago - the initrd generated in 15.4 was missing something. -- Per Jessen, Zürich (12.8°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On Thu, Mar 30, 2023 at 12:14 PM Antonio Feijoo via openSUSE Factory <factory@lists.opensuse.org> wrote:
The main difference is that `mkinitrd` updates the bootloader configuration by default, using the `update-bootloader` command internally, unless called with the `-B' option.
There is no reason to call update-bootloader when *regenerating* existing initrd, which probably covers 99% of all use cases when it was used directly.
Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
Hi,
As you might know, for quite some time `mkinitrd` is just an incomplete wrapper that internally calls `dracut` and `update-bootloader` (unless it's called with `-B`).
Finally, all known packages that required it in their spec file or were found to be using it have been fixed. Hence, it's time to move on. The next `dracut` update in Factory will not provide the `dracut-mkinitrd-deprecated` package. This is planned to be submitted in mid-April, before 2023-04-14, so if you still use `mkinitrd` in any of your packages or custom scripts, please replace it with `dracut` (plus `update-bootloader` if necessary).
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
This deprecation was announced a while ago - I have also been used to mkinitrd, but for the last few initrds, I've switched to dracut. man dracut ? man dracut.conf ? (very cool feature, btw). Anyway, when you run "mkinitrd" it clearly says what your mkinitrd options were translated to, I think it's the first line of output or at least one of the very first. That is a good starting point. -- Per Jessen, Zürich (16.4°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-30 11:15, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 09:49, Antonio Feijoo via openSUSE Factory wrote:
...
Please advise us users what exact command concoction to use instead. Me, and many others, are used to just run "mkinitrd" for many years.
This deprecation was announced a while ago - I have also been used to mkinitrd, but for the last few initrds, I've switched to dracut.
I may have missed the announcement.
man dracut ? man dracut.conf ? (very cool feature, btw).
Anyway, when you run "mkinitrd" it clearly says what your mkinitrd options were translated to, I think it's the first line of output or at least one of the very first. That is a good starting point.
Trying. It prints hundreds of lines, I have to back a bunch in the terminal.
Telcontar:~ # mkinitrd Creating initrd: /boot/initrd-5.14.21-150400.24.28-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.28-default 5.14.21-150400.24.28-default dracut: dracut module 'systemd-repart' will not be installed, because command 'systemd-repart' could not be found! dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
Not a simple line... Wait, I see several "Executing" lines. Telcontar:~ # mkinitrd | grep Executing dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.28-default 5.14.21-150400.24.28-default dracut: dracut module 'systemd-repart' will not be installed, because command 'systemd-repart' could not be found! Sigh... not stdout. Correcting.
Telcontar:~ # mkinitrd 2>&1 | grep Executing dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.28-default 5.14.21-150400.24.28-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.33-default 5.14.21-150400.24.33-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.38-default 5.14.21-150400.24.38-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.41-default 5.14.21-150400.24.41-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.46-default 5.14.21-150400.24.46-default Telcontar:~ #
That's not that simple. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
On 2023-03-30 11:15, Per Jessen wrote:
This deprecation was announced a while ago - I have also been used to mkinitrd, but for the last few initrds, I've switched to dracut.
I may have missed the announcement.
18 May 2021: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/message/...
Anyway, when you run "mkinitrd" it clearly says what your mkinitrd options were translated to, I think it's the first line of output or at least one of the very first. That is a good starting point. Trying.
It prints hundreds of lines, I have to back a bunch in the terminal.
Oh dear, that's terrible.
Telcontar:~ # mkinitrd Creating initrd: /boot/initrd-5.14.21-150400.24.28-default dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.28-default 5.14.21-150400.24.28-default dracut: dracut module 'systemd-repart' will not be installed, because command 'systemd-repart' could not be found! dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
Not a simple line...
two keyword arguments, two positional?
Wait, I see several "Executing" lines.
Telcontar:~ # mkinitrd | grep Executing dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.14.21-150400.24.28-default 5.14.21-150400.24.28-default
The above is what matters.
That's not that simple.
Why does it have to be "simple"? Besides, you take that example, then you peruse the man page and you might come up with : dracut /boot/initrd4 6.2.8-1-default -- Per Jessen, Zürich (14.6°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
On 2023-03-30 12:48, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 11:15, Per Jessen wrote:
That's not that simple.
Why does it have to be "simple"?
Because it can't be simpler than "mkinitrd". Very simple to remember. Has been there since the past century. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Dne čtvrtek 30. března 2023 13:30:43 CEST, Carlos E. R. napsal(a):
On 2023-03-30 12:48, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 11:15, Per Jessen wrote:
That's not that simple.
Why does it have to be "simple"?
Because it can't be simpler than "mkinitrd". Very simple to remember.
Make an alias.
Has been there since the past century.
Things change. -- Vojtěch Zeisek https://trapa.cz/ Komunita openSUSE GNU/Linuxu Community of the openSUSE GNU/Linux https://www.opensuse.org/
Carlos E. R. wrote:
On 2023-03-30 12:48, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 11:15, Per Jessen wrote:
That's not that simple.
Why does it have to be "simple"?
Because it can't be simpler than "mkinitrd". Very simple to remember. Has been there since the past century.
This is going way off-topic - let me just give you the solution so we can finish this : alias mkinitrd="dracut --regenerate-all" -- Per Jessen, Zürich (15.6°C) What is English for "querulant" ?
On 2023-03-30 13:55, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 12:48, Per Jessen wrote:
Carlos E. R. wrote:
On 2023-03-30 11:15, Per Jessen wrote:
That's not that simple.
Why does it have to be "simple"?
Because it can't be simpler than "mkinitrd". Very simple to remember. Has been there since the past century.
This is going way off-topic - let me just give you the solution so we can finish this :
alias mkinitrd="dracut --regenerate-all"
It has drifted because you people asked more questions. I only asked one. I know how to do aliases or scripts, but I did not know what to put in them. It is not clear to me if I also should run "update-bootloader", though. According to Antonio, I should use: ]> `mkinitrd` = `dracut -f --regenerate-all --logfile /var/log/YaST2/mkinitrd.log ; update-bootloader --refresh` which is what I will do. Or, copy the old script to /usr/local/sbin, unless that is not advisable. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
Carlos E. R. wrote:
Or, copy the old script to /usr/local/sbin, unless that is not advisable.
Or - oh horror - move with the times. I still think the main point is that you don't actually dabble with building initrds yourself, you are happy to follow instructions to do so, when needed. In the future, no one is going to direct you to run mkinitrd, so what is the point of having an alias. -- Per Jessen, Zürich (18.2°C) Member, openSUSE Heroes (2016 - present) We're hiring - https://en.opensuse.org/openSUSE:Heroes
Am 30.03.23 um 18:42 schrieb Per Jessen:
Carlos E. R. wrote:
Or, copy the old script to /usr/local/sbin, unless that is not advisable.
Or - oh horror - move with the times.
I still think the main point is that you don't actually dabble with building initrds yourself, you are happy to follow instructions to do so, when needed. In the future, no one is going to direct you to run mkinitrd, so what is the point of having an alias.
well, the instructions you will google will lack 1 or 2 years... and you will somtimes face a bug for the workaround you will nee to do yourselfe a mkinitrd. example: https://bugzilla.opensuse.org/show_bug.cgi?id=1181768 but this mails here will move away from the original post/problem, so maybe we should stop or go to another list. simoN -- www.becherer.de ----------------------------------------------- - Das ist die vorlaeufig endgueltige Version! - Herbert C. Maier Dipl.-Ing. (FH) -----------------------------------------------
On 2023-03-30 18:42, Per Jessen wrote:
Carlos E. R. wrote:
Or, copy the old script to /usr/local/sbin, unless that is not advisable.
Or - oh horror - move with the times.
I think I'm entitled to be recognized as an old fart by now :-p
I still think the main point is that you don't actually dabble with building initrds yourself, you are happy to follow instructions to do so, when needed. In the future, no one is going to direct you to run mkinitrd, so what is the point of having an alias.
Per, You may have read from me and Andrei the multiples scenarios in which people have to run mkinitrd manually. I have been in most of them. Ok, I have simply updated my notes to the new commands (two, they are two), because I will not remember the concoction. (Feel free to answer on a different list if you wish) -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)
participants (12)
-
Andreas Jaeger
-
Andrei Borzenkov
-
Antonio Feijoo
-
Bengt Gördén
-
Carlos E. R.
-
Carsten Ziepke
-
Felix Miata
-
Manfred Hollstein
-
Per Jessen
-
Pit Suetterlin
-
Simon Becherer
-
Vojtěch Zeisek