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

Support partitioning of hybrid boot disks #1174

Conversation

poncovka
Copy link
Contributor

Anaconda needs to be able to create hybrid boot disks. For example:

  clearpart --all --initlabel --disklabel=gpt
  part prepboot  --size=4    --fstype=prepboot
  part biosboot  --size=1    --fstype=biosboot
  part /boot/efi --size=100  --fstype=efi
  part /boot     --size=1000 --fstype=ext4 --label=boot
  part /         --grow      --fstype xfs

However, this kickstart snippet is not working with two or more disks. The bootloader-related partitions should be all created on the disk the computer will boot from, but Blivet does that only for platform -specific partitions. The rest of them are created on any disk with enough space.

It looks like this can be easily fixed by setting the same weight to all of these partitions regardless of the current platform.

See: rhinstaller/anaconda#5298

@StorageGhoul
Copy link

Can one of the admins verify this patch?

@poncovka
Copy link
Contributor Author

@vojtechtrefny Does it make sense? Can we do this change globally or do you want to control it via a flag?

@vojtechtrefny
Copy link
Member

Jenkins, ok to test.

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (except the bad indentation pylint is complaining about). I think we can change this globally, I don't see a situation where it could be a problem and I don't like adding another flag.

blivet/devices/partition.py Outdated Show resolved Hide resolved
@poncovka poncovka force-pushed the 3.9-devel-bootloader_devices_weight branch 2 times, most recently from 03a4deb to 63474c0 Compare November 24, 2023 15:57
Anaconda needs to be able to create hybrid boot disks. For example:

  clearpart --all --initlabel --disklabel=gpt
  part prepboot  --size=4    --fstype=prepboot
  part biosboot  --size=1    --fstype=biosboot
  part /boot/efi --size=100  --fstype=efi
  part /boot     --size=1000 --fstype=ext4 --label=boot
  part /         --grow      --fstype xfs

However, this kickstart snippet is not working with two or more disks.
The bootloader-related partitions should be all created on the disk
the computer will boot from, but Blivet does that only for platform
-specific partitions. The rest of them are created on any disk with
enough space.

It looks like this can be easily fixed by setting the same weight
to all of these partitions regardless of the current platform.

See: rhinstaller/anaconda#5298
@poncovka poncovka force-pushed the 3.9-devel-bootloader_devices_weight branch from 63474c0 to b39e390 Compare November 24, 2023 16:31
@poncovka
Copy link
Contributor Author

Updated.

@vojtechtrefny vojtechtrefny merged commit dc99f35 into storaged-project:3.9-devel Nov 27, 2023
12 checks passed
@poncovka
Copy link
Contributor Author

Just an update, Anaconda is not going to add the support for hybrid boot (at least for now, see rhinstaller/anaconda#5298 (comment)). I talked to @vojtechtrefny about this pull request and we think it's still a useful fix for anyone who wants to experiment with this feature in the %post section. So the conclusion is that we leave it merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants