Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

Em maio 21, 2019 17:29 Bjoern Franke via arch-general escreveu:



Just dracut -f /boot/initramfs-linux.img. It is that simple.


Tried it, the output looked fine:

https://p.rrbone.net/paste/FV7HMpE7#

But while booting dracut hang on "initqueue hooks"



This output is a json file, so I'm not sure what you're outputting there.

Anyway, I got this as well on a VM. You can pass rd.shell, rd.timeout and 
rd.retry
to your cmdline. Please refer to dracut.cmdline man page. Also, make sure you 
have the
proper root= and other arguments as well on your cmdline.

Regards,
Giancarlo Razzolini

pgpF9vEbHMPrB.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Bjoern Franke via arch-general

> Just dracut -f /boot/initramfs-linux.img. It is that simple.

Tried it, the output looked fine:

https://p.rrbone.net/paste/FV7HMpE7#

But while booting dracut hang on "initqueue hooks"

Thanks for your efforts,

Bjoern



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
On 5/21/19 1:21 PM, Giancarlo Razzolini wrote:

>> Got text prompt for passphrase not graphical - think there is a way to
>> get graphical as well but need to read further how to do that. I prefer
>> text as I also can see the boot progress details which is helpful.
>> Still, be good to know how to get the graphical prompt anyway.
>>
> 
> I suppose as more and more people start using it, we'll eventually have
> instructions on how to do these more custom environments.
> 

Definitely - getting dracut in first then later on it should not be too
hard to add a plymouth[1] package if there's interest in a more
graphical boot.

thanks again for doing this.

gene

[1] https://github.com/freedesktop/plymouth/tree/master/src


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
On 5/21/19 2:48 PM, Giancarlo Razzolini wrote:
> Em maio 21, 2019 15:42 Genes Lists via arch-general escreveu:
...
> 
> Loading the microcode before will probably always work and should
> continue to be the desirable solution.
..

Funnily enough, while I do have intel-ucode package installed I don't
have amd-ucode. The dracut script seems to have found it somewhere I
suppose - not sure where yet.

thank you.

gene


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Michał Zegan


W dniu 21.05.2019 o 20:48, Giancarlo Razzolini via arch-general pisze:
> Em maio 21, 2019 15:42 Genes Lists via arch-general escreveu:
>> Early Microcode and initrd.
>>
>> I notice that the AMD microcode is [1] in the initrd while the intel
>> microcode is not.
>>
>> Booting with option:
>> initrd=/boot/intel-ucode.img
>> to get the microcode installed early works fine with dracut as it always
>> has.
>>
>> Is this something that will remain the same as now or does this
>> potentially change under dracut?
>>
> 
> This probably needs to be changed. No point in having AMD microcode into
> the initramfs
> if you have an intel processor. It's wasted space.
> 
> Loading the microcode before will probably always work and should
> continue to be the
> desirable solution.
> 
> Regards,
> Giancarlo Razzolini

But I believe dracut may handle microcode itself too, at least in fedora
it is packed with the core initramfs somehow.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

Em maio 21, 2019 15:42 Genes Lists via arch-general escreveu:

Early Microcode and initrd.

I notice that the AMD microcode is [1] in the initrd while the intel
microcode is not.

Booting with option:
initrd=/boot/intel-ucode.img
to get the microcode installed early works fine with dracut as it always
has.

Is this something that will remain the same as now or does this
potentially change under dracut?



This probably needs to be changed. No point in having AMD microcode into the 
initramfs
if you have an intel processor. It's wasted space.

Loading the microcode before will probably always work and should continue to 
be the
desirable solution.

Regards,
Giancarlo Razzolini

pgppbqe8Wqzbi.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
Early Microcode and initrd.

I notice that the AMD microcode is [1] in the initrd while the intel
microcode is not.

Booting with option:
initrd=/boot/intel-ucode.img
to get the microcode installed early works fine with dracut as it always
has.

Is this something that will remain the same as now or does this
potentially change under dracut?

thanks

gene

[1] lsinitrd shows:

Early CPIO image

drwxr-xr-x   3 root root0 May 21 11:48 .
-rw-r--r--   1 root root2 May 21 11:48 early_cpio
drwxr-xr-x   3 root root0 May 21 11:48 kernel
drwxr-xr-x   3 root root0 May 21 11:48 kernel/x86
drwxr-xr-x   2 root root0 May 21 11:48 kernel/x86/microcode
-rw-r--r--   1 root root30546 May 21 11:48
kernel/x86/microcode/AuthenticAMD.bin


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

Em maio 21, 2019 15:15 Andy Pieters escreveu:

What's the rationale for going dracut? I'm quite happy with mkinitcpio



I think I've addressed this in the first email. I'm also quite happy with 
mkinitcpio,
and I myself maintain several mkinitcpio hooks that would need to be re-written 
for dracut.

But, from the mkinitcpio development perspective, it lacks several things that 
would be necessary
to develop it further. We don't have a testing suite, which makes the 
development process quite
tiresome and error prone. Our network booting code is not working for even the 
simplest cases.
We have two ways to boot the system today, and depending on the hooks 
combinations we have issues.

Dracut by default uses systemd and I think that will be the supported way to 
boot Arch. Even though
dracut can use a non systemd initramfs, we should make things more uniform. 
Whomever wants to hack
dracut, will have much more ways to do so than we have with mkinitcpio 
currently.

