forked from Mirror/pmbootstrap
pmbootstrap: run partprobe after repartitioning (MR 2473)
On some kernels (notably, WSL2) parted fails to inform the kernel about the new partition layout, leading to errors when trying to create the new filesystems. This change runs an additional `partprobe` after updating the partition table, informing the kernel about the new layout. Fixes: #2422 Signed-off-by: Dominik Bayerl <dominik.bayerl@carissma.eu> [caleb: move call so it runs after partition_cgpt() as well] Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
39235fedfb
commit
87515529cf
1 changed files with 4 additions and 0 deletions
|
@ -868,6 +868,10 @@ def install_system_image(
|
|||
pmb.install.partition_cgpt(layout, size_boot, size_reserve)
|
||||
else:
|
||||
pmb.install.partition(layout, size_boot, size_reserve)
|
||||
|
||||
# Inform kernel about changed partition table in case parted couldn't
|
||||
pmb.chroot.root(["partprobe", "/dev/install"], check=False)
|
||||
|
||||
if not split:
|
||||
pmb.install.partitions_mount(device, layout, disk)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue