Questions tagged [uuid]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
63
votes
6answers
164k views

How can I look up a username by id in linux?

The command id can be used to look up a user's uid, for example: $ id -u ubuntu 1000 Is there a command to lookup up a username from a uid? I realize this can be done by looking at the /etc/passwd ...
40
votes
2answers
86k views

How to run custom scripts upon USB device plug-in?

What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora? For example if you want to ...
27
votes
3answers
34k views

Why can't I specify my root fs with a UUID?

My system boots OK with this in my GRUB 2 config: linux /bzImage root=/dev/sda2 init=/usr/lib/systemd/systemd ro But if I replace /dev/sda2 with the corresponding UUID: linux /bzImage root=UUID=...
26
votes
3answers
29k views

Difference between UUID from blkid and mdadm?

Can someone explain the difference between the UUID's reported by blkid and mdadm? On one of our CentOS systems, for example: [root@server ~]# blkid | grep /dev/md1 /dev/md1: UUID="32cb0a6e-8148-44e9-...
24
votes
8answers
31k views

How to change filesystem UUID (2 same UUID)?

I have a fedora guest OS in VMware. I want to expand /boot partition, so I add another virtual disk to this VM, and try to clone the disk. After dd if=/dev/sda1 of=/dev/sdb1, blkid report that /dev/...
19
votes
6answers
49k views

generate consistent machine unique ID

Can we generate a unique id for each PC, something like uuuidgen, but it will never change unless there are hardware changes? I was thinking about merging CPUID and MACADDR and hash them to generate ...
13
votes
2answers
6k views

Modifying a BTRFS filesystem UUID

I've made backups of my BTRFS filesystem using Clonezilla, and have restored one of those backups to a file named 2013-11-29.sda3.img. I need to get some files out of this backup, but there's a hitch....
12
votes
1answer
7k views

reference whole disk (/dev/sda) using UUID

On my system (Debian), I can see the UUID identifier for all of my disks partitions (i.e. /dev/sda1, dev/sda2, ..) ls /dev/disk/by-uuid/ However, I don't see the UUID identifier for /dev/sda itself. ...
11
votes
1answer
17k views

How to find the swap uuid

I am in the process of setting up a raid. sda was used during the installation and I just copied the partition table of sda to sdb like so: $ sudo sfdisk -dL /dev/sda > partition_table_sda $ sudo ...
11
votes
2answers
30k views

What is the purpose of UUIDs for NICs?

On Fedora/RHEL/CentOS there is a line in /etc/sysconfig/network-scripts/ifcfg-x files which defines UUID: UUID=30fcd648-ad1e-4428-as6f-951e8e4d16df NICs have MAC addresses by them selves, so what is ...
9
votes
4answers
42k views

UUID Of A drive that won't show up in /dev/disk/by-uuid or blkid

I have a USB drive that is not receiving a UUID. When I look at the contents of the /dev/disk/by-uuid it doesn't exist there. The dev point that the partition lives in is on /dev/sdb. I am able to ...
7
votes
2answers
2k views

How to get UUID of filesystem given a path?

I am handed a path of a directory or a file. Which utility/shell script will reliably give me the UUID of the file system on which is this directory/file located? By UUID of file system I mean the ...
7
votes
2answers
1k views

Why did dd create a different uuid?

root@debian:/home/tiger# dd if=/dev/sda of=/dev/sdb bs=10240k 11447+1 records in 11447+1 records out 120034123776 bytes (120 GB) copied, 4729.59 s, 25.4 MB/s root@debian:/home/tiger# blkid /dev/...
6
votes
2answers
2k views

Create unique random numbers (UUIDs) in bash

