Installation guide

There should now be a device node, /dev/mapper/<name>, which represents the decrypted device.
This block device can be read from and written to like any other unencrypted block device.
To see some information about the mapped device, use the following command:
dmsetup info <name>
Tip
For more information, read the dmsetup(8) man page.
29.4 .5. Creat e filesyst ems on t he mapped device, or cont inue t o build
complex st orage st ruct ures using t he mapped device
Use the mapped device node (/dev/mapper/<name>) as any other block device. To create an ext2
filesystem on the mapped device, use the following command:
mke2fs /dev/mapper/<name>
To mount this filesystem on /mnt/test, use the following command:
Important
The directory /mnt/test must exist before executing this command.
mount /dev/mapper/<name> /mnt/test
29.4 .6. Add t he mapping informat ion t o /etc/crypttab
In order for the system to set up a mapping for the device, an entry must be present in the
/etc/crypttab file. If the file doesn't exist, create it and change the owner and group to root
(root:root) and change the mode to 0744. Add a line to the file with the following format:
<name> <device> none
The <device> field should be given in the form "UUID=<luks_uuid>" , where <luks_uuid> is the LUKS
uuid as given by the command cryptsetup luksUUID <device>. This ensures the correct device
will be identified and used even if the device node (eg: /dev/sda5) changes.
Tip
For details on the format of the /etc/crypttab file, read the crypttab(5) man page.
29.4 .7. Add an ent ry t o /etc/fstab
Chapt er 2 9 . Disk Encrypt ion G uide
277