cryptsetup.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Chris Murphy <lists@colorremedies.com>,
	cryptsetup development <cryptsetup@lists.linux.dev>
Subject: Re: Bitlocker resize
Date: Tue, 15 Mar 2022 18:19:31 +0100	[thread overview]
Message-ID: <22b5eb15-eda6-5eef-c504-c92da4fd1aab@gmail.com> (raw)
In-Reply-To: <CAJCQCtSRe-nip3a6m+hzccXMYyKTP3AzPmAbHgnVPFJPLbdfCA@mail.gmail.com>

On 15/03/2022 17:45, Chris Murphy wrote:
> I'm curious how Linux distro installers should go about supporting the
> increasingly common case of Bitlocker enabled by default.

Not sure about installers, but BitLocker support through libcryptsetup
is actually already used (as it is integrated through udisks).
  
> Is the Bitlocker format similar to LUKS in that the ciphertext volume
> size is inferred from the underlying partition size?

Well, we activate it this way, and it seems to work.
But metadata can contain some size info we just do not process yet
(as it is not openly documented).

> I see in bitlkDump results of a Bitlocker volume there's no apparent
> reference to its size so I'm thinking it might be conceptually the
> same as LUKS, in which case the installer workflow would be the same
> as LUKS. I know that cryptsetup doesn't support modifying a Bitlocker
> header, but maybe it's not necessary?

Libcryptsetup will never support any metadata write operation for Bitlocker.

We will only support activation of existing devices (and later read/write
access of plaintext data is done through common NTFS driver).

> pseudocode:
> cryptsetup open /dev/ $name
> ntfsresize --size $size /dev/mapper/$name
> cryptsetup close $name
> libfdisk/parted (resize the partition, create a new one in free space, etc)

Not sure if this works - if ntfsresize need to access Bitlocker metadata
(on activated volume), then we mask them out during activation.

Perhaps just try it :)

Milan

  reply	other threads:[~2022-03-15 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 16:45 Bitlocker resize Chris Murphy
2022-03-15 17:19 ` Milan Broz [this message]
2022-03-23 18:10 ` Vojtech Trefny

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=22b5eb15-eda6-5eef-c504-c92da4fd1aab@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=cryptsetup@lists.linux.dev \
    --cc=lists@colorremedies.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).