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!
About this post
- Posted
- Archived
- Score
- 33 · 100% up
- Kind
- Text
- ID
- 65obpl
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?
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?
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)