============================= OpenBSD: Encrypted Partitions ============================= ----------------------- Preparing the Partition ----------------------- Open the selected hard drive with disklabel: disklabel -E sd0 Set the selected partition to type RAID. sd0> m f (m = modify, f = partition letter) sd0*> w (w = write) sd0> q (q = quit and save changes) ------------------------ Encrypting the Partition ------------------------ # bioctl -c C -l sd0f softraid0 where -c C = set raidlevel to CRYPTO and -l sd0f identifies the partion to be encrypted. You should then be prompted in the following manner: New passphrase: Re-type passphrase: softraid0: CRYPTO volume attached as sd1 This has created a new RAID device sd1. Open sd1 with disklabel and create a new partition on it. sd1> a (a = add new partition) Accept the defaults: partition to add: [a] offset: [0] size: [300863408] FS type: [4.2BSD] Then write your changes and exit disklabel. sd1*> w sd1> q Create a new filesystem on the newly created partition: # newfs sd1a You can now mount the encrypted partition wherever you like. # mount -o noatime /dev/sd1a /stor If you wish to detach the new RAID device from the system, unmount the encrypted partition: # umount /stor and then use bioctl to detach the device: # bioctl -d sd1 ------------------------------------------- Re-mounting the Encrypted File System Later ------------------------------------------- Re-attach the RAID device to your system: # bioctl -c C -l sd0f softraid0 Use the same password you used before. Then mount the encrypted partition: # mount -o noatime /dev/sd1a /stor