Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btrfs installation is unencrypted! #2294

Closed
rustybird opened this issue Sep 5, 2016 · 13 comments
Closed

btrfs installation is unencrypted! #2294

rustybird opened this issue Sep 5, 2016 · 13 comments
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: installer P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: cannot reproduce Resolution: Attempts to replicate the problem have not been reliably successful enough to proceed. security This issue pertains to the security of Qubes OS.

Comments

@rustybird
Copy link

rustybird commented Sep 5, 2016

Qubes OS version:

R3.2 rc3


If you install with btrfs as as the root filesystem, it will be unencrypted.

Steps to reproduce the behavior:

  • Choose I will configure partitioning
  • On the MANUAL PARTITIONING screen, either keep LVM or choose Btrfs in the partitioning scheme dropdown.
  • Create /boot and swap.
  • Create /. If you previously chose Btrfs, the Encrypt checkbox is unselected and greyed out. If you previously chose LVM, switch to Btrfs now; then the Encrypt checkbox will be selected and greyed out.
  • In any case, the btrfs root filesystem will actually be installed to an unencrypted partition.

General notes:

Man, that partitioning wizard just keeps getting worse and worse.

Not workarounds:

  • If you manually create a LUKS container in the terminal and unlock it in the installer, you can't choose btrfs as its filesystem
  • If you also manually create a new btrfs filesystem inside the LUKS container, the installer will unselect and gray out the Reformat check box and then complain that reformatting the root mountpoint is required to continue... (ノಠ益ಠ)ノ彡┻━┻

Workarounds:

  • modprobe btrfs so dracut picks up the module, install as ext4, use btrfs-convert, replace the root fs UUID in grub.cfg
  • Slightly cleaner: In the end, I replaced the installer's mke2fs and mount binaries with a small wrapper script that mangles their invocations as needed
  • See comment below
@andrewdavidwong andrewdavidwong added bug C: installer security This issue pertains to the security of Qubes OS. labels Sep 5, 2016
@andrewdavidwong andrewdavidwong added this to the Release 3.2 milestone Sep 5, 2016
@tasket
Copy link

tasket commented Sep 14, 2016

IIRC you should be able to choose btrfs for automatic partitioning as a sort-of workaround -- if erasing the disk is OK. That gives you btrfs on luks. You could even install this way onto a different disk, then reboot and 'btrfs device add' a prepared luks volume on the target disk and then delete the initial device; this will move the contents of the installed root fs to your target disk.

But, yeah, the anaconda frontend is terrible.

@rustybird
Copy link
Author

@ttasket:

IIRC you should be able to choose btrfs for automatic partitioning as a sort-of workaround

Do you mean the menu where you could choose between several different automatic partitioning methods (LVM, btrfs, LVM+btrfs, ...)? At least R3.1-rc2 still had it, but I can't find anything of the sort for the R3.2 release candidates, am I overlooking something? I'm installing in BIOS mode, in case that makes any difference for Anaconda.

@tasket
Copy link

tasket commented Sep 15, 2016

@rustybird
Yes. Actually, using R3.2rc1 disc just now I was able to selectively delete old partitions (no disk wipe needed), then choose the partitioning type as 'btrfs'. Next I clicked the underlined 'link' above the partitioning type to automatically create mountpoints (I know that sounds backwards, and it looks that way too).

When I clicked 'Done' it showed a list of queued actions that included deleting old partitions, creating LUKS volumes, and formatting one of the LUKS volumes as btrfs. I didn't go ahead with the install, however.

@rustybird
Copy link
Author

@ttasket:

Hmm, I tried it with RC1 now and still can't find the right moves to get through Anaconda Island R3.2: The Curse of Anaconda Island. Maybe it depends on what partitions you had before installing, can you describe that?

For example, if I first start a default installation on an empty disk and reboot into the installer again when the automatic partitioning is done, and then (A) delete the LUKS container, or (B) unlock it and delete the root filesystem, the Click here to create them automatically link always errors out saying (for A) the root mountpoint is undefined, or (for B) there's not enough free space.

When trying to install to an empty disk, the error on Click here to create them automatically is also (A).

@tasket
Copy link

