Linux prefers to use UUID (Universally Unique Identifier), LABEL, or symlinks to identify media storage devices on a system. Using device assignments (like /dev/hd*# or /dev/sd*#) is not preferred since these can change between system boots:

all filesystems should be specified by UUID=<id> or LABEL=<name> for each partition.

all physical devices should be specified by a symlink, like /dev/cdrom for a cd drive and /dev/disk/by-id/... for each physical hard drive.

The files for which UUID is most critical:

/boot/grub/menu.lst

/etc/fstab

/etc/initramfs-tools/conf.d/resume

This page uses the terminal a lot, so if you are new to this, see UsingTheTerminal.

Using LABEL

Labels can be very useful for external media, like flash drives and USB hard drives since these are generally automounted by hal (Hardware Abstraction Layer). If a device has a label, it will be mounted at the /media/<label> location and appear with the label on the desktop.

Symlinks

Symlinks (symbolic links) are used to make it easier to identify a device. For example /dev/cdrom can link to /dev/scd0. These are normally created by udev which is the device manager program used in the Linux 2.6 kernel series. We will not cover creating your own symlinks here (may be added later).

Other examples of symlinks include /dev/floppy to /dev/fd0 or /dev/dvd to /dev/scd1 .

You can view the linked device on a symlink with the ls command, like so:

ls -l /dev/cdrom

produces an output similar to:

lrwxrwxrwx 1 root root 4 2008-06-22 17:31 /dev/cdrom -> scd0

This tell us that /dev/cdrom is a symlink to the device /dev/scd0 .

To view the physical device identifiers (like for a hard drive, not to be confused with a disk's partitions), the command:

Note that each partition (called part#) identifies with their parent device - this is because they exist on that physical piece of hardware. You will also notice that the drives and partitions appear twice, the first time as ata and the second time as scsi. I am unclear as to why this is, but I believe it is related to IDE hard drives being identified to the system as SCSI drives (because of ide-scsi emulation?).