I know, change is not always good for everyone, but I think that in the long 
term Arch will only
benefit from this change. Also, I believe that people interested in using 
mkinitcpio, will be more
than able to help maintain it, when we eventually (if) remove it from our 
repositories.

Heck, I might maintain it myself on the side, since I have a lot of stuff going 
on for it. But, I
believe that for Arch official initramfs system, we should replace it. There 
are other options too,
I have considered dracut because it currently fills in a gap we have on the 
development process, while
also fixing all the corner cases mkinitcpio doesn't support well today.

Regards,
Giancarlo Razzolini

pgpKX26GCp9qZ.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread David C. Rankin
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.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Andy Pieters
What's the rationale for going dracut? I'm quite happy with mkinitcpio


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

Em maio 21, 2019 13:24 Genes Lists via arch-general escreveu:

1) Feedback:
Tested one computer and it worked fine.
Used refind to boot - it has encrytped /home but not root.
Got text prompt for passphrase not graphical - think there is a way to
get graphical as well but need to read further how to do that. I prefer
text as I also can see the boot progress details which is helpful.
Still, be good to know how to get the graphical prompt anyway.



I suppose as more and more people start using it, we'll eventually have
instructions on how to do these more custom environments.


Created initrd using
# dracut --kver xxx



No need for using --kver, unless your booted kernel differs from the installed
one. The pacman hooks will have to use kver, most likely.


This seems to contain pretty much everything best I can tell

2) Question:
   Arch typically has used unversioned initrd images which has the
   convenience that the boot standzas don't need updating on new kernel.



Just dracut -f /boot/initramfs-linux.img. It is that simple.


or perhps soft link (ln -s)?



We don't need to make things that complex.

Regards,
Giancarlo Razzolini

pgpAlo4QSl3Qg.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

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

pgpUjUthoV3Xo.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Giancarlo Razzolini via arch-general

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

pgpWzD8ShnTjf.pgp
Description: PGP signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
On 5/21/19 12:41 PM, Doug Newgard via arch-general wrote:
>
> 
> Since ln won't work on vfat, that's not really an option for a lot of people.
> 

Ah thanks and good point.

While it would actualy work with refind ( as the images are on ext4
/boot partition and only the refind efi images sit in the ESP partition)
the solution should be agostic to boot manager.

So that means no links; easy enough and same as we do now anyway.

Thank you.

gene


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Doug Newgard via arch-general
On Tue, 21 May 2019 18:28:50 +0200
Damjan Georgievski via arch-general  wrote:

> > 2) Question:
> >Arch typically has used unversioned initrd images which has the
> >convenience that the boot standzas don't need updating on new kernel.
> >  
> 
> This can (also) be fixed if Arch implements the `kerne-install` [1]
> mechanism to update the boot-loader stanzas.
> 
> 
> [1]
> https://www.freedesktop.org/software/systemd/man/kernel-install.html
> 

Automated config is evil.


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Doug Newgard via arch-general
On Tue, 21 May 2019 12:24:09 -0400
Genes Lists via arch-general  wrote:

> 1) Feedback:
> Tested one computer and it worked fine.
> Used refind to boot - it has encrytped /home but not root.
> Got text prompt for passphrase not graphical - think there is a way to
> get graphical as well but need to read further how to do that. I prefer
> text as I also can see the boot progress details which is helpful.
> Still, be good to know how to get the graphical prompt anyway.
> 
> Created initrd using
> # dracut --kver xxx
> 
> This seems to contain pretty much everything best I can tell
> 
> 2) Question:
>Arch typically has used unversioned initrd images which has the
>convenience that the boot standzas don't need updating on new kernel.
> 
> Which is preferable way to deal with this with dracut:
> 
> 1) Unversioned:
> 
># dracut initramfs-linux.img --kver 5.1.3-arch1-1-ARCH
> 
> 2) Keep version but link to unnamed:
> 
># dracut --kver 5.1.3-arch1-1-ARCH
># ln /boot/initramfs-5.1.3-arch-1-ARCH.img initramfs-linux.img
> 
> or perhps soft link (ln -s)?
> 
> thanks.

Since ln won't work on vfat, that's not really an option for a lot of people.


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
1) Feedback:
Tested one computer and it worked fine.
Used refind to boot - it has encrytped /home but not root.
Got text prompt for passphrase not graphical - think there is a way to
get graphical as well but need to read further how to do that. I prefer
text as I also can see the boot progress details which is helpful.
Still, be good to know how to get the graphical prompt anyway.

Created initrd using
# dracut --kver xxx

This seems to contain pretty much everything best I can tell

2) Question:
   Arch typically has used unversioned initrd images which has the
   convenience that the boot standzas don't need updating on new kernel.

Which is preferable way to deal with this with dracut:

1) Unversioned:

   # dracut initramfs-linux.img --kver 5.1.3-arch1-1-ARCH

2) Keep version but link to unnamed:

   # dracut --kver 5.1.3-arch1-1-ARCH
   # ln /boot/initramfs-5.1.3-arch-1-ARCH.img initramfs-linux.img

or perhps soft link (ln -s)?

thanks.


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Eli Schwartz via arch-general
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



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Doug Newgard via arch-general
On Tue, 21 May 2019 17:21:31 +0200
Lone_Wolf  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.


Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Lone_Wolf



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



Re: [arch-general] [arch-dev-public] Mkinitcpio replacement with Dracut

2019-05-21 Thread Genes Lists via arch-general
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