blockdev: support bootloader update on MBR#1054
Conversation
There was a problem hiding this comment.
Code Review
This pull request effectively adds support for bootloader updates on MBR partitioned disks, which resolves an issue with multipath devices. The main changes are:
-
MBR Support: The
get_esp_partitionfunction insrc/blockdev.rsis refactored to usefind_partition_of_espfrom thebootc-internal-blockdevcrate. This is a great improvement as it centralizes the logic for finding ESP partitions and extends support to MBR disks, which was the primary goal. -
Improved Command Output: Across several files (
src/efi.rs,src/filetree.rs,src/grubconfigs.rs), calls to external commands likemount,umount,efibootmgr,cp, andgrub2-editenvhave been updated fromrun()torun_inherited(). This change makes the tool more transparent by showing the output of these commands, which is very helpful for debugging and user feedback.
The changes are clean, focused, and correctly implemented. The code quality is excellent. I have no issues to report.
Based on updates in bootc-dev/bootc#1773
Fixes: #1019