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
Use the volume UUID to search for the GRUB config in btrfs partitions #3227
Use the volume UUID to search for the GRUB config in btrfs partitions #3227
Conversation
Hello @martinezjavier! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-03-08 19:28:23 UTC |
For UEFI installs, a minimal GRUB config file is created in the EFI System Partition that is used to load the main config file that is located in the /boot/grub2 directory. The partition that contains the latter, is found by the minimal config searching a device with a given filesystem UUID. But for this to work the stage2 device must have a filesystem UUID set and blivet doesn't set this for partitions formatted with a btrfs filesystem. Because each btrfs volume will have its own UUID, the UUID of the volume that's mounted according to /etc/fstab must be used to search the device. Resolves: rhbz#1930567 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
605d7ed
to
2efdec8
Compare
@vojtechtrefny what do you think? Does Btrfs need to be special cased because a subvolume is created for any mountpoint only on Btrfs? Or could it be treated the same as ext4 and XFS when it comes to FS UUID? Related: https://bugzilla.redhat.com/show_bug.cgi?id=1930567#c7 |
For reference this was changed in blivet by the following commit storaged-project/blivet@b3042c63e93f. I would like to understand why that change was made in the first place. |
I'm not sure why we have a special "exception" for btrfs here. Having the UUID set correctly for every subvolume and using |
Yes, that was my assumption since I noticed that |
/kickstart-test --testtype smoke |
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Looks good to me. Thank you!
Tested. |
For UEFI installs, a minimal GRUB config file is created in the EFI System
Partition that is used to load the main config file that is located in the
/boot/grub2 directory. The partition that contains the latter, is found by
the minimal config searching a device with a given filesystem UUID.
But for this to work the stage2 device must have a filesystem UUID set and
blivet doesn't set this for partitions formatted with a btrfs filesystem.
Because each btrfs volume will have its own UUID, the UUID of the volume
that's mounted according to /etc/fstab must be used to search the device.
Resolves: rhbz#1930567
Signed-off-by: Javier Martinez Canillas javierm@redhat.com