Last night I had an idea, fairly good one if I may say so. I have two desktop computers and one laptop, all running Linux. I have all my disks encrypted and my two desktop computers load their encryption key file from an usb device during boot. Now, this is not something I'd like to do on my laptop...
I then had my idea, what if I put my keyfile on my SE phone and fetch it wirelessly over bluetooth? After some scripting I got this script to work: (when system is already booted and bluetooth support is loaded into the kernel).
Now, obviously this does not work during boot... My guesses are, the right modules aren't loaded when this script is executed. What do I need to modprobe at the beginning of this script to get bluetooth support running???
# this script will mount your bluetooth phone and pass encryption key to cryptsetup
# author Tor Martin [tor at sygard dot net]
MAC=00:3E:48:48:05:EF # phone mac address.
CHANNEL=7 # phone obex file transfer channel
mkdir -p $MNTPOINT
echo "Trying to get key from bluetooth phone..." >&2
timeout 2 obexfs -b $MAC -B $CHANNEL $MNTPOINT >/dev/null 2>&1
if [ -f $FILE ]; then
fusermount -u $MNTPOINT 2>/dev/null
if [ $OPENED -eq 0 ]; then
echo "FAILED to find keyfile on phone" >&2
echo -n "Try to enter your password" >&2
read -s -r A
echo -n "$A"
echo "Successfully loaded keyfile from bluetooth phone" >&2