[Confirmed bug w/ cryptsetup] Mkinitcpio error related to sd-encrypt: ==> ERROR: file not found: `'

Thank you for the advice.
Bug was reported here:
https://bugs.archlinux.org/task/71247

Issue was closed on Arch with the following comment:
This is not the manjaro bugtracker.
Next time I will not take the time to report anything over there.

This would be the right place to report I presume?

I don’t know.
I was following @megavolt advice in good faith.

@aljazzair @Hanzel

If I look here:

pamac info cryptsetup
Name                  : cryptsetup
Version               : 2.3.6-1
Description           : Userspace setup tool for transparent encryption of block devices using dm-crypt
URL                   : https://gitlab.com/cryptsetup/cryptsetup/
Licenses              : GPL
Repository            : core
Installed Size        : 2.7 MB
Depends On            : device-mapper libdevmapper.so=1.02-64 openssl popt util-linux-libs
                        libuuid.so=1-64 json-c libjson-c.so=5-64 argon2 libargon2.so=1-64
Make Dependencies     : util-linux
Provides              : libcryptsetup.so=12-64
Packager              : Christian Hesse <arch@eworm.de>
Build Date            : 05/28/21
Install Date          : 06/08/21
Install Reason        : Explicitly installed
Signatures            : Yes

Then the packager is from the arch team:

Packager              : Christian Hesse <arch@eworm.de>

So I presumed it is just ported from archlinux.

If it is a mkinitcpio problem, then sure, it is then a Manjaro Package:

pamac info mkinitcpio            ✔ 
Name                  : mkinitcpio
Version               : 29-1.0
Description           : Modular initramfs image creation utility
URL                   : https://projects.archlinux.org/mkinitcpio.git/
Licenses              : GPL
Repository            : core
Installed Size        : 105.7 kB
Depends On            : awk mkinitcpio-busybox>=1.19.4-2 kmod util-linux>=2.23 libarchive coreutils bash
                        diffutils findutils grep filesystem>=2011.10-1 gzip systemd asciidoc
Optional Dependencies : xz: Use lzma or xz compression for the initramfs image [Installed]
                        bzip2: Use bzip2 compression for the initramfs image [Installed]
                        lzop: Use lzo compression for the initramfs image
                        lz4: Use lz4 compression for the initramfs image [Installed]
                        mkinitcpio-nfs-utils: Support for root filesystem on NFS
Provides              : initramfs
Packager              : Helmut Stult <helmut@manjaro.org>
Build Date            : 10/30/20
Install Date          : 01/03/21
Install Reason        : Installed as a dependency for another package
Signatures            : Yes
Backup files          : /etc/mkinitcpio.conf

Thank you for following up.
All I know is downgrading cryptsetup removes the error.
The triaging folks over at arch bugtracker are not in agreement however.
They specifically said:
This is not the manjaro bugtracker.
Therefore I will leave it at that.
I will let people with more experience with the intricacies of bug filing raise it with the proper teams.

Yeah I think it is difficult to say where to report that:

You use Manjaro with a package from Archlinux, but Archlinux does not support Manjaro and Manjaro has not its own Package, where you could report a bug… however difficult somehow.

The issue is this: update sd-encrypt hook · archlinux/svntogit-packages@bf77990 · GitHub

People had reported to me to have issues with the newer systemd series. Therefore I did hold it back. However cryptsetup slipped. We have to use the older version if we keep the older systemd series.

So let’s update systemd to the 248 series and you switch over to stable-staging branch to test that out. This should fix the issue. And for stable branch I’ll downgrade cryptsetup for now.

4 Likes

Thanks @philm .
This clears it up.

sudo pacman-mirrors -aB stable-staging
sudo pacman -Syyu

Would be the cmds to do it. After your tests and we did the stable snap you may switch back to stable branch. Thx.

1 Like

I tried the stable-staging switch but could not complete upgrade and testing due to unresolved dependencies unrelated to this thread.
.
(If anyone is curious the reason is my Pacman config is Ignoring Pkgs for pulseaudio, as I am using a custom version of PA by Pali, for enhanced Bluetooth quality called SBC XQ, before moving to full fledged Pipewire :slight_smile: ).
.
So long story short, I will have to wait for the stable branch to evolve.
Thanks again everyone for your kind feedback.

Well, stable-staging is the next stable update. So please test this branch and resolve your issues. If needed post about them, so we may help.

You are absolutely right.
It means I will have to work on replacing my custom PulseAudio setup with Pipewire in preparation for the next stable release.
That has to be done before I can dive into the stable-staging branch.

Maybe a stupid question:
On my system I also noticed pacman’s warning: “Warning: cryptsetup: Local version (2.3.6-1) is newer than core (2.3.5-4)” (only retranslated from German)
As to Philip’s explanation “core” should be a part of systemd, (which has its own different version number.)
How to display the version number of “core”?

That means “than in core”. Core stands for the repository of core packages, not some package. This message means your currently installed (local) version has a higher version than in remote repository of core packages. You need to do sudo pacman -S cryptsetup.

Oh, thanks a lot! I did completely misinterpret it :face_with_thermometer:

I can confirm that switching to stable-staging solved this error for me! Thanks :slight_smile:

sudo mkinitcpio -p linux510
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.42-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [keyboard]
  -> Running build hook: [sd-plymouth]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.42-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [keyboard]
  -> Running build hook: [sd-plymouth]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful

I’m just marking this post as accepted solution for this thread.

So far this is the best answer you guys can get at the moment.

unfortunately I had to revert to the older systemd and cryptsetup! I use a keyfile in my crypttab and I was not able to decrypt with it anymore - even without systemd (i.e. no sd-encrypt but encrypt). I guess that is related to cryptsetup then but anyways this is not working atm as it should. using cryptsetup open … --keyfile … was still working fine so so no idea where the bug actually is…

the error I get is:

Jul 03 20:17:32  systemd-cryptsetup[534]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/sdb1.
Jul 03 20:17:32  systemd-cryptsetup[534]: Failed to activate with key file '/home/tfi/2tb.k': Invalid argument
Jul 03 20:17:32  systemd[1]: systemd-cryptsetup@bigopt.service: Main process exited, code=exited, status=1/FAILURE
Jul 03 20:17:32  systemd[1]: systemd-cryptsetup@bigopt.service: Failed with result 'exit-code'.
Jul 03 20:17:32  systemd[1]: Failed to start Cryptography Setup for bigopt

where bigopt is the name for the encrypted device.

/etc/crypttab:

bigopt	/dev/sdb1	/home/myname/2tb.k	timeout=30,nofail

I have also tried to put it in /etc/cryptsetup-keys.d/bigopt.key and specifying it with luks.key=xx-uuid=/path/to/keyfile (when sd-encrypt was enabled) but whatever I tried nothing worked. the only thing which worked was downgrading systemd + cryptsetup (I did that in one run so dunno if it is the one or the other or both…)

currently on (working - without sd-encrypt):

systemd 247.6-1.0
cryptsetup 2.3.5-4

will now upgrade to

cryptsetup-2.3.6-1
systemd-248.3-3

(I wasnt sure about the previous version I had installed so downgraded too much. now I am back at stable and not stable-staging anymore and so upgrade to the latest version there)

upgraded to

cryptsetup-2.3.6-1
systemd-248.3-3

and keyfile stops working again.

downgraded to:

systemd 247.7-1 <--- newer then on my above other try
cryptsetup 2.3.5-4

and it works again… im lost.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.