Month: March 2014

Luks automount encrypted disk on linux

Sometimes it is useful to automatically mount a luks encrypted disk. In this post I’m going to describe to do this safely.

  • My workstation, a Lenovo Thinkpad W510 has a drive bay, where you either store a hdd or a optical drive. I usually have a hdd placed there but sometimes I need the optical drive. So I don’t want to put the disk into /etc/fstab or /etc/crypttab. But I also don’t want to mount it manually evry time.
  • On my homeserver I use a SATA hotswap disk to make backups. I have two of those hdd, swap them weekly and always keep one of them at my workplace. These backup disks are encrypted of course. When changing the disk I always have ssh onto the server, find the disk, decrypt it and mount it. Would be great if I just had to plug it in.
  • Same ideas also apply to external data or backup disks

This is a post from my old blog http://tech.cbjck.de. It has been moved here and slightly edited for better readability. It's also been adjusted to the new layout.
The content however is old and might be outdated.

Read More