growpart changes diskid of mbr disks

Bug #1817302 reported by Steve Langasek on 2019-02-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)

Bug Description

When growpart is run against a disk with a dos partition table, it evidently changes the disk id in the MBR. This was noticed because the diskid is part of the "PARTUUID" that is synthesized for DOS partitions (unlike GPT, which has UUIDs for each partition as part of the partition table).

This means that if someone is using root=PARTUUID=foo on the kernel commandline, the cloud image will successfully boot exactly once, and subsequently fail to boot because the partition uuid has changed.

I don't know at this point if this is a bug in cloud-utils or in sfdisk (util-linux).

Juerg Haefliger (juergh) wrote :

On 32-bit sfdisk fails to parse the label-id if the MSB is set and thus generates a new one. We happen to be unlucky with our (i386) cloud image in that the original label-id has the MSB set. So when growpart run (which calls sfdisk), the disk ID is regenerated and subsequent boots fail because the kernel can't find the root device.

no longer affects: cloud-utils (Ubuntu)
Juerg Haefliger (juergh) wrote :

https://<email address hidden>

Steve Langasek (vorlon) on 2019-02-22
Changed in util-linux (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package util-linux - 2.33.1-0.1ubuntu2

util-linux (2.33.1-0.1ubuntu2) disco; urgency=medium

  * debian/patches/32-bit-safe-mbr-parsing.patch: [PATCH] libfdisk:
    (dos) Use strtoul to parse the label-id. Thanks to Juerg Haefliger
    <email address hidden>. LP: #1817302.

 -- Steve Langasek <email address hidden> Fri, 22 Feb 2019 21:46:00 +0100

Changed in util-linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers