In place unecryption with dd

My home fileserver is running on a low-power VIA board. When I first started up the system many years ago, I installed Gentoo to make sure it was easy to get the on-board hardware encryption up on running. Only, as is turned out, my board didn’t have one of those, so all these years the little box has been crawling because everything on the encrypted drives needed to go through dm-crypt on that little 600 MHz processor.

But no longer. I decided to opt for speed and drop the encryption – and Gentoo while I was at it. First to go is the encryption, so after multiple backups I have fired up dd:

>jaw@jarnen / $ sudo /etc/init.d/laptop_mode stop
>jaw@jarnen / $ sudo dumpe2fs -h /dev/mapper/crypt_hdd1
...
Block size:               4096
>jaw@jarnen / $ mount
...
/dev/mapper/crypt_hdd1 on /snapshot type ext3 (rw)
>jaw@jarnen / $ sudo umount /snapshot/
>jaw@jarnen / $ sudo dd if=/dev/mapper/crypt_hdd1 of=/dev/hdd1 bs=4k
48839600+1 records in
48839600+1 records out
200047002624 bytes (200 GB) copied, 67117.5 s, 3.0 MB/s
>jaw@jarnen / $ sudo fsck /dev/hdd1
/dev/hdd1: clean, 342819/24428544 files, 13071396/48839600 blocks

Aaah. dd is 1337 chest-thumping (is that an oxymoron?) at its best.

By the way, Gentoo is giving way to the brand new Intrepid Ibex Ubuntu release. Not alone in that respect I noticed the other day on /..

comments powered by Disqus