Created
October 13, 2019 21:34
-
-
Save Spijkervet/7ddf86bbceb97c8cf9ff18d2ca20233c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# On first boot: | |
# fdisk /dev/sdb # n, p, w | |
# reboot now | |
cryptsetup -vy luksFormat /dev/sdb3 | |
cryptsetup luksOpen /dev/sdb3 my_usb | |
mkfs.ext4 -L persistence /dev/mapper/my_usb | |
e2label /dev/mapper/my_usb persistence | |
mkdir -p /mnt/my_usb | |
mount /dev/mapper/my_usb /mnt/my_usb | |
echo “/ union” > /mnt/my_usb/persistence.conf | |
umount /dev/mapper/my_usb | |
cryptsetup luksClose /dev/mapper/my_usb | |
reboot now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment