Simple ZFS on ROOT Installation

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
Cucscspr
Level 1
Level 1
Posts: 23
Joined: Sun Jul 05, 2020 8:08 am

Simple ZFS on ROOT Installation

Post by Cucscspr »

If you want to install to ZFS root using Mint 20:
Before starting installation open a terminal and run this command:

Code: Select all

sudo aptitude -y install libzfs2linux zfs-initramfs zfsutils-linux zfs-zed
Then start installation, and when you get to the filesystem picker, choose advanced and select "Experimental ZFS".
Continue as you would normally.

Enjoy!

Image
Cucscspr
Level 1
Level 1
Posts: 23
Joined: Sun Jul 05, 2020 8:08 am

Re: Simple ZFS on ROOT Installation

Post by Cucscspr »

To add encryption:

Open a terminal and edit “/usr/share/ubiquity/zsys-setup”:
Search for “zpool create”, and make sure you have found the create command that has “rpool” on the last line.
Before the “zpool create” insert: echo MYPASSWORD |
Before the last line of the command insert these lines:

-O recordsize=1M \
-O encryption=aes-256-gcm \
-O keylocation=prompt \
-O keyformat=passphrase \

Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS.

Source: https://linsomniac.gitlab.io/post/2020- ... ypted-zfs/
mrdrthom
Level 1
Level 1
Posts: 4
Joined: Wed Jul 15, 2020 6:44 pm

Re: Simple ZFS on ROOT Installation

Post by mrdrthom »

Thank you for posting this. it was quite helpful. for me the next step was to implement mirroring.

my system has two identical NVMe drives (nvme0n1 & nvme1n1). the mint installer partitioned one of the drives (nvme0n1) and created two zpools (bpool and rpool) from the partitions.

mirroring is a two step process. first clone the partition structure from the installed drive to the blank drive
sudo sfdisk -d /dev/nvme0n1 > sfdisk.out
sudo sfdisk /dev/nvme1n1 < sfdisk.out

next add the new partitions to the existing zfs pools. you can see which partition is used for which pool with: zfs status.

now just attach the corresponding partition to the corresponding zpool. on my system this was:
sudo zpool attach bpool nvme0n1p6 nvme1n1p6
sudo zpool attach rpool nvme0n1p7 nvme1n1p7

and then check your work again with: zfs status.

so a question to the group: what about the boot partition? the mint installer created a boot partition on the first drive. anyone know how to mirror it so that the system will boot from the second drive if the first drive dies?
ytc1
Level 1
Level 1
Posts: 15
Joined: Mon Aug 22, 2022 12:22 pm

Re: Simple ZFS on ROOT Installation

Post by ytc1 »

Cucscspr wrote:
Sun Jul 05, 2020 2:37 pm
If you want to install to ZFS root using Mint 20:
Before starting installation open a terminal and run this command:

Code: Select all

sudo aptitude -y install libzfs2linux zfs-initramfs zfsutils-linux zfs-zed
Then start installation, and when you get to the filesystem picker, choose advanced and select "Experimental ZFS".
Continue as you would normally.

Enjoy!

Image
FYI, works Ok with LM21
Only difference is that instead of
---8<
sudo aptitude -y install libzfs2linux zfs-initramfs zfsutils-linux zfs-zed
---8<

Type
---8<
sudo aptitude -y install zfs-initramfs zfsutils-linux zfs-zed
---8<

As libzfs2linux is no longer available (or required), and ZFS is no longer "experimental"
Post Reply

Return to “Installation & Boot”