Skip to content

Commit

Permalink
repartition: Use partx rather than busybox partprobe
Browse files Browse the repository at this point in the history
Since da7b937, partprobe in the
initramfs is busybox, not the tool from parted.

For unknown reasons, busybox partprobe fails to probe /dev/loop0 after
it has been repartitioned, failing with:

    partprobe: /dev/loop0: Invalid argument

partx --update performs a similar function, except that it works
correctly at this stage of the boot process. Using partx also has the
advantage that running this tool manually from the booted system (where
partprobe is the real thing) will actually run the same code as in the
initramfs.

https://phabricator.endlessm.com/T35432
  • Loading branch information
wjt committed Jun 6, 2024
1 parent d73f66e commit d644efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dracut/repartition/endless-repartition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ udevadm settle

# Loop devices need a prod
if [ -n "$using_loop" ]; then
partprobe $root_disk
partx --update --verbose $root_disk
udevadm settle
fi

Expand Down

0 comments on commit d644efe

Please sign in to comment.