Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Your kind reply helped a lot, and I updated the question. But it seems there could still one problem: The things about keeping the header as a file on a file system still doesn't works. For example, my header is now /boot/header.img and the header option of crypttab reads header=/header.img:UUID=fc0321e2-3614-e643-fd8e-1b0c8b57863a, with fc0321e2-3614-e643-fd8e-1b0c8b57863a is the partition where root is stored. I am getting cryptsetup: WARNING: nvme0n1p1_crypt: /header.luk:UUID=e2fc0321-1436-43e6-8efd-7863a1b0c8b5 does not exist. Commented Oct 8, 2022 at 14:03
  • @Mikkel : Did you find a solution ? I have the same issue. I tried 4 different syntaxes (header=/test.header:UUID=uuid, header=UUID=uuid:/test.header, header=/test.header:/dev/disk/by-uuid/uuid and header=/dev/disk/by-uuid/uuid:/test.header, all resulting in the same error while doing initramfs-update -u : test.header does not exist Commented Feb 7, 2023 at 14:01
  • @ChennyStar I have been successful with the following line in my crypttab. If course, you have to change the names around for your case : nvme0n1p1_crypt UUID=8b4e3ada-fb0c-4aa3-b09f-8b3cc9e477d8 none luks,discard,header=/dev/disk/by-uuid/c51f2669-b26c-4033-9e1d-1a5e3e3df1fc Commented Feb 18, 2023 at 22:11
  • @MikkelRev : Thanks. Yes, that's what I ended up doing too, dd-ing the header directly to a partition and bypassing the filesystem. I was just wondering if there was a solution to store the header as a file on a filesystem. I guess the answer is no. A solution would maybe be to have a script to temporarily mount the filesystem, in a way similar to what Debian's passdev script does to get a key file from a filesystem. But a similar script doesn't seem to exist to managed detached headers. Commented Feb 19, 2023 at 6:18