Bug 2067248 - RFE: support for resizing Windows volumes with Bitlocker enabled
Summary: RFE: support for resizing Windows volumes with Bitlocker enabled
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Blivet Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-23 15:30 UTC by Chris Murphy
Modified: 2022-03-23 19:02 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Chris Murphy 2022-03-23 15:30:30 UTC
Description of problem:

Cryptsetup supports unlocking BitLocker volumes, but there's no support for modifying the metadata.

1. Determine if modifying the BitLocker metadata is necessary to support resize (i.e. is it similar to LUKS which has no explicit size and the dm-crypt volume inherits size from the underlying partition the LUKS header is located on)

https://lore.kernel.org/cryptsetup/22b5eb15-eda6-5eef-c504-c92da4fd1aab@gmail.com/T/#t

If BitLocker volumes can be safely resized:

2. Anaconda needs to ask the user for a BitLocker Recovery key

3. Anaconda needs to leverage libcryptsetup's BitLocker support, in order to unlock the volume with the user provided BitLocker Recovery key, and to facilitate the resize of the NTFS file system within.

Comment 1 Allan Day 2022-03-23 16:13:24 UTC
If Anaconda can't resize the volume, then it should at least show a human readable message to explain what the issue is, and point the user in the direction of fixing it. For example, we could recommend that someone resizes the volume in Windows. Ideally we'd also point to documentation explaining how to do this.

Comment 2 Vojtech Trefny 2022-03-23 18:16:25 UTC
(In reply to Chris Murphy from comment #0)
> Description of problem:
> 
> Cryptsetup supports unlocking BitLocker volumes, but there's no support for
> modifying the metadata.
> 
> 1. Determine if modifying the BitLocker metadata is necessary to support
> resize (i.e. is it similar to LUKS which has no explicit size and the
> dm-crypt volume inherits size from the underlying partition the LUKS header
> is located on)
> 
> https://lore.kernel.org/cryptsetup/22b5eb15-eda6-5eef-c504-
> c92da4fd1aab@gmail.com/T/#t

I answered on the mailing list, it unfortunately isn't this simple, the volume size is written in the BitLocker FVE metadata so it will be necessary to change the metadata too and that's something we don't want to do in cryptsetup and it's potentially very dangerous because we don't fully understand the metadata.

> 
> If BitLocker volumes can be safely resized:
> 
> 2. Anaconda needs to ask the user for a BitLocker Recovery key
> 
> 3. Anaconda needs to leverage libcryptsetup's BitLocker support, in order to
> unlock the volume with the user provided BitLocker Recovery key, and to
> facilitate the resize of the NTFS file system within.

Speaking as a Blivet maintainer here: We can talk about adding support for resizing BitLocker when there is a tool or library that supports it, we definitely won't be doing this in Blivet. Currently the safest (and probably the only) way is for the user to resize the volume from Windows.

I understand this is a problem, I saw the question on askfedora too and I agree we'll see more in the future, but this needs to be fixed somewhere else first. I'll keep this RFE open for the future.

Comment 3 Vojtech Trefny 2022-03-23 18:20:38 UTC
(In reply to Allan Day from comment #1)
> If Anaconda can't resize the volume, then it should at least show a human
> readable message to explain what the issue is, and point the user in the
> direction of fixing it. For example, we could recommend that someone resizes
> the volume in Windows. Ideally we'd also point to documentation explaining
> how to do this.

We are unfortunately not doing a good job when informing the user why a device/format is not resizable. Blivet doesn't have a simple API to tell you the reason and Anaconda doesn't have a way to show this information in the UI. We have a similar bug where NTFS is not resizable because it contains a suspended system and we also don't have a way to convey this. But this is a separate issue and more for Anaconda than Blivet. Can you please report this against Anaconda?

Comment 4 Chris Murphy 2022-03-23 19:02:56 UTC
I think the best option in the short term is to document how to use the Windows "Disk Management" tool to resize the volume from within Windows. That way Anaconda has free space to install into, and an automatic installation just works.


Note You need to log in before you can comment on or make changes to this bug.