Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: mattz7 on 20 January 2020, 20:44:11

Title: [SOLVED] no encrypt hook in mkinitcpio
Post by: mattz7 on 20 January 2020, 20:44:11
Hi!

I was migrating from Arch Linux the other day and found out that I could not use a dmcrypt installation since mkinitcpio did not know what to do with the encrypt hook. My /etc/mkinitcpio.conf looked like this
Code: [Select]
HOOKS="base btrfs udev autodetect modconf block encrypt filesystems keyboard"

Eventually, I gave up the idea of an encrypted setup and went with the regular (non-encrypted) configuration.

Can anyone tell me whether dmcrypt setups are natively supported  in Artix? And if not, will there be plans to implement this in future releases?

Thank you! :)
Title: Re: no encrypt hook in mkinitcpio
Post by: Dudemanguy on 20 January 2020, 20:54:56
Artix definitely supports dmcrypt. I have it on one of my setups. When you say "mkinitcpio did not know what to do with the encrypt hook", what do you mean exactly? Did it output an error?
Title: Re: no encrypt hook in mkinitcpio
Post by: mattz7 on 20 January 2020, 21:04:40
Artix definitely supports dmcrypt. I have it on one of my setups. When you say "mkinitcpio did not know what to do with the encrypt hook", what do you mean exactly? Did it output an error?

It did output an error that the encrypt hook was not found. I even copied the files responsible for this hook from Arch, but there were some other errors after running mkinitcpio -P.

Even now, when I do pacman -Ql mkinitcpio| grep encrypt I get no results.

Can you do the same on your setup?

EDIT: I do remember now that there were a couple of options that provided mkinitcpio that pacman asked me about during installation. I went with 1) mkinitcpio. I do not however remember the other option.
Title: Re: no encrypt hook in mkinitcpio
Post by: Dudemanguy on 20 January 2020, 22:26:43
Something is wrong. For example I just added the encrypt hook to mkinitcpio.conf and rebuilt it just for the heck of it.

Code: [Select]
==> 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: 5.4.12-artix1-1
  -> Running build hook: [base]
  -> Running build hook: [encrypt]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed 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: 5.4.12-artix1-1
  -> Running build hook: [base]
  -> Running build hook: [encrypt]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
Title: Re: no encrypt hook in mkinitcpio
Post by: SGOrava on 21 January 2020, 08:03:40
Let`s try my luck.
Is cryptsetup installed ?

This package provides:
Code: [Select]
/usr/lib/initcpio/hooks/encrypt
/usr/lib/initcpio/install/encrypt
Which I believe are files you are looking for.
Title: Re: no encrypt hook in mkinitcpio
Post by: mattz7 on 21 January 2020, 12:23:21
This was probably it! I suppose Arch had it in the base group because I never explicitly pacstrapped it. But apparently Artix didn't have it in base and I never really basestrapped it.

Thank you! I consider this solved.  :)