PDA

View Full Version : mounting truecrypt encrypted partition uring boot


karlitos
2008-12-17, 14:49
Hello
I`m using xbmc from the live cd. I would like to acess my encrypted partitioin, which was crypted with truecrypt. I`m searching for some art of start-script , which would check, if a keyfile on USB drive is present, in antohre case would ask for password.
It should looks like this > ...

during the boot DO
IF (keyfile on /media/usb present)
THEN mount truecrypt volume on /.../...
ELSE
check for password
timeout 10sec
IF (password set correctly)
THEN mount truecrypt volume on /.../...
ELSE
do normal boot
END
I do not know how to make shell-scripts or something else. But i know the commands for the truecrypt.
Can anyone help me please ?

malloc
2008-12-18, 11:58
This seems like a general Linux or Truecrypt question. You might have better luck on the truecrypt or ubuntu forums.

karlitos
2008-12-18, 12:19
Yes , i posted the same question in one ubuntu forum. Searched the truecrypt forum , without efffor.
But in the XBMC comunity are many very skilled Linux users , so mabye someone find a solution.
If i found one , i will post it here.

althekiller
2008-12-18, 16:39
You could try to buy a new car at the grocery store because they employ many retired car salesmen by that logic.

karlitos
2008-12-18, 17:03
You could try to buy a new car at the grocery store because they employ many retired car salesmen by that logic.

Because of my bad english I didn`t really understand zour post. But I understand the meaning and the irony. HAHAHAHA

So - some other people helped me , so the code should looks like this :
#!/bin/bash

while :; do
if [ -f /path/to/keyfile ]; then
mount_truecript_volume_command && exit;
echo no keyfile for truecrypt found && exit;
else
echo gimme password or ctrl+c;
read -s -t 5 PASSWORD || exit;
mount_truecrip_volume_command && exit;

echo bad password;
fi
done