Addendum’s:
My current /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
MODULES=(
usbhid
xhci_pci
xhci_hcd
crc32c-intel
nvidia
nvidia_modeset
nvidia_uvm
nvidia_drm
)
# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image. This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES=(
/etc/cryptfs-keys.d/root
# /etc/cryptfs-keys.d/swap
)
# HOOKS
# This is the most important setting in this file. The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added. Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
## This setup specifies all modules in the MODULES setting above.
## No raid, lvm2, or encrypted root is needed.
# HOOKS=(base)
#
## This setup will autodetect keyboard keymap all modules for your system and should
## work as a sane default
# HOOKS=(base udev autodetect keyboard keymap block encrypt lvm2 filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block encrypt lvm2 filesystems)
#
## 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 lvm2 mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block encrypt lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
#HOOKS=(base udev autodetect keymap modconf block encrypt lvm2 filesystems keyboard fsck)
HOOKS=(
base
systemd
autodetect
modconf
block
keyboard
keymap
# sd-vconsole
sd-encrypt
sd-lvm2
# lvm2
filesystems
bootsplash-manjaro
# bootsplash-vendor
# bootsplash-xfce
fsck
# consolefont
)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
#COMPRESSION="zstd"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
Example mount units for the ESP
efi.mount
# /etc/systemd/system/efi.mount
#
# To install use:
# systemctl enable --now efi.automount
# systemctl disable --now efi.automount
#
[Unit]
Description=ESP
Documentation=man:systemd.mount(5)
Documentation=man:systemd.automount(5)
After=swap.target
# These get set automatically
#Conflicts=umount.target
#Before=umount.target
#After=-.mount
# We use noauto, so leave this commented.
#Before=local-fs.target
[Mount]
Where=/efi
Type=vfat
Options=noauto,nofail,rw,gid=adm,relatime,fmask=0002,dmask=0002,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
TimeoutSec=30
efi.automount
# /etc/systemd/system/efi.automount
[Unit]
Description=ESP
Documentation=man:systemd.mount(5)
Documentation=man:systemd.automount(5)
[Automount]
Where=/efi
DirectoryMode=0775
TimeoutIdleSec=30
[Install]
#WantedBy=multi-user.target
WantedBy=local-fs.target
Also=boot.automount
efi.mount.d/hd.conf
# /etc/systemd/system/efi.mount.d/hd.conf
[Unit]
Description=ESP (HD)
After=blockdev@dev-disk-by\x2dlabel-ESP.target
BindsTo=dev-disk-by\x2dlabel-ESP.device
# Do a fsck on the partition
Requires=systemd-fsck@dev-disk-by\x2dlabel-ESP.service
After=systemd-fsck@dev-disk-by\x2dlabel-ESP.service
[Mount]
What=/dev/disk/by-label/ESP
Example mount units for the /boot
boot.mount
# /etc/systemd/system/boot.mount
#
# To install use:
# systemctl enable --now boot.automount
# systemctl disable --now boot.automount
#
[Unit]
Description=/boot
Documentation=man:systemd.mount(5)
Documentation=man:systemd.automount(5)
Conflicts=umount.target
Before=local-fs.target umount.target
RequiresMountsFor=/efi
After=efi.mount
BindsTo=efi.mount
[Mount]
Where=/boot
What=/efi/Manjaro
Type=none
Options=bind
TimeoutSec=30
boot.automount
# /etc/systemd/system/boot.automount
[Unit]
Description=/boot
Documentation=man:systemd.mount(5)
Documentation=man:systemd.automount(5)
After=efi.automount
BindsTo=efi.automount
[Automount]
Where=/boot
DirectoryMode=0775
TimeoutIdleSec=30
[Install]
#WantedBy=multi-user.target
WantedBy=local-fs.target
Also=efi.automount
Feel free to comment with your opinions and eventual corrections.