UUID question

Nils Kassube kassube at gmx.net
Mon Aug 18 05:43:01 UTC 2008


Jay Ridgley wrote:
> -->  I was not aware of device names changing during installation,
> however, as you both may see below they do..
>
> jay at polar:~$ lsscsi
> [0:0:0:0]    disk    SEAGATE  ST318404LW       0006  /dev/sdb
> [0:0:1:0]    disk    SEAGATE  ST318404LW       0006  /dev/sdc
> [0:0:4:0]    tape    Seagate  STT20000N        6A51  /dev/st0
> [0:0:5:0]    cd/dvd  YAMAHA   CRW8824S         1.00  /dev/scd0
> [3:0:1:0]    cd/dvd  SAMSUNG  CD-ROM SC-148C   B100  /dev/scd1
> [4:0:0:0]    disk    HP       Photosmart C3180 1.00  /dev/sda
>
> jay at polar:~$ lsusb
> Bus 002 Device 001: ID 0000:0000
> Bus 001 Device 004: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
> Bus 001 Device 003: ID 058f:6254 Alcor Micro Corp.
> Bus 001 Device 001: ID 0000:0000
>
> There are some interesting things in the above information:
>
> 1. The /dev/sda device is really my printer that is connected via  USB
> and I would to hazard a guess refers to the scanner. Why is it
> identified as a SCSI disk?

It isn't identified as a SCSI disk, but as a disk. The kernel doesn't 
distinguish any more between SCSI, IDE, USB, whatever type of disk when 
it comes to device names. So your HP Photosmart C3180 is identified as a 
disk which really is connected via USB.

And here we see the cause of disk renaming. The C3180 is now sda. If you 
remove it while you boot the machine, your disk which is now sdb would 
become sda, the disk which is now sdc would become sdb, and if you later 
connect the C3180 again, it will become sdc. It all depends on the 
sequence in which the devices are found by the kernel.

> 2. The SAMSUNG CDROM is NOT a SCSI device but is connected via the IDE
> bus.

Yes, same thing. Any CD/DVD drive gets a device name /dev/scd* nowadays, 
no matter how it is connected.

> 3. The device /dev/hdd does not exist (ls -l /dev/hdd shows that) and I
> would assume a mount command would also fail.

Right. You would need an entry for /dev/scd0 and /dev/scd1 instead. OTOH 
you don't really need an entry for the CD/DVD device. If you insert a 
disk, it usually gets mounted automatically (or you are asked if you want 
to mount it), even if there is no entry in /etc/fstab. But you probably 
know that already, because there is no such entry in your fstab.

> The question now becomes how do I go about generating UUIDs for these
> other devices (those without them) and get those identifiers properly
> assigned?

Your ext3 partitions already have a UUID. You can see it with the command

sudo blkid /dev/sdc1 /dev/sdc2

For the CD/DVD devices you can't use UUIDs. The UUID is used to identify a 
file system, not a disk device. Now, every CD / DVD you put in the drive 
would need its own UUID, but I don't know if that is supported at all by 
the ISO9660 / UDF file system standard which is used for CDs / DVDs.


Nils




More information about the ubuntu-users mailing list