I want to create random unique numbers (UUIDs) as the following node.id=ffffffff-ffff-ffff-ffff-ffffffffffff First I tried this $ rndnum=` echo $RANDOM"-"echo $RANDOM"-"echo $RANDOM"-"echo $RANDOM"-...
6
votes
2answers
3k views

Change encrypted partition UUID

I'm trying to change a partition's UUID, the problem is that I'm trying to change an encrypted volume. So I can't use the usual method described here. Since it throws the following error: tune2fs: ...
6
votes
3answers
10k views

How do you dual boot Debian and FreeBSD using GRUB2?

I've been trying to install FreeBSD alongside my Debian installation in a single partition. All examples readily present on the Internet had shortcomings: Some required chainloading the FreeBSD ...
5
votes
2answers
4k views

How to find out UUID of a non-block USB device?

In a nutshell, the device I have is not a block device so blkid command doesn't suit me. But at least I can get some info about my device via lsusb -v command although it doesn't contain its UUID. ...
5
votes
1answer
886 views

Changing HFSPlus UUID from PartedMagic

I needed to make a clone of my hard drive recently (bad blocks FTW). I was using Clonezilla at the time. However, Clonezilla refused to copy the HFS+ partition, so I did it manually. The problem is ...
5
votes
1answer
2k views

What is the UUID format used by LVM?

Linux LVM assigns UUID values to physical and logical volumes but they aren't valid RFC4122 UUID strings. Here is an example: 2185fe86-41d4-4311-9a47-8f0ebc7ecc5a RFC4122 AZdHpq-uENw-cRo2-t6jS-iQXu-...
4
votes
2answers
20k views

understanding /dev/disk/by- folders

Question: What does /dev/disk/by-pathdescribe? And where is this documented? Going through the meaning of what is displayed in the folders /dev/disk/by- I've got that far, and I wonder is this ...
4
votes
2answers
8k views

How do I get the UUID of a partition and define a Bash variable as being equal to it?

I would like to define a Bash variable PART_ID as being equal to the UUID of the /dev/sdb1 partition. The closest I have gotten to the desired answer is the output of: ls -ld /dev/disk/by-uuid/* | ...
4
votes
2answers
6k views

Is machine-id a uuid?

I searched my question and none of them answered me: Is machine-id as unique as mainboard UUID (fetched by "get csproduct UUID" command on windows)? And is enough reliable to bind a license on machine-...
4
votes
2answers
7k views

How to identify root partition via UUID without initramfs/initrd

Without initramfs/initrd support, the following kernel command line won't work: linux /bzImage root=UUID=666c2eee-193d-42db-a490-4c444342bd4e ro How can I identify my root partition via UUID ...
4
votes
1answer
16k views

Can I change uuid for network interface in ifcfg-eth* using uuidgen?

I'm creating a script which configuration the network interfaces. The script which generates /etc/udev/rules.d/70-persistent-net.rules and names interfaces to my preference. In CentOS 6.5, my ...
4
votes
3answers
818 views

Store a custom serial number on a USB flash drive, immune to overwriting

I'm working with massive amounts of USB flash memory. I'd like to be able to track events regarding the USB drives. Specifically: I perform f3 tests, format the drives and write data to them. I'm ...
4
votes
2answers
1k views

Btrfs subvolume UUID clash

Two file systems with the same UUID on the same computer are problematic, eg. it could lead to data corruption, especially if both are mounted at the same time (like the BTRFS wiki says too). So, ...
3
votes
2answers
251 views

“sort -nu” on uuids

anyone could explain why "sort -nu" returns only 1 unique line in example below? $ cat /tmp/test_ 1e971713-31e4-62d0-a3d1-37c0610c10e5 1e97d59f-bc32-6126-b7b1-0b52ddd35273 1e971713-31e4-62d0-a3d1-...
3
votes
1answer
4k views

UUID based on global MAC address

I used the uuid command from the uuid-1.6.2-8.fc17.x86_64 package to generate version 1 UUIDs. The man page said that the default is to use the real MAC address of the host, but when I decoded the ...
3
votes
4answers
3k views

Generate a key (number?) based on part of the machine's hardware components

I'm wondering what is the best way to manually generate a hardware key based on certain components of the machine. Here's the thing: I want only certain type of machines to be able to communicate ...
3
votes
3answers
122 views

in which cases it will be problematic to configure UUID in fstab

We are thinking about to change all Linux fstab configuration to work with UUID instead the current configuration Some of the disks are with non RAID and some of the disks are with RAID10 I searched ...
3
votes
1answer
1k views

sda and sdb keep on swapping

The box is a HP microserver, running Ubuntu 16.04. I recently "upgraded" the boot device to a 64GB SSD. Additionally there is a 1TB SATA drive. usually it boots up with /dev/sda1 as the primary ...
3
votes
1answer
3k views

fstab entry for swap space

Here is the free -m output [prem@myserver: /home/prem]$ free -m total used free shared buff/cache available Mem: 991 218 85 267 ...
3
votes
3answers
2k views

change FAT16 partition UUID

I have created a FAT16 formatted partition on my USB stick using mkdosfs /dev/sdb1 when I plug in my stick, it appears in /dev/ as: /dev/disk/by-uuid/ABCD-1234 How can I change the UUID of the ...
3
votes
1answer
2k views

generate consistent machine unique ID in c programming

Is it possible to generate a unique ID that wouldn't change over time unless there is hardware changes. The hardware must be generated with a c program. That also would be great if it were robust to ...
3
votes
3answers
104 views

reliable scripting way of obtaining UUID of boot partition

I want to script a somewhat automated method for editing /etc/default/grub and appending fips=1 boot=UUID=???? to GRUB_CMDLINE_LINUX= coincidentally /etc/fstab contains UUID=12345blabla /boot xfs ...
3
votes
1answer
904 views

How can I override the kernel default options for mount?

I'm struggling with a program that creates a file system in a file and mounts it as a loopback device. The purpose of the program is to create a clone of the root file system and it thinks it's being ...
3
votes
1answer
1k views

How do I create a zpool using uuid or truly unique identifier?

I created my first zpool the other day, assigning by drive letter, and found that when I rebooted it was degraded. Upon closer inspection, I realized that my drive letters had changed with reboot, so ...
3
votes
2answers
693 views

Linux on external USB drive won't boot on other computers

I have GNU/Linux (currently Fedora 26, but previously Linux Mint 18.2 Sonya) installed on an external hard drive alongside an NTFS partition I use for storage – and it boots perfectly on the computer ...
3
votes
1answer
3k views

Mint 17.1 - installation reverts to Grub - UUI

I'm attempting to install Mint 17.1 and have succesfully used Universal USB Installer to create a bootable USB stick. When booting up Mint the pleasing loading screen fails to make an appearance and ...
2
votes
4answers
2k views

how UUID of a partition is generated

Can anybody explain me how UUID (Universally unique identifier) of a partition is generated in Linux based distributions ?
2
votes
1answer
168 views

Short and long uuids under /dev/disk/by-uuid

There are several hard disk partitions on my system (Linux josDeb 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux). It is working with: bejo@josDeb:~$ ls -l /dev/disk/by-uuid ...
2
votes
1answer
1k views

Why use UUIDs in /etc/fstab instead of device names? [duplicate]

What is the reasoning behind using UUIDs in /etc/fstab instead of device names (like /dev/sbd2)? Device names &/or partition numbers seem substantially cleaner from an administrative viewpoint.
2
votes
2answers
163 views

How to tell without knowing the mount point that a device UUID is mounted?

System: Linux Mint 19.1 Cinnamon 64-bit, based on Ubuntu 18.04 LTS. I would like to know if it is possible to get the following information: Is this UUID (of a block device) mounted or not? (without ...
2
votes
1answer
2k views

Understanding UUID assignment

A UUID (universal unique identifier) is a 128 bit code which is used to identify block (storage) devices. Firstly, is this all UUIDs are used for? How does a device obtain its UUID? Does it ever ...
2
votes
2answers
5k views

Why do I need GRUB_DISABLE_LINUX_UUID=true

I just switched from lilo to grub2 and my first attempt failed with kernel panic - not syncing vfs unable to mount root fs on unknown block(0 0). It turned out that the problem was that the root ...
2
votes
3answers
537 views

Can I substitute partition number with UUID?

Here is my grub.cfg: menuentry 'Debian 6.0 on hard disk' { set isofile="(hd0,6)/home/toinstall/debian.iso" loopback loop $isofile search --no-floppy --fs-uuid --set=root 8b29114c-4f89-...
2
votes
1answer
160 views

Backup partition changed UUID without user interaction

I recently had to purchase a new hard drive. Since I was at it I bought two instead of one as they were on offer (both are the same model). Since there was a lot of space left on the second hard disk ...
2
votes
1answer
417 views

Generation of UUID1 is too slow

I upgraded my Ubuntu box from 13.04 to 14.04 LTS few days ago. Now I'm using libuuid-2.20.1. Anyway, after the upgrading, my UUID1 became very slow. $ time uuidgen -t f22c36aa-f511-11e3-9437-...
2
votes
1answer
1k views

Error mounting drive with fstab

I have an small server in my house with an external usb 2TB hard drive: /dev/sdb1: LABEL="Data" UUID="eedc3098-221d-4800-b8b4-efa4fef23f5f" TYPE="ext4" I have the next line in /etc/fstab: UUID=...
2
votes
2answers
761 views

UUID in fstab + in which cases we must not configured UUID in fstab

discussion - we have redhat linux machines and my question is about the UUID configuration in /etc/fstab file , and in which cases UUID risk the OS as I understand we MUST NOT use UUID in /etc/...