www.hutsky.cz / blog / twitter /

Posts Tagged ‘debian’

Encrypt partition with dm-crypt

Wednesday, November 30th, 2011

Ever wnated to have your external disk or USB stick encrypted? This is a way to get there on a Debian-based system using dm-crypt and LUKS.

First, make sure dm-crypt module is loaded (see if /dev/mapper/ is present), and if not, load the module:

modprobe dm-crypt

Now you can use cryptsetup to encrypt your device (you’ll be asked for a password):

cryptsetup --verbose --key-size 256 --verify-passphrase luksFormat /dev/sdd1

After this step, you can open the encrypted disk.

cryptsetup luksOpen /dev/sbd1 mydisk

The disk is not ready yet, we need to format it first, just as if we connected an empty device. In theis example, I’ll format it using ext3 file system.

mkfs.ext3 -j -m 1 -O dir_index,filetype /dev/mapper/mydisk

Now you can finally mount and access your disk.

mount -t ext3 /dev/mapper/mydisk /media/mydisk

When you’re done and want to unplug the device, you unmount it the usual way:

umount /dev/mapper/encr-zipdisk

and then use LUKS to close the encrypted connection:

 cryptsetup luksClose encr-zipdisk

Now you can remove the device.

Debian 6 is out – testing in Virtualbox

Tuesday, March 15th, 2011

It’s been a while since Debian 6 got released. Now I found some spare time to check it out. Before I get to installing it on my home server, I decided to have a peek using Virtualbox. At first I encountered a problem while while loading the system after the installation. The startup process would stop, saying:

BUG: soft lockup - CPU#0 stuck for 61s! [modprobe :90]

Luckily, I wasn’t the only one to come across this issue so after lowering the amount of memory allocated to the virtual machine, the system managed to start smoothly.

(more…)

Ubuntu / Debian remote desktop problem

Thursday, January 21st, 2010

Sometimes, it happens that when I want to connect to one of my Debian machines over the vncviewer tool, I just can’t type in the password to unlock the screen. (more…)