On 11/30/22 03:57, nl6720 wrote:
The HOOKS section of the mkinitcpio wiki page somewhat explains how the order works.
For build hooks, unless they add conflicting files, the order shouldn't matter. The exception would be the systemd and autodetect hooks which do more than just add files.
For runtime hooks in busybox based initramfs, the wiki lists the order of the functions used in hooks: run_earlyhook, run_hook, run_latehook and lastly run_cleanuphook. To find out which hook uses which function requires reading its contents. So if you have one hook with run_earlyhook and one with run_hook, their order in the HOOKS array in mkinitcpio.conf does not matter. But if you have two using run_hook, then it might. For example, both the encrypt and keymap hooks use run_hook. Generally, most people will want the keymap to be set before password input.
The keyboard and filesystems hooks you mentioned are only build hooks that do not add conflicting files, so the order between them does not matter.
Thank you, That clears it all up (and would make a nice addition to the wiki). I had read through the wiki, but obviously wasn't versed enough on the subject to glean this ordering info from it. (I suspect a lot of Arch users fall into the same boat). For those that are familiar or contribute to mkinitcpio -- it probably seems obvious -- but that's the way it always goes. I can assure you, even as an Arch user of 14+ years, the inner-workings of the of mkinitcpio were still a bit of a mystery. (now the old DEAMONS() array in rc.conf -- that I understood :) Thanks again, this was really helpful. -- David C. Rankin, J.D.,P.E.