Reply to comment

re: mapper device disappears?

The /dev/mapper/<device> will only appear after you have performed the cryptsetup luksOpen step. It should dissappear after you run cryptsetup luksClose. You should always run cryptsetup luksClose on ALL partitions/devices that you mounted manually before rebooting the system.

The only time you need to initialize the media is when it is brand new, once its installed skip the luksFormat step and go straight to the luksOpen.

As for luksClose, it DOES NOT DESTROY the data, it simply removes the device mapping from /dev/mapper. It is the same as performing a umount command on a non-encrypted partition. When you want to access the data again, first add the mapping with the cryptsetup luksOpen command, and then mount the mapped device.

I'm sorry that the documentation was confusing for you but I felt that having two sections: "Creating a New Encrypted Container File or Partition" and "Mounting an Existing Encrypted Container File or Partition" made a clear distinction between the two processes. What do you suggest for an improvment?

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".

More information about formatting options