Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DavidPesticcio/7186626313e398224c514fc1d5b08897 to your computer and use it in GitHub Desktop.
Save DavidPesticcio/7186626313e398224c514fc1d5b08897 to your computer and use it in GitHub Desktop.
Encrypted ZFS root install on Linux Mint 20.x & Ubuntu 20.04
### Steps for an encrypted ZFS root installation on Linux Mint 20.x & Ubuntu 20.04
01. Boot from an Ubuntu based installer/Live CD - Linux Mint 20.x or Ubuntu Desktop 20.04
02. Open a terminal
03. Run: `sudo apt -y install zfs-zed` - **!IMPORTANT!** - Ensure the ZFS pre-requisites installed!
04. Run: `sudo vi /usr/share/ubiquity/zsys-setup`
- find the right section with `/^init_zfs`
- prepend the `zpool create` for `rpool` with `echo MYPASSWORD | ` - `MYPASSWORD` **MUST** be 8 characters or more!
eg. `echo MYPASSWORD | zpool create -f \` - **DO NOT FORGET THIS!**
05. Above the last line of the `zpool create` command, insert these lines:
-O encryption=on \ # defaults to aes-256-gcm
-O keyformat=passphrase \ # use a passphrase/password
-O keylocation=prompt \ # when importing the pool, prompt for the passphrase/password
06. Save the file with `ZZ` or `:wq!` if the file happens to be `read-only`
07. Now the fun begins - double-click on the installer icon, or run `ubiquity` from the terminal
08. Select the usual languag/keyboard/codecs etc...
09. When you reach the **Instalation Type** stage, click the **Advanced Features** button
10. Now select **EXPERIMENTAL: Erase disk and use ZFS** - This option only shows up when ZFS pre-requisites are installed.
11. Select **Install Now** to proceed
12. Select your timezone and continue
13. Add a user and password - **!!!WARNING!!!** Proceeding to the next step **will** erase the WHOLE of the destination disk!
14. Go and have a coffee/tea or beer while the magic happens...
12. Reboot and Enjoy... :-)
Source: https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment