RonR
Posts: 750
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

2019-09-26 Raspbian Image PTUUID

Tue Oct 01, 2019 4:40 am

Prior to the latest Raspbian image (2019-09-26), an SD card or USB drive received a unique PTUUID/PARTUUID/UUID on startup. With the 2019-09-26 image, the PTUUID/PARTUUID/UUID is not changed on startup from that of image file (PTUUID=6C586E13). IOW, all devices created with the 2019-09-26 Raspbian image will have the same PTUUID/PARTUUID/UUID. This is not good.

Milliways
Posts: 495
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: 2019-09-26 Raspbian Image PTUUID

Tue Oct 01, 2019 7:39 am

RonR wrote:
Tue Oct 01, 2019 4:40 am
Prior to the latest Raspbian image (2019-09-26), an SD card or USB drive received a unique PTUUID/PARTUUID/UUID on startup.
No it didn't!

RonR
Posts: 750
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: 2019-09-26 Raspbian Image PTUUID

Tue Oct 01, 2019 8:06 am

Milliways wrote:
Tue Oct 01, 2019 7:39 am
RonR wrote:
Tue Oct 01, 2019 4:40 am
Prior to the latest Raspbian image (2019-09-26), an SD card or USB drive received a unique PTUUID/PARTUUID/UUID on startup.
No it didn't!

Yes it did. After the SD card was auto-expanded by /usr/lib/raspi-config/init_resize.sh, it had a new PTUUID. /boot/cmdline.txt and /etc/fstab had to be adjusted to account for it:

Code: Select all

get_variables () {
...
  OLD_DISKID=$(fdisk -l "$ROOT_DEV" | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')
...
}

fix_partuuid() {
  DISKID="$(fdisk -l "$ROOT_DEV" | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')"

  sed -i "s/${OLD_DISKID}/${DISKID}/g" /etc/fstab
  sed -i "s/${OLD_DISKID}/${DISKID}/" /boot/cmdline.txt
}

For some reason, this change isn't occurring in 2019-09-26 whereas it did in previous versions. I double checked this behavior before posting.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6091
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: 2019-09-26 Raspbian Image PTUUID

Tue Oct 01, 2019 12:01 pm

I haven't confirmed the issue yet, but I can believe it.

The UUID change was not intentional, but it probably should be. It will be fixed in the next image.

Return to “Raspbian”