Return-Path: <21naown@gmail.com> Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Sun, 4 Feb 2018 14:32:08 +0100 (CET) Received: by mail-wm0-x22c.google.com with SMTP id v71so20927624wmv.2 for ; Sun, 04 Feb 2018 05:32:08 -0800 (PST) Received: from [192.168.1.2] (32.99.141.77.rev.sfr.net. [77.141.99.32]) by smtp.googlemail.com with ESMTPSA id i32sm5697282eda.89.2018.02.04.05.32.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Feb 2018 05:32:07 -0800 (PST) From: 21naown@gmail.com References: <8d4a95d9-d034-9bc1-b6a0-681942a5afb8@gmail.com> <20180204120630.GG13685@h-174-65.A328.priv.bahnhof.se> Message-ID: <6404eb7d-4deb-3640-a05b-923c96382343@gmail.com> Date: Sun, 4 Feb 2018 14:32:03 +0100 MIME-Version: 1.0 In-Reply-To: <20180204120630.GG13685@h-174-65.A328.priv.bahnhof.se> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [dm-crypt] Open a LUKS container storing the operating system, with a header file in another location List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Le 04/02/2018 à 13:06, Michael Kjörling a écrit : > On 4 Feb 2018 02:39 +0100, from 21naown@gmail.com: >> I would like to open a LUKS container (which is the OS Debian) >> through GRUB, but with the header stored in a USB key for example. >> Through the file crypttab >> (https://manpages.debian.org/stretch/cryptsetup/crypttab.5.en.html), >> it seems possible to specify the path of the header, but I have >> different failures and I do not know where the problem is. > /etc/crypttab is a Debian-ism, not something understood or used > natively by LUKS. The system startup scripts then parse that file and > translate it into various LUKS-related commands. And of course, if > you're storing your crypttab in the encrypted container, you can't > read it before you have unlocked the container and mounted the file > system therein, but you'd need to read the crypttab to unlock the > container; an obvious catch-22 situation. > > The normal approach for using an encrypted root partition is to have a > small, unencrypted /boot which stores the kernel, an initrd, the boot > loader, and a few other odds and ends to get the system booted far > enough that it can unlock the LUKS container and proceed from there. > Is there some particular reason why you don't want to do it that way? > If you tell us _why_ you're going down this route, we might be able to > suggest a solution that would actually _work_... > I have an unencrypted boot partition with GRUB. My final goal is to have this partition in a USB key, in the same partition or in another one than the one where the header file will be stored, obviously unencrypted. I assume crypttab is embedded in initrd when I do “update-initramfs -u”, because, among the errors I got, it showed me just after selecting the OS to launch in GRUB “LUKS header “/boot/headerFile” missing”, which is the path I put in crypttab.