From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A94AFC433DB for ; Mon, 22 Mar 2021 20:54:10 +0000 (UTC) Received: from mail.server123.net (mail.server123.net [78.46.64.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 017CB6187E for ; Mon, 22 Mar 2021 20:54:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 017CB6187E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-crypt-bounces@saout.de X-Virus-Scanned: amavisd-new at saout.de Authentication-Results: mail.server123.net (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::72f; helo=mail-qk1-x72f.google.com; envelope-from=svartchimpans@gmail.com; receiver= Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 22 Mar 2021 21:51:08 +0100 (CET) Received: by mail-qk1-x72f.google.com with SMTP id y18so12118861qky.11 for ; Mon, 22 Mar 2021 13:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+ghOL0RUTBFIv/+3+wxMcNLEaS2DT1iaoJ5mczeRB0E=; b=ZoAuLUqB0J56i/LkyhjXtYzd2xgz3wDAzO01MY9ydlEsKg6goqBcb89A38PEnK3iZ0 RGVBHMPggJl+PJD58X8M9PDZAoNccuE6DxUSrkBqftomsOgzben2BmxVl85RSVz8x7ra NL+HKaU51jwIUonXb92vXwBWUbyeh7yI2PuQhBeMqpE2QxXoTKjvuPy6RKgvjD2RUlTt dLhqdNGr2gs0YUf7vHyr6yBazor/LfhgIjlQ8bK7khJ3iypaDNPhHjU2eJ6SV6HcI5Cj X7X8oOeqMsmrgd98scpN/zpFtiApuXvz3uBEJefARF9WO+XgwrEOM9xR1Eox6BrQbG9J XeYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+ghOL0RUTBFIv/+3+wxMcNLEaS2DT1iaoJ5mczeRB0E=; b=spzwAExjpKWh1WLhhhM2AKNBMMy7wFQrsihzB28YZYfZ8NsNIQnM0inUecb3zVESsH QEL6TwDYJ3E2qpg6AIQTt8W6aqm2PwZaZwFaVm/aeo5Uf6wUNvH5hh+O3wRFwmRrYjAp 2hH95AK/0poayo45j6eugacfJUWh/ZzdJPPwY1Mabqf5cu0NbsL3nC5JFxbXwrsxix3E Ze9mv/4Pu/XGf3s2lRtMZgoyWqPUdSOOvcE4TnQDajmG9Ki03BapijHAEHa1z0P8aYaU 7dP4e9pNCLfNHiZW66CsKPUizt9b6YRzpwU23OUkUjsPEK3XNH8VSAfHfCYY8zCga96R AqCQ== X-Gm-Message-State: AOAM532xUWv/3dDDGfGfJhW9ZFWYt2Q3jPThDGD2kiJUfbDgIxYJKqJB i+x4lFIw+6x0PUK7PqAumqq/PyGbqHtWuzDPQQ2g5RM1 X-Google-Smtp-Source: ABdhPJzqSzSRS6jMpxoz4rqKfiovCwGxG6Bq0Yw24gdc6w3xmjSlHcWIQ8hS0pIwCl+BD8FH5bxBuWEQ04A0w6p7miE= X-Received: by 2002:ae9:f818:: with SMTP id x24mr2029404qkh.101.1616446267032; Mon, 22 Mar 2021 13:51:07 -0700 (PDT) MIME-Version: 1.0 References: <643D0D27-E48A-4684-88B8-C0EE72B0DE7D@mousecar.com> <20210322035713.GA13798@tansi.org> <9ED15806-6FD3-4BE9-9B33-4C4BF67FB2D1@mousecar.com> In-Reply-To: <9ED15806-6FD3-4BE9-9B33-4C4BF67FB2D1@mousecar.com> From: Johnny Dahlberg Date: Mon, 22 Mar 2021 21:50:56 +0100 Message-ID: To: ken Message-ID-Hash: GY2VVCLUHRFK54PG5BPVHZEAHFNCRKP4 X-Message-ID-Hash: GY2VVCLUHRFK54PG5BPVHZEAHFNCRKP4 X-MailFrom: svartchimpans@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-dm-crypt.saout.de-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: dm-crypt mail list X-Mailman-Version: 3.3.2 Precedence: list Subject: [dm-crypt] Re: What to encrypt and why (was: Using dm-crypt: whole disk encryption List-Id: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============4436880066236483359==" --===============4436880066236483359== Content-Type: multipart/alternative; boundary="0000000000008b863805be2639c2" --0000000000008b863805be2639c2 Content-Type: text/plain; charset="UTF-8" On Mon, 22 Mar 2021 at 21:37, ken wrote: > On March 22, 2021 3:57:13 AM UTC, Arno Wagner wrote: > >To do that you need to boot from an external medium. > >FAQ Section 9 has some informatiopn on how to create an > >initrd for an external boot medium. > > > >Regards, > >Arno > > > > > >On Sun, Mar 21, 2021 at 17:13:16 CET, ken wrote: > >> A new laptop is on the way and I'm considering using dm-crypt 2 > >secure the whole SSD. I have some basic questions though. > >> > >> Is it possible to encrypt the entire Drive, including all the system > >files? > >> _______________________________________________ > >> dm-crypt mailing list -- dm-crypt@saout.de > >> To unsubscribe send an email to dm-crypt-leave@saout.de > > Thanks for your reply and or the reference to the FAQ. I should have known > that the latter probably existed. > > While it probably is a very useful kind of configuration for some for a > system to have to boot from an external medium, it doesn't sound like > something that I want to do. I guess I've been misled by my previous > experience with dm-crypt. > > It must have been about 20 years ago that I set up and for a couple years > used an encrypted system. That system would boot as systems normally do, > and I was prompted for a password somewhere along the boot process prior to > having to enter my user password. I didn't need an external medium at all. > And very recently I very briefly tried out Fedora 33 and clicked a checkbox > for disk encryption during the install process, and the boot process was > essentially the same, that is, the system would boot, then it would require > password for disk decryption before I could log in. Again, no external > medium was required. Your answer, though, was the right one, given my > imprecise question. > > This brings up larger, but pre-technical questions: what is appropriate to > encrypt and why? Given your reply, it seems safe to assume that it's > possible to encrypt the boot partition of a system. It's quite possible > that I'm missing some reason to do this, but I can't see it. However, I'm > not at all conversant with the newer UEFI boot processes, so perhaps > there's something to learn there. > > Reasons for encrypting the OS are more apparent, so I'm fairly certain > that would be advisable. I can imagine a sound rationale for encrypting > just one part a person's home directory, but for me the entire /home > partition is the absolute minimum. > > KVM throws another layer of possible confusion into the mix. At the moment > I'm considering encrypting the entire (host) OS and /home partition, and > with those all the guest systems, because this seems like the simplest way > to go. However, I could be convinced against that plan if I find that > performance would be too adversely affected, or for some other possible > issues I'm not even aware of. Or maybe it wouldn't be simple at all to do > what I'm planning. I don't know at this point. > > One specific question I have comes out of the FAQ: What is meant by a > container? I'm fairly certain that it could be an entire partition. > Anything else? Could one container be comprised of two or more partitions? > Can two or more virtual machines constitute one container if they are all > on the same partition or within the same logical volume? > > Sorry for the long post. If you're looking for more fodder for the FAQ, I > obviously have plenty of that. :) > > > Did you see my detailed reply to your previous post? It explains the exact boot process you want (being asked for a password at boot). As for whether to use UEFI boot or not: Yes. Use it. It's way more robust than MBR boot methods. Don't be afraid to research what systemd-boot is, if you want to know. Or just enable UEFI in your BIOS (it's most likely on by default on your new laptop) and just install the OS and it'll automatically use UEFI. As for what to encrypt: /boot/efi = No. It must be unencrypted to be able to boot. But it only contains your bootloader, kernel and initramfs which is what sets up the decryption environment. / (root) = Yes. All of it will be encrypted with your passphrase. As for having a separate /home partition: Don't bother. It makes no sense at all and just creates hassle when you inevitably run out of space in either / or /home. There are no benefits to a separate home directory. None. People think it makes OS reinstalls or distro hopping easier. Nope it doesn't. If you have a unified partition, you simply have to boot any random liveCD and delete everything except the /home folder, and then install your OS on the same partition without formatting it, and voila you've kept /home without tediously separating it. If you wanna check out the distro I recommended in the longer answer about full disk encryption, you even have a "Refresh Install" feature in the installer, which deletes everything except /home and reinstalls the OS. That's another fantastically easy option. :-) -- Johnny --0000000000008b863805be2639c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, 22 Mar 2021 at 21:37, ken <= ;gebser@mousecar.com> wrote:<= br>
On March 22, 202= 1 3:57:13 AM UTC, Arno Wagner <arno@wagner.name> wrote:
>To do that you need to boot from an external medium.
>FAQ Section 9 has some informatiopn on how to create an
>initrd for an external boot medium.
>
>Regards,
>Arno
>
>
>On Sun, Mar 21, 2021 at 17:13:16 CET, ken wrote:
>> A new laptop is on the way and I'm considering using dm-crypt = 2
>secure the whole SSD. I have some basic questions though.
>>
>> Is it possible to encrypt the entire Drive, including all the syst= em
>files?
>> _______________________________________________
>> dm-crypt mailing list -- dm-crypt@saout.de
>> To unsubscribe send an email to dm-crypt-leave@saout.de

Thanks for your reply and or the reference to the FAQ. I should have known = that the latter probably existed.

While it probably is a very useful kind of configuration for some for a sys= tem to have to boot from an external medium, it doesn't sound like some= thing that I want to do. I guess I've been misled by my previous experi= ence with dm-crypt.

It must have been about 20 years ago that I set up and for a couple years u= sed an encrypted system. That system would boot as systems normally do, and= I was prompted for a password somewhere along the boot process prior to ha= ving to enter my user password. I didn't need an external medium at all= . And very recently I very briefly tried out Fedora 33 and clicked a checkb= ox for disk encryption during the install process, and the boot process was= essentially the same, that is, the system would boot, then it would requir= e password for disk decryption before I could log in. Again, no external me= dium was required. Your answer, though, was the right one, given my impreci= se question.

This brings up larger, but pre-technical questions: what is appropriate to = encrypt and why? Given your reply, it seems safe to assume that it's po= ssible to encrypt the boot partition of a system. It's quite possible t= hat I'm missing some reason to do this, but I can't see it. However= , I'm not at all conversant with the newer UEFI boot processes, so perh= aps there's something to learn there.

Reasons for encrypting the OS are more apparent, so I'm fairly certain = that would be advisable. I can imagine a sound rationale for encrypting jus= t one part a person's home directory, but for me the entire /home parti= tion is the absolute minimum.

KVM throws another layer of possible confusion into the mix. At the moment = I'm considering encrypting the entire (host) OS and /home partition, an= d with those all the guest systems, because this seems like the simplest wa= y to go. However, I could be convinced against that plan if I find that per= formance would be too adversely affected, or for some other possible issues= I'm not even aware of. Or maybe it wouldn't be simple at all to do= what I'm planning. I don't know at this point.

One specific question I have comes out of the FAQ: What is meant by a conta= iner? I'm fairly certain that it could be an entire partition. Anything= else? Could one container be comprised of two or more partitions? Can two = or more virtual machines constitute one container if they are all on the sa= me partition or within the same logical volume?

Sorry for the long post. If you're looking for more fodder for the FAQ,= I obviously have plenty of that.=C2=A0 :)



Did you see my detailed reply to your previou= s post? It explains the exact boot process you want (being asked for a pass= word at boot).

As for whether to use UEFI boot or not: Yes. Use it. = It's way more robust than MBR boot methods. Don't be afraid to rese= arch what systemd-boot is, if you want to know. Or just enable UEFI in your= BIOS (it's most likely on by default on your new laptop) and just inst= all the OS and it'll automatically use UEFI.

As for what to encr= ypt:

/boot/efi =3D No. It must be unencrypted to be able to boot. Bu= t it only contains your bootloader, kernel and initramfs which is what sets= up the decryption environment.

/ (root) =3D Yes. All of it will be = encrypted with your passphrase.

As for having a separate /home parti= tion: Don't bother. It makes no sense at all and just creates hassle wh= en you inevitably run out of space in either / or /home. There are no benef= its to a separate home directory. None. People think it makes OS reinstalls= or distro hopping easier. Nope it doesn't. If you have a unified parti= tion, you simply have to boot any random liveCD and delete everything excep= t the /home folder, and then install your OS on the same partition without = formatting it, and voila you've kept /home without tediously separating= it.

If you wanna check out the distro I recommended in the longer a= nswer about full disk encryption, you even have a "Refresh Install&quo= t; feature in the installer, which deletes everything except /home and rein= stalls the OS. That's another fantastically easy option. :-)

-- Johnny
--0000000000008b863805be2639c2-- --===============4436880066236483359== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dm-crypt mailing list -- dm-crypt@saout.de To unsubscribe send an email to dm-crypt-leave@saout.de --===============4436880066236483359==--