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 | |
# Encrypt an existing partition with LUKS2 on Ubuntu 20.04 LTS | |
# DISCLAIMER: USE AT YOUR OWN RISK AND MAKE BACKUPS | |
# Made for my personal use and has almost NO error checking!! | |
# Based on instructions from: | |
# https://wiki.archlinux.org/index.php/dm-crypt/Device_encryption#Encrypt_an_existing_unencrypted_filesystem | |
DISK="$1" |