You are not logged in.

#1 2013-09-19 20:27:58

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

[SOLVED] timestamp hook replacement by systemd hook

Synopsis: Remove timestamp hook until systemd support in initramfs has more time to mature.

Per the mkinitcpio wiki, If I swap out the timestamp hook from this...

HOOKS="base hushkernel udev autodetect block mdadm_udev keyboard keymap encrypt lvm2 filesystems timestamp shutdown"

...with the systemd hook like this...

HOOKS="base hushkernel udev autodetect block mdadm_udev keyboard keymap encrypt lvm2 filesystems systemd shutdown"

...all I get is the "Welcome to emergency mode!" message.

What am I doing wrong?

See below for my custom hushkernel hook.

/usr/lib/initcpio/hooks/hushkernel

#!/usr/bin/ash
 
# https://bbs.archlinux.org/viewtopic.php?pid=1312342#p1312342
 
run_hook() {
 
   # http://unix.stackexchange.com/questions/44999/how-can-i-hide-messages-of-udev/45525#45525

   # The four values in printk denote: console_loglevel, default_message_loglevel, minimum_console_loglevel and default_console_loglevel respectively.
 
   # These values influence printk() behavior when printing or logging error messages. See 'man 2 syslog' for more info on the different loglevels.
 
   # • console_loglevel: messages with a higher priority than this will be printed to the console
   # • default_message_level: messages without an explicit priority will be printed with this priority
   # • minimum_console_loglevel: minimum (highest) value to which console_loglevel can be set
   # • default_console_loglevel: default value for console_loglevel
 
   #define  KERN_EMERG    "<0>"  /* system is unusable               */
   #define  KERN_ALERT    "<1>"  /* action must be taken immediately */
   #define  KERN_CRIT     "<2>"  /* critical conditions              */
   #define  KERN_ERR      "<3>"  /* error conditions                 */
   #define  KERN_WARNING  "<4>"  /* warning conditions               */
   #define  KERN_NOTICE   "<5>"  /* normal but significant condition */
   #define  KERN_INFO     "<6>"  /* informational                    */
   #define  KERN_DEBUG    "<7>"  /* debug-level messages             */
 
   echo "3 3 3 3" > /proc/sys/kernel/printk

/usr/lib/initcpio/install/hushkernel

#!/bin/ash
 
build() {
   add_runscript
}
 
help() {
   cat <<HELPEOF
 
This hook will suppress kernel messages during the boot LUKS password prompt
 
HELPEOF
}

Last edited by KairiTech (2013-09-21 14:27:53)

Offline

#2 2013-09-19 20:43:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] timestamp hook replacement by systemd hook

https://mailman.archlinux.org/pipermail … 03855.html
shutdown hook got removed too.

Do you get any errors / warnings when you generate the initramfs?

Offline

#3 2013-09-19 20:53:53

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [SOLVED] timestamp hook replacement by systemd hook

Nothing other than...

==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: smsmdtv

Offline

#4 2013-09-19 20:55:05

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

Re: [SOLVED] timestamp hook replacement by systemd hook

karol wrote:

What? That's not at all what that mailing list post says. The shutdown hook hasn't gone anywhere.

OP's problem is in thinking that the systemd hook is an actual replacement for the timestamp hook. It isn't. If you want the old initrd timestamping functionality, then you need to also use systemd as your early userspace init. This has lots of caveats at the moment which are well documented.

Last edited by falconindy (2013-09-19 20:56:04)

Offline

#5 2013-09-19 20:57:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] timestamp hook replacement by systemd hook

Sorry, my mistake.
Should have checked the wiki.

Offline

#6 2013-09-19 21:09:19

progandy
Member
Registered: 2012-05-17
Posts: 5,201

Re: [SOLVED] timestamp hook replacement by systemd hook

I think the mdadm hook won't work with the systemd yet, so there will be more problems.

Last edited by progandy (2013-09-19 21:10:15)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2013-09-19 22:42:18

donniezazen
Member
From: Salt Lake City
Registered: 2011-06-24
Posts: 671
Website

Re: [SOLVED] timestamp hook replacement by systemd hook

I have also removed udev and placed systemd after base. Base can also be removed in the most use cases.

Last edited by donniezazen (2013-09-19 22:42:50)

Offline

#8 2013-09-19 22:53:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] timestamp hook replacement by systemd hook

progandy wrote:

I think the mdadm hook won't work with the systemd yet, so there will be more problems.

OP uses mdadm_udev which 'works out of the box' with systemd.

Offline

#9 2013-09-19 23:02:44

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] timestamp hook replacement by systemd hook

karol wrote:
progandy wrote:

I think the mdadm hook won't work with the systemd yet, so there will be more problems.

OP uses mdadm_udev which 'works out of the box' with systemd.

Have a look here: http://www.mail-archive.com/arch-projec … 03348.html

Offline

#10 2013-09-19 23:11:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] timestamp hook replacement by systemd hook

WonderWoofy wrote:
karol wrote:
progandy wrote:

I think the mdadm hook won't work with the systemd yet, so there will be more problems.

OP uses mdadm_udev which 'works out of the box' with systemd.

Have a look here: http://www.mail-archive.com/arch-projec … 03348.html

Are you saying that I misunderstood something again?

Offline

#11 2013-09-19 23:22:54

progandy
Member
Registered: 2012-05-17
Posts: 5,201

Re: [SOLVED] timestamp hook replacement by systemd hook

karol wrote:
WonderWoofy wrote:

Are you saying that I misunderstood something again?

My comment was incomplete /and inaccurate. I knew that some of the mount hooks arent't working in this setup but I wasn't sure which ones. I reread the source files again and mdadm_udev works fine, but the encrypt and lvm2 hooks don't work. Somehow I referred to all three hooks incorrectly as "mdadm". WonderWoofys link provides hooks that work with systemd in the initramfs.

Last edited by progandy (2013-09-19 23:35:27)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#12 2013-09-19 23:23:49

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] timestamp hook replacement by systemd hook

karol wrote:
WonderWoofy wrote:
karol wrote:

OP uses mdadm_udev which 'works out of the box' with systemd.

Have a look here: http://www.mail-archive.com/arch-projec … 03348.html

Are you saying that I misunderstood something again?

No, my intent there was to try to bolster your post with links… which I was surprised that you didn't link to yourself. wink

Offline

#13 2013-09-19 23:45:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] timestamp hook replacement by systemd hook

WonderWoofy wrote:
karol wrote:
WonderWoofy wrote:

Are you saying that I misunderstood something again?

No, my intent there was to try to bolster your post with links… which I was surprised that you didn't link to yourself. wink

I did post the link earlier https://bbs.archlinux.org/viewtopic.php … 0#p1326880 :-)

Offline

Board footer

Powered by FluxBB