Your message dated Fri, 30 Oct 2026 09:36:03 +0100
with message-id <[email protected]>
and subject line Re: Bug#1152515: cryptsetup: The man page does not adequately
explain the initramfs option for swap
has caused the Debian Bug report #1152515,
regarding cryptsetup: The man page does not adequately explain the initramfs
option for swap
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1152515: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1152515
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cryptsetup
Version: 2:2.8.8-1
Severity: normal
In Trixie x-initrd.attach is the way to autostart encrypted swap on boot.
That doesn't work on current Testing and all the documentation returned by
web searches refers to the old way to do it.
I think there needs to be a mention in the crypttab(5) man page that
x-initrd.attach is no longer supported and the examples section needs to
have a line about swap containing the "initramfs" option. I believe that
x-initrd.attach was never parsed by code in the cryptsetup package (I coould
be mistaken) but I still think it's a good place to document this as it's
where people will look.
Also it might be worth having the cryptdisks_start script give a warning about
x-initrd.attach when run from the command-line.
One could argue that the bug is in not supporting Trixie syntax, I don't have
strong feelings on this, as long as man pages clearly describe what happens
and for this sort of case I can copy a line from the man page and have it work
after changing the device name I'll be happy.
https://wiki.debian.org/Swap
I have added a section to the Wiki about this which will hopefully save time
for some people. I literally spent hours investigating this and installed a
new test machine for the sole purpose of discovering how to do it only to find
that Testing and Trixie work differently.
As an aside I ended up getting the answer from ChatGPT after numerous web
searches failed to get the right answer.
There are many ways to alleviate the problems this change will cause people
and I think we should have at least a couple of actions taken to address it.
PS None of this bug report was from ChatGPT, all I got from it was one single
keyword to use and after that I did it all myself.
-- Package-specific info:
-- System Information:
Debian Release: forky/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 7.2.10+deb14-amd64 (SMP w/22 CPU threads; PREEMPT)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Versions of packages cryptsetup depends on:
ii cryptsetup-bin 2:2.8.8-1
ii debconf [debconf-2.0] 1.5.92
ii dmsetup 2:1.02.205-2+b2
ii libc6 2.43-7
cryptsetup recommends no packages.
Versions of packages cryptsetup suggests:
ii cryptsetup-initramfs 2:2.8.8-1
ii dosfstools 4.2-1.2
ii keyutils 1.6.3-6+b2
ii liblocale-gettext-perl 1.07-7+b1
-- Configuration Files:
/etc/init.d/cryptdisks [Errno 13] Permission denied: '/etc/init.d/cryptdisks'
/etc/init.d/cryptdisks-early [Errno 13] Permission denied:
'/etc/init.d/cryptdisks-early'
-- debconf-show failed
--- End Message ---
--- Begin Message ---
On Fri, 30 Oct 2026 at 15:45:00 +1100, Russell Coker wrote:
> In Trixie x-initrd.attach is the way to autostart encrypted swap on boot.
Trixie's default initrd is initramfs-tools which is what
cryptsetup-initramfs configures and what crypttab(5) from src:cryptsetup
is about. This does not use x-initrd.attach at all. The manual also
points to systemd's own crypttab(5) where x-initrd.attach is documented.
> https://wiki.debian.org/Swap
>
> I have added a section to the Wiki about this which will hopefully save time
> for some people.
FWIW, your suggestion
sda3_crypt /dev/sda3 /dev/urandom …,swap,…,initramfs
is specific to cryptsetup-initramfs, dracut will ignore the keyword
AFAICT. This might be what you inteded, but since you have a transient
swap there is no need to start it early in the boot process. You can
remove the `initramfs` keyword and let systemd do it later once
execution has been handed over to it.
sda3_crypt /dev/sda3 /dev/urandom
plain,discard,cipher=aes-xts-plain64,size=256,swap
This works on forky/sid as well as trixie and earlier.
I'm closing this because /usr/share/doc/cryptsetup/README.Debian.gz has
a section about encrypted swap already, which is also available online at
https://cryptsetup-team.pages.debian.net/cryptsetup/README.Debian.html#encrypted-swap-partitions
(And /usr/share/doc/cryptsetup-initramfs/README.initramfs.gz has a
section for non-transient swap partitions.)
--
Guilhem.
signature.asc
Description: PGP signature
--- End Message ---