UUID question

Derek Broughton news at pointerstop.ca
Mon Aug 18 04:44:02 UTC 2008


Jay Ridgley wrote:

> Nils wrote:
> 
> Date: Sun, 17 Aug 2008 15:07:22 +0200 From: Nils Kassube
> <kassube at gmx.net> Subject: Re: UUID question To:
> ubuntu-users at lists.ubuntu.com Message-ID:
> <200808171507.22272.kassube at gmx.net> Content-Type: text/plain;
> charset="iso-8859-1" Jay Ridgley wrote:
> 
>> > I have two partitions that have UUIDs assigned that were assigned
>> > during the upgrade to edgy, /dev/sda1 and /dev/sda5, the first is
>> > mounted as / and the second one as swap. The names have changed due to
>> > the SCSI controller being assigned /dev/sda since sudo fdisk -l shows
>> > them as /dev/sdb1 and  /dev/sdb5.
>>   
> 
> The SCSI controller is definitely not assigned a device name, only the
> disks connected to the controller will get device names. However I can't
> tell you why you don't have /dev/sda* entries.
> 
> --> My comment
> -->  It was used for my HP Photosmart C3180 All-in-ONE... see below
> 
>> > I also have  three others  that do not,  /dev/hdd,  /dev/sdc1 and
>> > /dev/sdc2,  these are mounted as /media/cdrom, /home and /archive
>> > respectively.
>> >
>> > It appears that my scsi cdrom /dev/scd1 is not included in /etc/fstab,
>> > however, the other cdrom is included as /dev/hdd with a mount point of
>> > /media/cdrom0.
>> >
>> > My question is are the UUIDs required or can I change them back to the
>> > "old fashioned" names (/dev/sdb1 and /dev/sdb5) that I have used for
>> > years with  Linux and various other UNIX systems?
>>   
> 
> Well, you _can_ change the entries to device names and it will work, if
> the device names are _always_ the device names you have now. But as you
> mentioned in your first paragraph, you can't be sure that the disk which
> is now at sdb is always sdb - it has been sda before. At least that's how
> I understand it. Now, if device names change, after you have renamed the
> fstab entries to device names, your system won't work any longer. May I
> ask why you want to use device names in your fstab?
> 
> --> My comment:
> 
> -->  I am just more used to that notation, however, after some more
> research I think I need to learn the new method... see below
> 
>> > Can I safely create
>> > an entry in /etc/fstab for the SCSI CDROM?
>>   
> 
> Sure.
> 
> --> My comment:
> 
> -->  I think I need to use a UUID here also...
> 
> Nils
> 
> Derek ALSO wrote:
> 
> --snip my OP--
> 
> Here we go again...
> 
> Of course you can change back to old fashioned names - but why would you
> expect this to continue to work?  Your devices have changed names before,
> and they'll likely change again.  You're _much_ safer to use the UUIDs.
> And sure you can create an entry for the SCSI CD.
> 
> -- derek
> 
> --> My comment:
> 
> -->  I was not aware of device names changing during installation,
> however, as you both may see below they do..
> 
> --> Additional info below ---
> 
> 
> 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
> 
> jay at polar:~$ cat /etc/fstab
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> # /dev/sda1 -- converted during upgrade to edgy
> UUID=aa505a5b-90e4-4f99-94d3-3adc17db5e41 / ext3
> defaults,errors=remount-ro 0 1
> # /dev/sda5 -- converted during upgrade to edgy
> UUID=abe9cd12-9e62-4c8a-beb3-d1e022ba02f9 none swap sw 0 0
> /dev/hdd        /media/cdrom0   udf,iso9660 user,noauto     0       0
> # next lines added by CDJ Systems - 06/28/08
> /dev/sdc2       /home           ext3    rw              0       2
> /dev/sdc1       /archive        ext3    rw,noauto       0       2
> 
> 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?
> 
> 2. The SAMSUNG CDROM is NOT a SCSI device but is connected via the IDE
> bus.

It should probably be on /dev/scd0

> 3. The device /dev/hdd does not exist (ls -l /dev/hdd shows that) and I
> would assume a mount command would also fail.
> 
> The question now becomes how do I go about generating UUIDs for these
> other devices (those without them) and get those identifiers properly
> assigned?

Devices don't have UUIDs, filesystems do. "sudo blkid" should tell you what
the UUID of every currently mounted filesystem is.  Using a UUID for your
CDROM would be kind of pointless, though - as every CD would have a
different UUID.
-- 
derek





More information about the ubuntu-users mailing list