diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 6cd320d897..ef3a456ea7 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -1001,6 +1001,8 @@ static int dissect_image( type = gpt_partition_type_from_uuid(type_id); label = blkid_partition_get_name(pp); /* libblkid returns NULL here if empty */ + + /* systemd-sysupdate expects empty partitions to be marked with an "_empty" label, hence ignore them here. */ if (streq_ptr(label, "_empty")) continue; diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index e15c97903e..3dc8c057e5 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -212,6 +212,10 @@ static int find_gpt_root(UdevEvent *event, blkid_probe pr, const char *loop_back if (flags & SD_GPT_FLAG_NO_AUTO) continue; + /* systemd-sysupdate expects empty partitions to be marked with an "_empty" label, hence ignore them here. */ + if (streq_ptr(label, "_empty")) + continue; + /* We found a suitable root partition, let's remember the first one, or the one with * the newest version, as determined by comparing the partition labels. */