| #!/bin/sh -e | |
| # | |
| # Make a btrfs layout Qubes installation use ephemeral swap. | |
| # Tested with R3.2 | |
| # | |
| # Rerun anti-evil-maid-install afterwards for your external AEM devices! | |
| dev=/dev/sda2 | |
| map=luks-`cryptsetup luksUUID "$dev"` | |
| lsblk -dnr -o MOUNTPOINT /dev/mapper/"$map" | grep -qxF '[SWAP]' # sanity check | |
| swapoff -a | |
| dmsetup remove --retry --force "$map" | |
| head -c 10M /dev/urandom >"$dev" | |
| bak=.luks-swap | |
| sed -e "s/rd.luks.uuid=$map //" -i$bak /etc/default/grub | |
| sed -e "s#$map#swap #" -i$bak /etc/fstab | |
| sed -e "/$map/s#.*#swap $dev /dev/urandom swap,cipher=aes-xts-plain64,size=512#" -i$bak /etc/crypttab | |
| dracut --force --regenerate-all | |
| grub2-mkconfig -o /boot/grub2/grub.cfg |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
jpouellet
commented
May 26, 2017
|
We do now have systemd > 218 (222 currently) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Thanks @jpouellet, updated - at last. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We do now have systemd > 218 (222 currently)