summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-12-09 17:48:54 +0100
committerYuval Adam <yuv.adm@gmail.com>2014-12-13 13:26:38 +0100
commit66c7b4316300992995f531dbc12d9f8ce4727323 (patch)
tree3be12a7f4956ce082e82244f274f5e97284f91f1
parenta836accc07c1c655272c02d02f26c872548ec7a8 (diff)
Initial encryption stuff
-rwxr-xr-xliveusb/build.sh8
-rw-r--r--liveusb/encrypt/.keep0
2 files changed, 8 insertions, 0 deletions
diff --git a/liveusb/build.sh b/liveusb/build.sh
index 289f21c..af7ca71 100755
--- a/liveusb/build.sh
+++ b/liveusb/build.sh
@@ -67,6 +67,14 @@ make_setup_mkinitcpio() {
mkarchiso -v -w "${work_dir}" -D "${install_dir}" -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' run
}
+# Prepare encrypted loop device
+make_encrypted_device() {
+ dd if=/dev/zero of=${work_dir}/airootfs/encrypted bs=1K count=$(du -d0 ${work_dir}/encrypt | grep -oe "[0-9]*")
+ local _loopdev=$(losetup -f)
+ losetup ${_loopdev} ${work_dir}/airootfs/encrypted
+ echo "passphrase" | cryptsetup luksFormat ${_loopdev} -
+}
+
# Customize installation (airootfs)
make_customize_airootfs() {
cp -af ${script_path}/airootfs ${work_dir}
diff --git a/liveusb/encrypt/.keep b/liveusb/encrypt/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/liveusb/encrypt/.keep