среда, 22 августа 2012 г.

How To Use UUID To Mount Partitions

A universally unique identifier (UUID) is an identifier standard used in software construction, standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). The intent of UUIDs is to enable distributed systems to uniquely identify information without significant central coordination. In this context the word unique should be taken to mean "practically unique" rather than "guaranteed unique". Since the identifiers have a finite size it is possible for two differing items to share the same identifier. The identifier size and generation process need to be selected so as to make this sufficiently improbable in practice. Anyone can create a UUID and use it to identify something with reasonable confidence that the same identifier will never be unintentionally created by anyone to identify something else. Information labeled with UUIDs can therefore be later combined into a single database without needing to resolve identifier (ID) conflicts.
To list UUIDs of all partitions type:
sudo blkid
You can add device UUID to /etc/fstab to mount it automatically:
sudo nano /etc/fstab
add new line with following syntax:
UUID={UUID} {/path/to/mount} {file system type} {options} {dump} {pass}
example:
UUID=ae1ec4a1-5d6b-4fc8-a8dc-f58e8af2328d /media/sda5 ext3 user,noexec 0 0