By default the root parameter in
/boot/cmdline.txt is set with
PARTUUID. For example:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=ae4da847-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
PARTUUID=ae4da847-02 is just a numerated
PTUUID=ae4da847 Disk identifier (also named Volume ID) as you can see with:
rpi ~$ sudo blkid /dev/mmcblk0
/dev/mmcblk0: PTUUID="ae4da847" PTTYPE="dos"
Raspian is distributed with disk-images containing all the same Disk identifer, so we spread the same identifer for different storages all over the world. Doesn't matter?
No, we get problems as reported here. Disk management tools like
parted correct this silently to a unique Disk identifier when used. But then Raspbian fails to boot because it has it's old and now wrong numerated Disk identifer
PARTUUID in it's root parameter. In the opposite it seems that the UUID of a partition never changes as long as the partition exists, even with duplicates on different disks. It's unique on the disk.
~$ sudo blkid /dev/mmcblk0p2
/dev/mmcblk0p2: LABEL="rootfs" UUID="72bfc10d-73ec-4d9e-a54a-1cc507ee7ed2" TYPE="ext4" PARTUUID="ae4da847-02"
To fix this problem I tried to use the
UUID as root parameter in
/boot/cmdline.txt but Raspbian does not boot with this.
Is there any other usable partition identifier for the root parameter in