You are not logged in.

#1 2013-08-05 09:52:32

NyQuil
Member
Registered: 2013-05-16
Posts: 10

mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

Hi,

it seems that building an initrd-image with mkinitcpio doesn't apply the configured "custom" hooks from the mkinitcpio.conf anymore. I noticed that with the plymouth boot splash, which comes up too late due to its start through systemd just before the end of the boot process. It normally uses an initcpio hook to start at an early stage of the boot process. Looking into the initrd image (lsinitcpio -a and lsinitcpio -x)  I saw, that the configured "plymouth" hook wasn't applied anymore. This problem already appeared late april this year.

Doing the same initrd build on manjaro linux (which is based on arch and uses the same tools / methods), the custom hook is applied correctly.

Can anyone confirm this and/or has an explanation, what is causing this problem?

Thanks in advance.
NyQuil smile

PS: By manually adding the hook to the generated initrd image, the plymouth boot splash is starting earlier (right after grub) again wink

Last edited by NyQuil (2013-08-05 13:45:36)

Offline

#2 2013-08-05 15:02:47

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

Moving to Pacman and Package Upgrade Issues.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-08-06 08:01:27

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

That makes sense, so something must be silently failing when mkinitcpio is run as my output indicates the hook is added in the correct place:

# mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 3.9.9-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [plymouth]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 3.9.9-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [plymouth]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

Offline

#4 2013-08-07 12:57:51

NyQuil
Member
Registered: 2013-05-16
Posts: 10

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

Ok, it seems to be a problem with the plymouth-install-script itself, not mkinitcpio!

Finally, I found the problem, why the plymouth hook isn't applied to the initrd-image. To fix this, do the following:

In the script

/usr/lib/initcpio/install/plymouth

replace the line

SCRIPT='plymouth'

with

add_runscript

After this, generate a new initrd-image via mkinitcpio. Now, the plymouth hook is successfully applied and plymouth is starting again much earlier.

NyQuil smile

Offline

#5 2013-08-07 13:04:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

NyQuil wrote:

Ok, it seems to be a problem with the plymouth-install-script itself, not mkinitcpio!

Finally, I found the problem, why the plymouth hook isn't applied to the initrd-image. To fix this, do the following:

...<snip>...

After this, generate a new initrd-image via mkinitcpio. Now, the plymouth hook is successfully applied and plymouth is starting again much earlier.

NyQuil smile

This functionality was obsoleted in 0.12.0, released on December 1, 2012 and marked as deprecated in 0.9.0, released on May 19, 2012.

Offline

#6 2013-08-08 07:03:06

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

@ falconidy

https://mailman.archlinux.org/pipermail … 02807.html

Can you please confirm that? The way I read the above post is that MODULES, BINARIES, SCRIPT and FILES are deprecated and add_runscript replaces them.

Or am I reading this incorrectly?

Hehehe, I'm confused!

Last edited by Padfoot (2013-08-08 07:04:26)

Offline

#7 2013-08-08 07:41:01

NyQuil
Member
Registered: 2013-05-16
Posts: 10

Re: mkinitcpio: Custom hooks are not applied to initrd-image (anymore)

Padfoot wrote:

@ falconidy

https://mailman.archlinux.org/pipermail … 02807.html

Can you please confirm that? The way I read the above post is that MODULES, BINARIES, SCRIPT and FILES are deprecated and add_runscript replaces them.

Or am I reading this incorrectly?

Hehehe, I'm confused!

The variables were replaced by their corresponding add_* functions. So, add_runscript replaces (only) the SCRIPT variable. wink

Offline

Board footer

Powered by FluxBB