Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #243506

Re: LVM passphrase

From Pierre-Elliott Bécue <peb@debian.org>
Newsgroups linux.debian.user
Subject Re: LVM passphrase
Date 2021-12-29 11:40 +0100
Message-ID <DzExc-6NN-9@gated-at.bofh.it> (permalink)
References <Dzejn-7EW-1@gated-at.bofh.it> <DzhAB-1iq-7@gated-at.bofh.it> <DzsFH-7Ua-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

David <bouncingcats@gmail.com> wrote on 28/12/2021 at 22:55:29+0100:

> On Tue, 28 Dec 2021 at 21:06, Pierre-Elliott Bécue <peb@debian.org> wrote:
>> Polyna-Maude Racicot-Summerside <debian@polynamaude.com> wrote on 28/12/2021 at 07:39:16+0100:
>
>> > I got two logical volume on my hard disk.
>> > One is the swap
>> > Other is the root
>> > Both have the same passphrase.
>> > How can I make grub ask only once ?
>
>> First, for the sake of clarity, I guess you are talking about LUKS
>> filesystems on logical volumes?
>>
>> If so, I guess you're not dealing with grub but with initramfs scripts
>> and then init asking for passphrases. Indeed, GRUB only asks the
>> passphrase of a potential encrypted /boot to fetch its configuration in
>> order to know what to boot.
>>
>> Now let's move to the initramfs + init passphrases prompts. Initramfs'
>> job is to find the root partition and "pivot" on it, ie exec /sbin/init
>> which is located on the root partition and which will mount the other
>> filesystems, start services, … you know the drill.
>>
>> To find the root partition, initramfs has a lot of helper scripts, and
>> if the root partition is encrypted, it also has access to cryptsetup
>> binaries and passfifo. It therefore prompts for a password to recrypt
>> your rootfs.
>>
>> Later on, init wants to make your swap available and therefore also
>> needs to ask you for a passphrase.
>
> I am not clear exactly what is being asked here. Is the question
> about Grub asking for passwords, or about the initrd asking
> for passwords? Grub will ask before booting the kernel, the
> initrd will ask after Grub invokes the kernel.
>
> I don't know about Grub asking for passwords, because I don't
> encrypt boot partitions. But if the question is about the initrd
> password prompt, then ...
>
> If we are talking about somehow using both LVM and LUKS
> in combination, then decrypting a single LUKS volume that
> has been partitioned into root and swap with LVM will only
> require one password given once to the init started by the
> initrd, when booting the system.
>
> Maybe providing the output of 'lsblk -f' would help to clarify
> the situation, so that we can see what is on the disk.

I think my answer covers most of the cases.

Polyna-Maude is free to come back at us in case more help is needed.

Cheers,
-- 
PEB

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

LVM passphrase Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2021-12-28 07:40 +0100
  Re: LVM passphrase basti <mailinglist@unix-solution.de> - 2021-12-28 08:50 +0100
  Re: LVM passphrase Pierre-Elliott Bécue <peb@debian.org> - 2021-12-28 11:10 +0100
    Re: LVM passphrase David <bouncingcats@gmail.com> - 2021-12-28 23:00 +0100
      Re: LVM passphrase "Andrew M.A. Cater" <amacater@einval.com> - 2021-12-28 23:10 +0100
        Re: LVM passphrase Andy Smith <andy@strugglers.net> - 2021-12-29 00:00 +0100
        Re: LVM passphrase Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2021-12-30 11:00 +0100
      Re: LVM passphrase Pierre-Elliott Bécue <peb@debian.org> - 2021-12-29 11:40 +0100

csiph-web