[guardian-dev] Help answering LUKS question
Nathan of Guardian
nathan at guardianproject.info
Sun Jan 27 07:28:07 EST 2013
Anyone want to take at answering this question:
https://guardianproject.info/questions/remounting-after-a-reboot/
(please post reply on the q&a page itself)
***
I’m having trouble remounting an encrypted volume after rebooting my
Android device. I’m creating the encrypted volume with the following
commands for a 5MB encrypted folder residing in my sdcard:
mknod /dev/loop0 b 7 0
dd if=/dev/zero of=/mnt/sdcard/myfile bs=1000000 count=5
losetup /dev/loop0 /mnt/sdcard/myfile
echo “password” | cryptsetup -q luksFormat –key-file=- -c aes-plain
/dev/loop0
mke2fs -O uninit_bq,resize_inode,extent,dir_index -L luksdm
/dev/mapper/luksdm
mkdir /mnt/sdcard/encrypted_folder
mount -o rw -t ext3 /dev/mapper/luksdm /mnt/sdcard/encrypted_folder
cryptsetup status luksdm
I then unmount it with the following commands before rebooting the device:
umount /mnt/sdcard/encrypted_folder
cryptsetup luksClose /dev/mapper/luksdm
Upon reboot, I try to mount my encrypted folder again with the following
commands:
echo “password” | cryptsetup luksOpen –key-file=- /dev/loop0 luksdm
mount -o rw -t ext3 /dev/mapper/luksdm /mnt/sdcard/encrypted_folder
cryptsetup status luksdm
However, I am informed that /dev/loop0 doesn’t exist. It seems that the
loopback device doesn’t survive a reboot. I tried to mknod it again but
that didn’t work either – after running luksOpen,/dev/mapper/luksdm
isn’t created.
May I know what I’m doing wrong?
More information about the Guardian-dev
mailing list