Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut
On 5/20/19 10:41 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi All,
...
In this initial phase I want to ask as many of you to test this as a replacement to mkinitcpio in your setups, as many as possible, and in as many scenarios as possible. We will
... I'm an arch tester and I'd be happy to test dracut. It would be helpful if you could create a little write-up on 'how to switch' from mkinitcpio to dracut. Its straightforward for me to add a boot stanza to refind to use the dracut img. And I assume modules now in HOOKS would move to /etc/dracut.conf.d/hooks.conf or similar. All being well, the kernel package will need to be modified to update /usr/share/libalpm/hooks/60-linux.hook to now call dracut. Thanks for working on this. gene
On 21-05-2019 16:26, Genes Lists via arch-general wrote:
On 5/20/19 10:41 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi All,
...
In this initial phase I want to ask as many of you to test this as a replacement to mkinitcpio in your setups, as many as possible, and in as many scenarios as possible. We will ...
I'm an arch tester and I'd be happy to test dracut.
It would be helpful if you could create a little write-up on 'how to switch' from mkinitcpio to dracut.
Its straightforward for me to add a boot stanza to refind to use the dracut img.
And I assume modules now in HOOKS would move to /etc/dracut.conf.d/hooks.conf or similar.
All being well, the kernel package will need to be modified to update
/usr/share/libalpm/hooks/60-linux.hook
to now call dracut.
Thanks for working on this.
gene
from https://dracut.wiki.kernel.org/index.php/Main_Page : * Scripts that end up on the initrd should be POSIX compliant. dracut will try to use /bin/dash as /bin/sh for the initrd if it is available, so you should install it on your system -- dash aims for strict POSIX compliance to the extent possible. * Hooks MUST be POSIX compliant -- they are sourced by the init script, and having a bashism break your user's ability to boot really sucks. Seems like having dracut depending on bash may not be a good idea. Or is there a way to make sure dracut scripts & hooks will use bash in POSIX-compliant mode ? LW
On Tue, 21 May 2019 17:21:31 +0200 Lone_Wolf <lonewolf@xs4all.nl> wrote:
Seems like having dracut depending on bash may not be a good idea.
Or is there a way to make sure dracut scripts & hooks will use bash in POSIX-compliant mode ?
LW
Bash runs POSIX scripts just fine. No need to do anything.
On 5/21/19 11:21 AM, Lone_Wolf wrote:
On 21-05-2019 16:26, Genes Lists via arch-general wrote:
On 5/20/19 10:41 PM, Giancarlo Razzolini via arch-dev-public wrote:
Hi All,
...
In this initial phase I want to ask as many of you to test this as a replacement to mkinitcpio in your setups, as many as possible, and in as many scenarios as possible. We will ...
I'm an arch tester and I'd be happy to test dracut.
It would be helpful if you could create a little write-up on 'how to switch' from mkinitcpio to dracut.
Its straightforward for me to add a boot stanza to refind to use the dracut img.
And I assume modules now in HOOKS would move to /etc/dracut.conf.d/hooks.conf or similar.
All being well, the kernel package will need to be modified to update
/usr/share/libalpm/hooks/60-linux.hook
to now call dracut.
Thanks for working on this.
gene
from https://dracut.wiki.kernel.org/index.php/Main_Page :
* Scripts that end up on the initrd should be POSIX compliant. dracut will try to use /bin/dash as /bin/sh for the initrd if it is available, so you should install it on your system -- dash aims for strict POSIX compliance to the extent possible. * Hooks MUST be POSIX compliant -- they are sourced by the init script, and having a bashism break your user's ability to boot really sucks.
Seems like having dracut depending on bash may not be a good idea.
Or is there a way to make sure dracut scripts & hooks will use bash in POSIX-compliant mode ?
POSIX compliant means that scripts must run with either bash or POSIX sh, not "only in bash". So, on the contrary, dracut is broken stuff when trying to use POSIX, because their own current official hooks bundled by the upstream dracut project are not POSIX compliant and therefore only work with bash, but they intend to fix that and at least some are fixed in git master (although I haven't tested), see for example https://github.com/dracutdevs/dracut/pull/516 POSIX-compliant mode is exactly the opposite of what we want. -- Eli Schwartz Bug Wrangler and Trusted User
Em maio 21, 2019 12:21 Lone_Wolf escreveu:
from https://dracut.wiki.kernel.org/index.php/Main_Page :
* Scripts that end up on the initrd should be POSIX compliant. dracut will try to use /bin/dash as /bin/sh for the initrd if it is available, so you should install it on your system -- dash aims for strict POSIX compliance to the extent possible. * Hooks MUST be POSIX compliant -- they are sourced by the init script, and having a bashism break your user's ability to boot really sucks.
Seems like having dracut depending on bash may not be a good idea.
Or is there a way to make sure dracut scripts & hooks will use bash in POSIX-compliant mode ?
If you have dash installed dracut will use it instead of bash. It is *that* simple. But, I'm not much concerned here about POSIX compliance as I'm concerned about it actually being a good replacemente to mkinitcpio *and* actually booting the machines of users. I based my package on fedora's. So, the dependencies were carefully replicated to avoid issues. But anyone can hack it later to use dash or busybox. Regards, Giancarlo Razzolini
Em maio 21, 2019 11:26 Genes Lists via arch-general escreveu:
...
I'm an arch tester and I'd be happy to test dracut.
It would be helpful if you could create a little write-up on 'how to switch' from mkinitcpio to dracut.
Just run dracut =D. But seriously, I'll work on a wiki page about this. Dracut has several man pages too, I suggest starting with dracut.cmdline.
And I assume modules now in HOOKS would move to /etc/dracut.conf.d/hooks.conf or similar.
I have not yet decided on the configuration, but I think I'll have something similar to mkinitcpio.conf as /etc/dracut.conf.
All being well, the kernel package will need to be modified to update
/usr/share/libalpm/hooks/60-linux.hook
to now call dracut.
I'll stress this, dracut and mkinitcpio will co-exist for a *long* time. So, each will have their own hooks for updating the images. Regards, Giancarlo Razzolini
On 05/21/2019 12:06 PM, Giancarlo Razzolini via arch-general wrote:
I'll stress this, dracut and mkinitcpio will co-exist for a *long* time. So, each will have their own hooks for updating the images.
Thank you. mkinitcpio isn't broken and using both SuSE with dracut and Arch with mkinitcpio -- I prefer the Arch mkinitcpio approach. -- David C. Rankin, J.D.,P.E.
Should this work with a minimal initramfs, without udev? I don't know how to transfer the mkinitcpio config to dracut to test this properly.
Em maio 29, 2019 18:49 Michael Lojkovic via arch-general escreveu:
Should this work with a minimal initramfs, without udev? I don't know how to transfer the mkinitcpio config to dracut to test this properly.
It would help if you upload your current config/preset somewhere. I'm not sure anything works properly without udev these days, except for very simple setups. Also, if you're talking about non x86_64 platforms, the dracut Arch package is compiled just for that platform. For others, I guess this question would be better asked upstream. Regards, Giancarlo Razzolini
participants (7)
-
David C. Rankin
-
Doug Newgard
-
Eli Schwartz
-
Genes Lists
-
Giancarlo Razzolini
-
Lone_Wolf
-
Michael Lojkovic