UUID: Unterschied zwischen den Versionen

Aus robopagex.com
Zur Navigation springen Zur Suche springen
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 2: Zeile 2:
  
 
  [https://wiki.ubuntuusers.de/UUID/ UUID Ubuntuusers]  
 
  [https://wiki.ubuntuusers.de/UUID/ UUID Ubuntuusers]  
 +
[https://stackoverflow.com/questions/34577732/linux-kernel-module-calculate-hashes-of-devices Linux kernel module calculate hashes of devices]
 +
[https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/verity.html dm-verity]
 +
[https://askubuntu.com/questions/54329/how-to-generate-unique-hardware-hash How to generate unique hardware hash?]
 +
[https://unix.stackexchange.com/questions/144812/generate-consistent-machine-unique-id generate consistent machine unique ID]
 +
[https://unix.stackexchange.com/questions/270212/how-do-i-get-the-uuid-of-a-partition-and-define-a-bash-variable-as-being-equal-t How do I get the UUID of a partition and define a Bash variable as being equal to it?]
 +
[https://stackoverflow.com/questions/13565658/right-tool-to-filter-the-uuid-from-the-output-of-blkid-program-using-grep-cut/16277809 right tool to filter the UUID from the output of blkid program (using grep, cut, or awk, e.t.c)]
 +
[https://www.tecmint.com/change-modify-linux-disk-partition-label-names/ How to Change Linux Partition Label Names on EXT4 / EXT3 / EXT2 and Swap]
 +
[https://askubuntu.com/questions/1103569/how-do-i-change-the-label-reported-by-lsblk How do I change the "label" reported by lsblk?]
 +
[https://askubuntu.com/questions/103686/how-do-i-rename-a-usb-drive How do I rename a USB drive?]
  
 
  Ein valider UUID lässt sich unter Linux durch den Befehl uuidgen oder
 
  Ein valider UUID lässt sich unter Linux durch den Befehl uuidgen oder
Zeile 24: Zeile 33:
 
  Create a hash based on the UUIDs of your hard drive(s) instead:
 
  Create a hash based on the UUIDs of your hard drive(s) instead:
 
  '''$ blkid | grep -oP 'UUID="\K[^"]+' | sha256sum | awk '{print $1}''''
 
  '''$ blkid | grep -oP 'UUID="\K[^"]+' | sha256sum | awk '{print $1}''''
 +
 +
$ cat /sys/class/dmi/id/board_serial
 +
$ cat /sys/class/dmi/id/product_uuid
 +
$ cat /etc/machine-id
 +
$ cat /var/lib/dbus/machine-id
 +
$ ip a | sed '\|^ *link[^ ]* |!d;s|||;s| .*||'
 +
$
 +
 +
dbus_get_local_machine_id()

Aktuelle Version vom 11. Mai 2022, 13:03 Uhr

Universally Unique Identifier (UUID)

UUID Ubuntuusers 
Linux kernel module calculate hashes of devices
dm-verity
How to generate unique hardware hash?
generate consistent machine unique ID
How do I get the UUID of a partition and define a Bash variable as being equal to it?
right tool to filter the UUID from the output of blkid program (using grep, cut, or awk, e.t.c)
How to Change Linux Partition Label Names on EXT4 / EXT3 / EXT2 and Swap
How do I change the "label" reported by lsblk?
How do I rename a USB drive? 
Ein valider UUID lässt sich unter Linux durch den Befehl uuidgen oder
$ cat /proc/sys/kernel/random/uuid
erzeugen. Dem zweiten Dateisystem auf /dev/sdX kann dieser neue UUID zugeordnet werden:
$ tune2fs -U <UUID> /dev/sdX2
ifconfig eth0 | grep HWaddr | awk '{ print $NF}' | sed 's/://g'

$ uuidgen -r
$ uuidgen -t


$ blkdid
$ blkid | grep UUID=
$ ls -l /dev/disk/by-uuid
$ lsblk -f
$ lsblk -f | grep -v loop
Create a hash based on the UUIDs of your hard drive(s) instead:
$ blkid | grep -oP 'UUID="\K[^"]+' | sha256sum | awk '{print $1}'
$ cat /sys/class/dmi/id/board_serial
$ cat /sys/class/dmi/id/product_uuid
$ cat /etc/machine-id
$ cat /var/lib/dbus/machine-id
$ ip a | sed '\|^ *link[^ ]* |!d;s|||;s| .*||'
$ 
dbus_get_local_machine_id()