From 66c7b4316300992995f531dbc12d9f8ce4727323 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 9 Dec 2014 17:48:54 +0100 Subject: Initial encryption stuff --- liveusb/build.sh | 8 ++++++++ liveusb/encrypt/.keep | 0 2 files changed, 8 insertions(+) create mode 100644 liveusb/encrypt/.keep 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 -- cgit v1.3.1