0

I have an MBR style formatted SD card where I need a PARTUUID in order to mount a partition there as the rootfs (via linux kernel parameter root=PARTUUID=...). Using an fs UUID does not work.

However, blkid does not show any PARTUUIDs, only UUIDs.

I understand that PARTUUID is not a historical feature of MBRs, but that they can still be used. I have looked around for a way to add or change a PARTUUID, but all I can find is stuff where a GPT is being used.

I've seen various ways to extract an existing uuid but the identifier I get is always just four null bytes (i.e., all zeros). This is also what fdisk gives as the "Disk Identifier", 0x00000000.

  • BTW your "answer to a related question" link is broken. – plugwash Mar 16 at 13:05
1

The PARTUUIDs used with MBR's are based on the "disk identifier", which evidently is not mandatory -- you can end up without one and the partition table is still functional.

I've read this answer to a related question, but the identifier pulled that way is just four null bytes (i.e., all zeros). This is also what fdisk gives as the "Disk Identifier", 0x00000000.

If you use fdisk to change the identifier to a non-zero value, you will magically have PARTUUIDs reported afterwards.

  1. This is an "expert" option; from the main menu choose x.

  2. From the expert menu, choose i.

  3. Enter any eight random hex digits, prefaced with 0x, e.g., Oxd3b587f.

  4. Go back to the main menu, r, and write the table, w.

blkid should now report PARTUUIDs for the partitions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.