[TriLUG] Encryption on linux

Alan Porter porter at trilug.org
Thu Apr 24 16:00:25 EDT 2008


> I don't remember the exact command to configure the
> drive, but dm-crypt has pretty good man pages

Short answer:

--------------------------------------------------------------------------------
USING CRYPTSETUP
--------------------------------------------------------------------------------

FORMAT
  sudo cryptsetup luksFormat /dev/sdx1
  sudo cryptsetup luksOpen /dev/sdx1 mylabel
  sudo mkfs.vfat /dev/mapper/mylabel
  sudo cryptsetup luksClose mylabel
  * or *
  sudo luksformat -t ext2 /dev/sdx1

MOUNT
  sudo cryptsetup luksOpen /dev/sdx1 mylabel
  sudo mount -t ext2 /dev/mapper/mylabel /mnt/mylabel
  * or *
  pmount /dev/sdx1 mylabel

UNMOUNT
  sudo umount /mnt/mylabel/
  sudo cryptsetup luksClose mylabel
  * or *
  pumount mylabel

CHANGE PASSWORD
  sudo cryptsetup luksAddKey /dev/sdx1
  sudo cryptsetup luksDelKey /dev/sdx1 (slotnum)

SHOW LUKS INFO ABOUT PARTITION
  sudo cryptsetup luksDump /dev/sdx1
  sudo cryptsetup luksUUID /dev/sdx1
  sudo cryptsetup isLuks /dev/sdx1 ; echo $?

--------------------------------------------------------------------------------
TROUBLESHOOTING USING DMSETUP
--------------------------------------------------------------------------------

TROUBLESHOOTING
  $ sudo dmsetup ls
  Password:
  _dev_sdx1       (254, 0)
  $ sudo dmsetup remove _dev_sdx1

--------------------------------------------------------------------------------


Alan






.



More information about the TriLUG mailing list