Hi,
I have a desktop running FreeBSD 9.1 Release and I am trying to setup an encrypted partition using geli. Currently I boot up the system and I have the geli key on a usb thumbdrive. Everything works great if i mount the usb thumbdrive, init geli and mount the encrypted partition manually once the system is up and running.
My problem is I can't seem to automate this process on boot.
I recognize I am trying to automate the following on boot:
Mount the usb drive > have geli decrypt partition using key on usb drive > THEN mount .eli
Do I have a chicken/egg problem? It seems the thumbdrive can't be mounted until AFTER geli is triggered. If I do have a chicken/egg problem is my only solution writing a script that runs on boot or is there some awesome geli commands i can add to /boot/loader.conf to make this work?
I will say as a side note I have looked and tried several of the options for geli in loader with the geli_dev_keyfile0_load options to no joy.
Any input is appreciated, I've been at this for quite a while.
I have a desktop running FreeBSD 9.1 Release and I am trying to setup an encrypted partition using geli. Currently I boot up the system and I have the geli key on a usb thumbdrive. Everything works great if i mount the usb thumbdrive, init geli and mount the encrypted partition manually once the system is up and running.
Code:
#uname -rp
9.1-RELEASE amd64
# mount /dev/da0p1 /mnt/pend/
# geli attach -k /mnt/pend/keyz.key /dev/zvol/zmain/encrypt
Enter passphrase:
# mount /dev/zvol/zmain/encrypt.eli /data/mynoms
# ls -al /data/mynoms/
total 10
drwxr-xr-x 3 root wheel 512 Jan 6 05:10 .
drwxr-xr-x 3 root wheel 3 Jan 1 03:24 ..
drwxrwxr-x 2 root operator 512 Jan 6 05:10 .snap
My problem is I can't seem to automate this process on boot.
I recognize I am trying to automate the following on boot:
Mount the usb drive > have geli decrypt partition using key on usb drive > THEN mount .eli
Do I have a chicken/egg problem? It seems the thumbdrive can't be mounted until AFTER geli is triggered. If I do have a chicken/egg problem is my only solution writing a script that runs on boot or is there some awesome geli commands i can add to /boot/loader.conf to make this work?
I will say as a side note I have looked and tried several of the options for geli in loader with the geli_dev_keyfile0_load options to no joy.
Any input is appreciated, I've been at this for quite a while.