mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
'sfdisk --part-type' used to merely set the MBR ID byte in the partition. However since sfdisk was rewritten, it now "helpfully" corrupts the first sector of the partition if you change the type byte from an ordinary partition to an extended partition. So we need to change the order in which we sets the partition type byte, to do it before copying the partition content. This fixes a major regression in the way that virt-resize handles any guest with logical partitions (specifically Ubuntu guests).