linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hansjoerg Lipp <hjlipp@web.de>
To: Gabriel C <nix.or.die@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Passing luks passphrase from grub to systemd
Date: Mon, 16 Apr 2018 01:21:02 +0200	[thread overview]
Message-ID: <20180415232101.qhqjhdlwq4zkwvbf@hjlipp.my-fqdn.de> (raw)
In-Reply-To: <CAEJqkghu-c90=cocnkxW7zD9twkb0v=DTNbQgmUC4JGC6fvgWw@mail.gmail.com>

Hello Gabriel,

On Mon, Apr 16, 2018 at 12:35:33AM +0200, Gabriel C wrote:
> 2018-04-15 21:06 GMT+02:00 Hansjoerg Lipp <hjlipp@web.de>:
> > as I'm stuck with a (non-EFI x86_64) system with encrypted root
> > partition, I have to enter the passphrase twice (grub needs it for
> > getting the kernel etc., systemd needs it for mounting the root
> > partition). This can be quite inconvenient, especially if the passphrase
> > is long and contains special characters, and grub assumes a different
> > keyboard layout.
> > I therefore developed a proof of concept code allowing grub to pass the
> > passphrase to the kernel and systemd to get the passphrase from the
> > kernel. See the description and patch for the Linux part and the link to
> > all changes below.
> 
> Somethng like this is not needed.
> All that is possible already from userspace.
> 
> Systemd can do that on his own ( see systemd-cryptsetup-generator )
> ( other init ofc too ) assuming your initrd , cryptsetup and grub is
> setup correctly.

can this be done even if the /boot directory is located inside the
encrypted root partition? I'll have another look at this tomorrow as I'm
currently too tired. This would be really great news for me.  (And I'd
have to wonder how I didn't get this right on my own... I already
learned a lot about the boot process doing this, and obviously I still
do not understand enough.)

Thank you for your quick response,
Hansjoerg

  reply	other threads:[~2018-04-15 23:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15 19:06 [RFC] Passing luks passphrase from grub to systemd Hansjoerg Lipp
2018-04-15 22:35 ` Gabriel C
2018-04-15 23:21   ` Hansjoerg Lipp [this message]
2018-04-15 22:25 Oleksandr Natalenko
2018-04-16  0:11 ` Hansjoerg Lipp

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180415232101.qhqjhdlwq4zkwvbf@hjlipp.my-fqdn.de \
    --to=hjlipp@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nix.or.die@gmail.com \
    /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.
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 NNTP newsgroup(s).