From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas@enge.fr>
Cc: 21843@debbugs.gnu.org
Subject: bug#21843: Generated grub.cfg does not support encrypted roots
Date: Fri, 11 Mar 2016 09:45:07 +0100 [thread overview]
Message-ID: <87r3fh4d4c.fsf@gnu.org> (raw)
In-Reply-To: <20160310094837.GA30197@solar> (Andreas Enge's message of "Thu, 10 Mar 2016 10:48:37 +0100")
Andreas Enge <andreas@enge.fr> skribis:
> On Thu, Mar 10, 2016 at 10:17:46AM +0100, Ludovic Courtès wrote:
>> IIUC we don’t *have* to pass the UUID to ‘cryptomount’; we could also
>> pass the device name, in GRUB format
>
> Yes, but my idea was that the uuid is something we can determine
> at instantiation time. If the mapped device is /dev/sdd3, we can run
> (system* "cryptsetup" "luksUUID" "/dev/sdd3")
> and obtain the uuid.
Hmm yeah, but we don’t even do that for regular partitions.
> I suppose we could also use the grub device (hd3,msdos3) in this case,
> but I do not know what is the mapping between /dev nodes and these devices,
> and if it is actually a function that could be computed from the file name
> in /dev only or not.
‘grub-probe’ should know, I think.
>> (mapped-device
>> (source (uuid "cb67fc72-0d54-4c88-9d4b-b225f30b0f44")) ;LUKS UUID
>> (target "root")
>> (type luks-device-mapping))
>> we’d have to extend <mapped-device-kind> with a method to resolve UUIDs
>> (in this case, to map a UUID to a /dev node.)
>
> We can also let the users do the work (and document this in the manual),
> by having them supply all the informatin:
>
> (mapped-device
> (source "/dev/sdd3")
> (uuid "cb67fc72-0d54-4c88-9d4b-b225f30b0f44") ;LUKS UUID
> (target "root")
> (type luks-device-mapping)
> (needed-for-boot? #t))
I think the goal of providing a UUID is to not have to worry about the
actual device name (which could change).
The ‘needed-for-boot?’ flag should be unnecessary because it can be
inferred from corresponding file systems, as is already the case.
>> Besides, I think we should only worry about the mapped device(s) that
>> back / and /boot, rather than any mapped device, no?
>
> This could either be solved by determining which file systems have
> needed-for-boot? #t and determine the corresponding mapped devices,
> or by adding such a parameter for the mapped-device as in my suggestion
> above.
>
> Or we do it all automatically for / and /boot and drop the parameter
> needed-for-boot? everywhere.
We keep it only in ‘file-system’, I think.
Anyway, sounds like quite a bit of work here. :-)
Ludo’.
next prev parent reply other threads:[~2016-03-11 8:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 15:52 bug#21843: Generated grub.cfg does not support encrypted roots Ludovic Courtès
2016-03-08 19:21 ` Andreas Enge
2016-03-08 19:33 ` Andreas Enge
2016-03-10 9:17 ` Ludovic Courtès
2016-03-10 9:48 ` Andreas Enge
2016-03-11 8:45 ` Ludovic Courtès [this message]
2016-03-16 20:40 ` Andreas Enge
2016-03-17 13:14 ` Andreas Enge
2016-04-17 23:29 ` Ludovic Courtès
2016-04-27 20:58 ` Ludovic Courtès
2016-05-01 22:07 ` Ludovic Courtès
2016-10-26 6:56 ` Christopher Baines
2016-11-23 20:21 ` Ludovic Courtès
2016-04-16 16:09 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3fh4d4c.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=21843@debbugs.gnu.org \
--cc=andreas@enge.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).