Re: Bitlocker resize

Milan Broz <[email protected]>
Newsgroups dev.linux.lists.cryptsetup
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.