Deprecated hooks - mkinitcpio.conf - mdadm (mdadm_udev) & sd-lvm2 (lvm2)

I did search the forum to see what types of discussions were occurring, and found a few hits.

The file mkinitcpio.conf had a pacnew during the last update. I haven’t customized mkinitcpio.conf. Manjaro’s settings are adequate. The change was:

# mkinitcpio.conf
HOOKS=(base udev autodetect modconf block keyboard keymap filesystems fsck)

# mkinitcpio.conf.pacnew
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

I was going to investigate and executed mkinitcpio -L, which is when I came across the deprecated notes:

¹ This hook is deprecated in favor of 'mdadm_udev'
² This hook is deprecated in favor of 'lvm2'

I see that both hooks are symlinked appropriately in /usr/lib/initcpio/install/,

sd-lvm2 doesn’t appear in mkinitcpio.conf at all.

But, mdadm does appear in mkinitcpio.conf in a commented section::

##   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)

Even though it is commented and symlinked, this probably should be updated to reflect the correct hook (mdadm to mdadm_udev) to prevent any confusion in the future.

mkinitcpio.conf hasn’t been touched for well over a year.

Probably. I suggest creating an upstream issue.

The Arch Wiki has been updated to reflect the changes, anyway:

Note:

  • Some hooks that may be required for your system like lvm2, mdadm_udev, and encrypt are NOT enabled by default. Read the #HOOKS section carefully for instructions.

Well, Manjaro isn’t using that mkinitcpio.

We use the upstream mkinitcpio.conf. The only modification is this patch that reverts this commit.

1 Like

Yeah, if you look at manjaro gitlab, that’s what you would think. But compare actual packages and files.
Even mkinitcpio.conf doesn’t include only that patch - there is also this since 31-2.0:

# 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"

…for whatever reason. Was already looking at this a month or so ago where does this come from, but good luck finding anything on manjaro gitlab…maybe it’s there, maybe someone already built a newer package with his own PKGBUILD somewhere on his laptop…who knows… :man_shrugging:

1 Like

It looks like the original topics’ subject, which are comments or commented lines, lies upstream.

But there is more happening here. Here is some more information from my virtual machine about /etc/mkinitcpio.conf

1. compare arch with unsquashed RUAH iso manjaro-xfce-21.3.0-220617-linux515, manjaro/x86_64/rootfs.sfs

===> diff arch 01-iso\(619\).mkinitcpio.conf 
55c55
< # Use this to compress the initramfs image. By default, zstd compression
---
> # Use this to compress the initramfs image. By default, gzip compression
57d56
< #COMPRESSION="zstd"
63a63
> #COMPRESSION="zstd"

NOTE 1: This looks okay. It is the arch mkinitcpio.conf plus manjaro patch.
NOTE 2: Arch github matches an Arch virtual machine too.

2. Compare Manjaro iso with Manjaro after install

===> diff 01-iso\(619\).mkinitcpio.conf 02-install\(619\).mkinitcpio.conf 
6,7c6,7
< #     MODULES=(piix ide_disk reiserfs)
< MODULES=()
---
> #     MODULES=(qxl bochs_drm virtio-gpu virtio virtio_scsi virtio_blk virtio_pci virtio_net virtio_ring)
> MODULES=(qxl bochs_drm virtio-gpu virtio virtio_scsi virtio_blk virtio_pci virtio_net virtio_ring)
19c19
< FILES=()
---
> FILES=""
52c52
< HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
---
> HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems fsck"

NOTE 1: HHHmmm, MODULES were added, FILES was change from array () to string “”, and HOOKS changed. Could not find changes at gitlab.manjaro.org.
NOTE 2: I created a topic regarding the bochs_drm. At this time, I removed bochs_drm from MODULES.

3. compare Manjaro after install with Manjaro after latest update

===> diff 02-install\(619\).mkinitcpio.conf 04-current\(0729\).mkinitcpio.conf 
6,7c6,7
< #     MODULES=(qxl bochs_drm virtio-gpu virtio virtio_scsi virtio_blk virtio_pci virtio_net virtio_ring)
< MODULES=(qxl bochs_drm virtio-gpu virtio virtio_scsi virtio_blk virtio_pci virtio_net virtio_ring)
---
> #     MODULES=(piix ide_disk reiserfs)
> MODULES=()
19c19
< FILES=""
---
> FILES=()
52c52
< HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems fsck"
---
> HOOKS=(base udev autodetect modconf block filesystems keyboard 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"

NOTE 1: HHHmmm, MODULES removed, FILES changed back to array (), HOOKS changed, and MODULE_DECOMPRESS section added.
NOTE 2: The extra section was also mentioned by @zbe.

08/04/22: Captured output from the pacman command

...
core/mkinitcpio                       31-2                          31-2.0                          0.00 MiB       0.05 MiB
...
upgrading mkinitcpio...
warning: /etc/mkinitcpio.conf installed as /etc/mkinitcpio.conf.pacnew
...

It’s a mystery where these changes are coming from. :thinking:

If I can provide additional information to help, please let me know.


Moderater edit: Fixed broken link