tasket commented Sep 15, 2016

@rustybird
I tried it again-- BTW this is with an external USB HD selected as the destination.

If I simply chose "I will configure partitioning" and then created space by deleting the partitions listed under the "Unknown" grouping, then select 'btrfs' in the dropdown box.... anaconda would say there was an error when I clicked "Click here to create them".

But if I left the partitioning on full automatic and checked the box to let me create free space, when I clicked Done a special popup box appeared for the purpose of flagging partitions as 'delete'. Once I finished with this, switching to "I will configure partitioning" worked... Select 'btrfs' from the dropdown box then click "Click here to create them" would complete without error and I could see the new partitions defined.

I have not tried unlocking LUKS containers in anaconda in a long time. My experience is that it will never figure out your intention or act on it correctly. Its best to let it create a new LUKS container.

@rustybird
Copy link
Author

rustybird commented Sep 15, 2016

Yes! Thanks so much for figuring that out and describing it! I would like to make additional space available - Done - Reclaim space is indeed the magic incantation, and can even be run on a totally empty drive. Somehow, that makes Click here to create them automatically work like it should.

@rustybird
Copy link
Author

As of R4.0rc4, the foray into I would like to make additional space available is no longer needed.

@marmarek
Copy link
Member

marmarek commented Mar 6, 2018

@rustybird does it mean the issue doesn't apply to R4.0-rc4?

@rustybird
Copy link
Author

does it mean the issue doesn't apply to R4.0-rc4?

Manual partitioning still creates an unencrypted btrfs filesystem. But at least the only case in which it falsely claims to encrypt is if the user switches from LVM Thin to LVM to btrfs.

Automatic btrfs partitioning works fine though.

marmarek added a commit to marmarek/qubes-installer-qubes-os that referenced this issue Mar 27, 2018
setDefaultPartitioning is called when executing kickstart "autopart"
command - which is the case if one choose to not change disk
partitioning. But in manual partitioning there is also an option to
start with automatic layout and in that case setDefaultPartitioning
isn't called at all. Which results in failed partitioning (missing '/'
and bootable partition).

Similar thing is already fixed in master commit
378cfc4.

QubesOS/qubes-issues#2294
Fixes QubesOS/qubes-issues#3334
@andrewdavidwong
Copy link
Member

This issue is being closed because:

If anyone believes that this issue should be reopened, please let us know in a comment here.

@zaz
Copy link

zaz commented Nov 18, 2024

This is still an issue on 4.2.3. I could not find any way to get the custom partitioning to prompt me for an encryption password and indeed when I continued with the installation it was unencrypted. I then tried to do this through blivet-gui and it did prompt me for an encryption password, but then would not boot.

Finally, I used the automatic installer to install it to the partitions previously created and it worked without issue.

@andrewdavidwong andrewdavidwong removed this from the Release 3.2 updates milestone Nov 29, 2024
@andrewdavidwong andrewdavidwong added needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Nov 29, 2024
@TommyTran732
Copy link

I just did an install on 4.2.3. This is not reproducible.

@andrewdavidwong andrewdavidwong removed the needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. label Dec 20, 2024
@andrewdavidwong andrewdavidwong added the R: cannot reproduce Resolution: Attempts to replicate the problem have not been reliably successful enough to proceed. label Dec 20, 2024
Copy link

This issue has been closed as "cannot reproduce." This means that attempts have been made to replicate the problem, but such attempts have not been reliably successful enough to proceed with fixing the problem.

We respect the time and effort you have taken to file this issue, and we understand that this outcome may be unsatisfying. Please accept our sincere apologies and know that we greatly value your participation and membership in the Qubes community. If the problem becomes reliably reproducible in the future, please let us know in a comment below, and we will reopen this issue.

If anyone reading this believes that this issue was closed in error or that the resolution of "cannot reproduce" is not accurate, please leave a comment below saying so, and we will review this issue again. For more information, see How issues get closed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: installer P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: cannot reproduce Resolution: Attempts to replicate the problem have not been reliably successful enough to proceed. security This issue pertains to the security of Qubes OS.
Projects
None yet
Development

No branches or pull requests

6 participants