You are not logged in.
Recently some changes were made to the default mkinitcpio.conf. I have no idea when precisely that was, though that is not relevant to my question. In any case, these are the changes I am talking about:
diff /etc/mkinitcpio.conf /etc/mkinitcpio.conf.pacnew
6c6
< # MODULES=(piix ide_disk reiserfs)
---
> # MODULES=(usbhid xhci_hcd)
32c32
< ## No raid, lvm2, or encrypted root is needed.
---
> ## No RAID, lvm2, or encrypted root is needed.
37c37
< # HOOKS=(base udev autodetect block filesystems)
---
> # HOOKS=(base udev autodetect modconf block filesystems fsck)
41c41
< # HOOKS=(base udev block filesystems)
---
> # HOOKS=(base udev modconf block filesystems fsck)
43,45c43,45
< ## This setup assembles a pata mdadm array with an encrypted root FS.
< ## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
< # HOOKS=(base udev block mdadm encrypt filesystems)
---
> ## This setup assembles a mdadm array with an encrypted root file system.
> ## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
> # HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
47,48c47,48
< ## This setup loads an lvm2 volume group on a usb device.
< # HOOKS=(base udev block lvm2 filesystems)
---
> ## This setup loads an lvm2 volume group.
> # HOOKS=(base udev modconf block lvm2 filesystems fsck)
51,52c51,52
< # usr, fsck and shutdown hooks.
< HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
---
> # usr and fsck hooks.
> HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
67a68,73
>
> # MODULES_DECOMPRESS
> # Decompress kernel modules during initramfs creation.
> # Enable to speedup boot process, disable to save RAM
> # during early userspace. Switch (yes/no).
> #MODULES_DECOMPRESS="yes"
My question is this: there were quite a few changes. What is the overall purpose of them? In particular the default hooks went from
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
to
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
So not only hooks were added, but their order changed, for example the keyboard hook.
The reason I ask is that while my desktop and laptop still booted with the previous settings, I would like to bring my settings close to the default. In the case of the desktop I was using the default hooks, however for the laptop I had made a number of changes because it has a more complicated configuration. I ask for more information as I don't want to shoot myself in the foot!
Offline
Only kms, keymap & consolefont have been sorted in (by the evil wiki admin)
https://gitlab.archlinux.org/archlinux/ … quests/126
kms does https://wiki.archlinux.org/title/Kernel … _KMS_start - the other ones are mostly relevant for encrypted systems.
Offline
Note that the keymap & consolefont hooks will fail unless /etc/vconsole.conf exists.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Even on an encrypted system, you may not need keymap or consolefont, if your machine boots at the moment (e.g. because you have a US keyboard and don't need special characters or layout to decrypt).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I would like to bring my settings close to the default
Why? Would it not make more sense to customise it for your needs? For example the new KMS hook isn't needed if you add your graphics driver to the MODULES array.
See also http://blog.falconindy.com/articles/opt … tcpio.html
Offline
Thanks Seth for the pointer to the commit. I am still left wondering why the order changed (for example keypad) as it is not obvious from the commit log.
Thanks, Lone_Wolf and cfr. I will look into what you said.
Thanks, Head_on_a_Stick. I will look into your idea about using MODULES. Generally I like to have my settings close to the default settings so that if the default changes (pacnew appears) I can look at it and try to figure out if it affects me or not. What I do then is I port my changes on top of the new version of the configuration file.
Offline
Do you mean the 'keyboard' hook?
I don't know, but I suspect it is because having it earlier by default will avoid problems when people add encrypt or sd-encrypt hooks and where the keyboard is not default US or special characters are needed to decrypt. In that case, you need keyboard before decrypt.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Do you mean the 'keyboard' hook?
I don't know, but I suspect it is because having it earlier by default will avoid problems when people add encrypt or sd-encrypt hooks and where the keyboard is not default US or special characters are needed to decrypt. In that case, you need keyboard before decrypt.
Yes, I meant keyboard hook. Thanks, cfr.
Offline
Regrouping, I presume.
The order of the hooks matters only inbetween some of them, but eg. "keyboard" and "keymap" and "block", "filesystems" and "fsck" are thematically related.
"keyboard" is a bit stray in the line up of "block filesystems keyboard fsck"
Offline