storaged-project / blivet

A python module for configuration of block devices
GNU Lesser General Public License v2.1
98 stars 85 forks source link

Support partitioning of hybrid boot disks #1174

Closed poncovka closed 9 months ago

poncovka commented 9 months ago

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: https://github.com/rhinstaller/anaconda/pull/5298

StorageGhoul commented 9 months ago

Can one of the admins verify this patch?

poncovka commented 9 months ago

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

vojtechtrefny commented 9 months ago

Jenkins, ok to test.

poncovka commented 9 months ago

Updated.

poncovka commented 9 months ago

Just an update, Anaconda is not going to add the support for hybrid boot (at least for now, see https://github.com/rhinstaller/anaconda/pull/5298#issuecomment-1827687218). 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.