PARTUUID vs /dev/mmcblk0p2

cat /boot/cmdline.txt*
root=PARTUUID=8f58bbca-02 rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200 usbhid.mousepoll=8 audit=0
root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 snd-bcm2835.enable_compat_alsa=0 slub_debug=FZP

whats difference beetween root=/dev/mmcblk0p2 and root=PARTUUID ?
I run rsync for backup, if i switch the microsd im afraid the sd backup wont start

Hi @enrico20026,

AFAIK, the difference is that the /dev/xxx can chaange depending on the circumstance. Which deevices are present, and more. I think.

Whereas the UUID, or PARTUUID won’t change except when it’s formatted as it’s calculated and stored on the drive then.

Just saw this was in the ARM forum, but AFAIK it doesn’t really make a difference. At least not in my explanation’s case. I think. Meh! I’m not a know-it-all.

1 Like

The UUID will indeed change if the partition is reformatted ─ it is stored in the filesystem header ─ but the PARTUUID will not, because it is stored in the partition table. :wink:

The /dev/something designation can change if you have more than one drive attached, due to the fact that the kernel enumerates the drives according to the order of discovery during boot-up. :wink:

1 Like

Thank you. Now I understand it better. Never had to worry about PARTUUID as I’ve never had to use it.

1 Like

In the same vein, there are also LABEL (stored in the filesystem header) and PARTLABEL (stored in the partition table), but those must be set manually. And that leaves room for error ─ i.e. duplicate entries. :wink:

Yeah. I decided a long time ago to stick with UUID. (I tend not to have drives full of partitions, it’s easier to remember that way, so much less room for error.)

But I can see where PARTUUID would be useful.

1 Like

If using btrfs, UUID is preferable over PARTUUID.

  • Then it is possible to move a volume around (from one disk to another) without changing fstab.
  • Btrfs will use the same UUID for partitions/devices which are part of the same btrfs-volume.

BUT never copy/move btrfs volumes with “standard”-tools. Only use btrfs itself see why@


rsync -aAXHv --delete /boot/* /media/$USER/$label/

rsync -aAXHv --delete --exclude={/boot/,/dev/,/proc/,/sys/,/tmp/,/run/,/mnt/,/media/,/lost+found,/var/cache/pacman/pkg/*} / /media/$USER/$label/

so i make a backup on a microsd, partuiid is a copy from another microsd, can i switch the microsd created with rsync,or do i have to change the value PARTUUID in the “new” microsd?

make a copy with dd, thats a full clone. You have nothing to change.

rsync only copies files. so, you have to change your uuid.

thanks partuuid doesnt change after rsync and the boot is fine

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.