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 see sdb under /dev/disk/by-path. Also, when using blkid, I get zero output. I'm assuming that I got an error code that returned back.
Is there a way to get a UUID for this partition?
Result of fdisk -l /dev/sdb
:
Disk /dev/sdb: 320.1 GB, 320072932352 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142446 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00082145
Device Boot Start End Blocks Id System
/dev/sdb1 2048 625141759 312569856 83 Linux
The partition table and partition was created with gparted, so it was partitioned and ran the command mkfs.ext3.
Output of fsck -n /dev/sdb1
:
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
fsck.ext2: Superblock invalid, trying backup blocks...
zwei was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
zwei: 11/19537920 files (0.0% non-contiguous), 1275097/78142464 blocks
It was formatted as an ext3 drive. Why is that showing up as ext2?
/dev/sdb
will not have a UUID, but/dev/sdb1
should if it has been formatted.fsck -n /dev/sdb1
. You could also try to give it a UUID withtune2fs -U random /dev/sdb1
then see. It doesn't matter what the UUID is.fsck -y /dev/sdb1
; if you can't mount it, just run the fsck and hopefully nothing is lost. Readman fsck
for the difference between-n
and-y
.