Skip to content

base vs systemd hooks (LVM)

I have a LVM setup and would like to know what is the difference between base and systemd hooks in mkinitcpio.conf?

Which one is better for a my LVM Setup? Which is better in general?

I did some tests with both:

base hooks

HOOKS="base udev autodetect modconf block keyboard keymap consolefont lvm2 resume filesystems fsck"

systemd-analyze

Startup finished in 14.751s (firmware) + 1.358s (loader) + 3.426s (kernel) + 2.461s (userspace) = 21.998s

systemd hooks

HOOKS="systemd keyboard autodetect modconf block sd-vconsole sd-lvm2 resume filesystems fsck"

systemd-analyze

Startup finished in 14.075s (firmware) + 1.876s (loader) + 1.662s (kernel) + 1.509s (initrd) + 2.565s (userspace) = 21.690s

Thanks for any help!

33 points8 comments
Open on Reddit
About this post
Posted
Archived
Score
33 · 100% up
Kind
Text
ID
65obpl

Author

42
posts
329
comments
0
media
View profile

8 comments

If you use systemd it uses systemd for the pid 1 in the initrd. While base it doesn't. I use systemd.

Edit you might also note systemd was 0.3 seconds faster which probably doesn't matter but you've gone to the effort of setting it up so why not?

8 points

Thx for your reply! What is the pid 1 if I use base? And which hooks do I need if I use systemd and which I don't?

4 points

If you use base pid 1 is a shell script. See the arch wiki for what alternative hooks you use https://wiki.archlinux.org/index.php/Mkinitcpio

You should be able to work it out but you can extract the initrd if you like and the /shin/init makes a interesting read if you are in to that sort of thing. (Obviously only the base version is only readable)

8 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.