Protecting Data with Encrypted Linux Partitions Part 2
Using the UUID in /etc/fstab

Carla Schroder
Thursday, June 21, 2007 03:33:21 PM
While most Linux distributions have a default udev configuration that nails down the /dev names of internal drives, it doesn't hurt to make extra sure by using the UUID instead. So the /etc/fstab entry for our encrypted partition would look like this:
UUID=1c390791-bd8a-4655-b722-6d0bcbbdf547 /home/carla/crypted ext3 users,atime,noauto,rw,dev,exec,suid 0 0
Note that all of that should be on a single line with no carriage returns or line breaks.
Where do you find the UUID? With the vol_id command:
# vol_id -u /dev/sda2
1c390791-bd8a-4655-b722-6d0bcbbdf547
Next: Mounting Your Encrypted Partition At Boot On Debian »