Comment 7 for bug 1895329

Michael Hudson-Doyle (mwhudson) wrote :

It could be a race, this is the code that creates the partition and filesystem:

    echo "start=$start" | sfdisk --no-reread -q $DEVICE -a || return
    for d in ${DEVICE}$newpartno ${DEVICE}p$newpartno ${DEVICE}-part$newpartno; do
        if [ -e $d ]; then
            mkfs.ext4 -q -L "$(root_persistence_label)" -F $d
    udevadm trigger
    udevadm settle

But my understanding is that sfdisk (with the options we use here) doesn't return until it has told the kernel about the new partitions.

I also doubt that the changes to image mastering made a difference here and suspect it was some other change that coincidentally happened around the same time but who knows. (If the partition wasn't being created, I could quite easily believe the mastering changes would make a difference). I'll see if I can reproduce on my laptop tomorrow.