Installing Gentoo Linux on ZFS with NVME Drive (Part 2)

Ready for More?

If you missed it my last post was looking at how to get Gentoo Linux installed on a ZFS filesystem with NVME disks.  Due to the size of this tutorial I’ve split it into two parts and if you’re here you should definitely have read the first part of this tutorial for any of the rest of this to make sense.

Last time we got our disks setup, installed the core Gentoo system, chrooted into a kernel-free Gentoo system and built a bespoke kernel.  Today we’re going to install our kernel, setup Grub, finish configuring our system and boot it for the first time straight from ZFS.

Back to the Kernel

Last time we’d build the kernel but not done anything else with it.  It’s time to copy it to your /boot folder and to install the modules to your system.

make modules_install
make install

Your kernel has now been copied to /boot ready for us to use later on.

We’re now ready to get everything setup for Grub.  We first need to edit the Portage configuration and tell it that we’re using EFI-64 Grub.

nano -w /etc/portage/make.conf

Add the line.


Next we want to edit the list of which packages we accept.

nano -w /etc/portage/package.accept_keywords

We add in four packages that are defined as “in testing” rather than stable.  Normally testing packages would be filtered but we want the latest-and-greatest of these to enable ZFS support.  The “~” is the “in-testing” indicator and this file expressly includes packages normally ignored.

sys-kernel/spl ~amd64
sys-fs/zfs ~amd64
sys-fs/zfs-kmod ~amd64
sys-boot/grub ~amd64

We can then edit the default configuration for how we will build Grub:

nano -w /etc/portage/package.use/grub

And we add a line saying that we want to compile it against libzfs.

sys-boot/grub libzfs

Once we’ve got those settings done we can pull down the tools to create a ZFS initramfs and Grub itself.  Grub will also pull down the ZFS kernel modules and other utilities.

emerge bliss-initramfs grub

Depending on how old your Stage 3 tarball is you may also want to update all packages already installed:

emerge -uDNav @world

Next we’re ready to install Grub.  First run some grub-probe commands to ensure that “ZFS” is returned.  If it is not something is wrong – do not carry on.

mkdir /build-initramfs
cd /build-initramfs
grub-probe /boot
grub-probe /boot/efi

Now we’re ready to install Grub.  We also remount the EFIVars partition here as rw.  If you get any warnings about EFIVars (or anything else for that matter) then something is wrong – do not carry on.

mount -o remount,rw /sys/firmware/efi/efivars/
grub-install --efi-directory=/boot/efi /dev/nvme0n1

We can then open up our Grub configuration file.

nano -w /boot/grub/grub.cfg

This will be empty so we can supply a default set of values.  Make sure to change the kernel version number here from 4.9.16-gentoo-FC.01 to whatever version you have.  You can confirm this by looking in /lib/modules.

 set timeout=1
 set default=0
 insmod part_gpt
 insmod fat
 insmod efi_gop
 insmod efi_uga
 menuentry "Gentoo" {
   linux /@/kernels/4.9.16-gentoo-FC.01/vmlinuz root=rpool/ROOT/gentoo by=id elevator=noop quiet logo.nologo
   initrd /@/kernels/4.9.16-gentoo-FC.01/initrd

We’re now ready to create an initial ramfs for ZFS that we’ll modify to support nvme.  Run the blizz-initramfs tool.


When prompted select option “1“ for ZFS, “n” as you don’t want to use the suggested kernel and then enter your kernel version (for example 4.9.16-gentoo-FC.01).

We can now create the path for our kernel and initramfs to be stored in, copy the initramfs and then move the kernel and its related files to this folder:

mkdir -p /boot/kernels/4.9.16-gentoo-FC.01
mv initrd-4.9.16-gentoo-FC.01 /boot/kernels/4.9.16-gentoo-FC.01/initrd
cd /boot
mv config-4.9.16-gentoo-FC.01 kernels/4.9.16-gentoo-FC.01/config
mv vmlinuz-4.9.16-gentoo-FC.01 kernels/4.9.16-gentoo-FC.01/vmlinuz
mv kernels/4.9.16-gentoo-FC.01/

We now need to modify the initramfs.  This is where it can get a little tricky.  We start by going back to our home directory and then open up a new file called

cd /root
nano -w

The contents of this file, as shown below, take a copy of the initrd we just created and extract it to a folder called “ird” in root’s home directory.  This allows us to edit it.

mkdir /root/ird 2>/dev/null
rm -Rf /root/ird/*
cd /root/ird
zcat /boot/kernels/4.9.16-gentoo-FC.01/initrd |cpio -idmv

We then open

nano -w

And use the following contents to re-create our initrd and copy it back to /boot.

cd /root/ird
find . -print0 |cpio --null -ov --format=newc |gzip -9 >  /boot/kernels/4.9.16-gentoo-FC.01/initrd

Finally we set both of these to be executable and then extract the initrd

bash ./

You will now be in /root/ird and can edit the initial ramdisk.  We need to turn off the default ZFS-mounting behaviour and expressly mount our zpools.  Open up the init file.

nano -w init

Then go to the very end of the file (CTRL+W, CTRL+V in nano) and change these three lines:


To these two lines:

zpool import rpool -R /mnt/root
zpool import boot -R /mnt/root

If you have additional ZFS pools you have created now, or in the future, you may as well add them in here too.

Once you’ve saved your init file update the initrd.

bash /root/

Now you have a custom initramfs that should mount your ZFS pools even on your nvme disk.

Before we reboot we want to enable some ZFS services and disable hardware clock (since we’re using local time).

rc-update add zfs-mount boot
rc-update add zfs-share default
rc-update add zfs-zed default
rc-update delete hwclock boot

Then we can set a password for root.


We finish off some of our locale settings – first by looking at the locale list, seeing which number matches our requirements and then passing this into locale set before updating our environment settings.  We can then confirm this was a success by checking the locale.

eselect locale list
eselect locale set 3
env-update && source /etc/profile

It’s then time to edit your system keymap.

nano -w /etc/conf.d/keymaps

In my case I just wanted to change the first conf setting


Due to the changes I’ve made to my initramfs and potential issues I saw arrise in other testing I have disabled parallel start-up on my system and enabled interactive boot mode so that I can stop certain services from starting.  I’d recommend you do the same by editing your OpenRC config.

nano -w /etc/rc.conf

Then ensuring these two lines have the following settings and are not commented out:


If you’re using an ATI card you’re going to need your GPU firmware which can be easily installed:

emerge sys-kernel/linux-firmware

We’re then ready to specify which network card we want to use in Gentoo.  You can confirm this again by checking what is already in use:

ip addr

In my case this is enp6s0.  For now I just want to tell the system to enable it and use DHCP at start-up which is as simple as including the network card in the startup scripts.

cd /etc/init.d
ln -s net.lo net.enp6s0
rc-update add net.enp6s0 default

There are then a couple of settings to make to specify my domain name.  I can edit the network configuration file.

nano -w /etc/conf.d/net

And specify my local domain name.


I can then also edit my hosts file.

nano -w /etc/hosts

Here I want to put my computer name (GuyPc) at the end of the and ::1 lines.    localhost GuyPc
::1          localhost GuyPc

The very last step is to modify the clock configuration.

nano -w /etc/conf.d/hwclock

Here I want to reaffirm I am using local time.


At this point it is time to exit the chroot and reboot after we delete our temporary initramfs folder.

rm -Rf /zpoolbuild-initramfs

If everything goes to plan you will very shortly be at your Gentoo login prompt where you can log back in as root.

Now it’s time to add a few system tools you’ll want – I have added sudo (so I do not have to login as root), htop (for tracking how everything is running), sysklogd with lograte (as the most simple syslog setup), cronie (for running scheduled tasks), mlocate (for helping me find missing files) and a couple of network utilities I will inevitably need at some future point.  I also enable SSH.  I haven’t run through the SSHD or Sudo configuration here as that’s up to your own preference.

emerge sudo htop gentoolkit app-admin/sysklogd  app-admin/logrotate sys-process/cronie sys-apps/mlocate net-ftp/ftp net-misc/telnet-bsd
rc-update add sysklogd default
rc-update add cronie default
crontab /etc/crontab
rc-update add sshd default

I then create myself a local user with access to sudo and some physical devices and set myself as password.

useradd -m -G users,wheel,audio,cdrom,cdrw,usb,video -s /bin/bash guytp
passwd guytp

The very final step is to snapshot all of this so that I have a known state I can return to at a future date.

zfs snapshot rpool/ROOT/gentoo@2017-04-11-0000-01-INSTALL
zfs snapshot rpool/HOME@2017-04-11-0000-01-INSTALL
zfs snapshot boot@2014-04-11-0000-01-INSTALL

We’re Done!

Quite the install.  It’s certainly not just an Ubuntu next, next, next, done but it is a lot more interesting.  You’ll have learned a lot about how your system is setup, have already discovered where most of the system configuration is and even hand-crafted some start-up scripts to run before your filesystem is even mounted.  That’s a lot more fun than a day in the land of many Linux users.

I had a tonne of problems before I wrote this guide – ranging from not booting into EFI mode to start with and then trying to recover it (oops) to issues with NVME that we’ve addressed here and my network card failing to work within Gentoo (a firmware update was required from Intel).

I’m now on a fully working Linux system (and I’m writing this up in Abiword) but these first steps with ZFS were fundamental to my understanding of the Gentoo package management and ethos and I thoroughly enjoyed two days of frustration to get here.  I’m going to have a separate video documenting my tribulations getting X working and will probably do one in the future when I move over to Wayland as well.

For now I hope this was helpful and let me know how it went for you.


23 thoughts on “Installing Gentoo Linux on ZFS with NVME Drive (Part 2)

  1. Hi Guy, Robot,

    Hope you are well!

    So finally my questions are:

    1. Should I use gpt or mbr? – I will not be dual-booting
    2. I like the zfs backup/rescue options, can I install zfs on mbr and on an old hdd?
    3. Is it worth it since I will never run servers or raid connections?… (he says now)
    4. Can I use gpt on a bios machine? (The Dell Latitude I mentioned)

    What I know – (hope I am right)

    GPT – for UEFI (used from now on), parted-mklabel gpt

    MBR – for bios, legacy bios (old grub bootloader anyway, becoming obsolete …true?), fdisk-mklabel dos

    All this scratching is making me itch … please help!!

    Apologies for my ignorance, newbieness and being a pain.

    Have a lovely day!


    PS: Is it too much to ask for a run down of a Gentoo ZFS pro-audio low-latency install with both bios and uefi. I would just like to learn more as it’s been a while since I dabbed into my past IT knowledge and it’s a kind of project I would like to delve into. It’s the time constraints that kill me and Summer time is the only rest-bite I get to really fully submerge myself. Yeah I know it probably is, sorry!


    1. So if we think of a solid state or hard drive as a book then GPT and MBR are just like the contents page of your HDD or SSD. They announce the “chapters” that the book contains. In this case the chapters are partitions – logical divisions of your book (or disk in this case). Both GPT and MBR serve the same purpose but GPT is newer and can address bigger “books” (MBR is a maximum of 2TB disk space).

      BIOS is a way to start up a computer and act as a very basic interface between hardware and software. For most of the last 30 years it’s existed solely to be skipped but used to be more in-the-way back in the heady 1980s. It knows nothing about modern hardware and basically just gives direct access to things the operating system may want. UEFI is a much more modern solution to do the same thing and can include much more “higher level” knowledge of hardware (i.e. what is a network card) before control is handed over the an operating system.

      UEFI and BIOS can both boot GPT/MBR but can also not do this depending on the operating system and many other variables. Rule of thumb – Windows needs UEFI for GPT, Linux is a happy chappy.

      I first used GPT/UEFI in 2006 on a MacBook Pro (which I also ran Windows on). So these are not new technologies. I most recently setup a new system with BIOS/MBR two weeks ago – so they’re far from extinct.

      There are a couple of rules – if you have a disk with more than 2TB in size you have to go GPT otherwise you’ll only get access to 2TB of disk space. If you’re booting Windows with GPT then you’ll almost certainly need UEFI. Beyond that it’s up to you. There are far more tutorials from years-gone-by based in BIOS/MBR so there’s nothing to stop you using that if you don’t need more than 2TB on your disk. Additionally if your boot disk is under 2TB you can still use BIOS/MBR on that and GPT for secondary disks with no issue.

      If you can a MBR/BIOS setup is probably more simple and with more examples online but if you can go with UEFI/GPT as it is “the latest” and there’s really no reason (other than less examples and some lacking support still) to use UEFI/GPT. That being said I’ve had some operating systems refuse to boot on certain motherboards with one or the other despite the fact they should – so it can be a trying and fiddle around issue.

      Regarding other questions on fdisk/mklabel/etc. – let’s look at the book analogy a little more. In this book each “chapter” contains something specific and could even be in a different language. A chapter in a book in this context is a partition in a disk. So if we have a disk split up in to three chunks these are three partitions. Each partition has a file system which defines how it is structured. A common filesystem (very dated now) is FAT (file allocation table). FAT in effect has it’s own index at the start of the chapter which says where every file in that chapter is and what it’s name is – so it might say “myfile.txt” starts on page 5 line 3 then continues on to page 7 line 8. FAT is univerally supported and woefully limited in functionality so tends to only get used for things that need to be cross-platform (Windows, Mac, Linux), don’t use much disk space and don’t need security (SD cards, memory stikcs, etc.). Windows uses NTFS and Linux traditionally uses Ext4 whilst MacOS uses HFS+. All of these perform the same function (storing files and providing some sort of index for where they physically are) but also can offer additional functionality – security permissions for specific user access to files, directory structures, allowing different machines to access the same file simultaneously without corrupting it, restoring old versions of the data, etc. A basic Linux MBR system will have a single ext4 partition and a swap partition. Using UEFI tends to require an extra small partition to store UEFI information and this must be formatted as fat32. To setup these partitions a utility like fdisk, cfdisk or parted is used (Computer Management -> Disks in Windows). To set a particular partition to use a particular filesystem you must format it (this creates a totally empty chapter in the book ready for whatever language/structure you specify) – so to format a partition as FAT32 would mean it is then useable as FAT32. When you format it any existing contents is deleted.

      So to answer your questions:

      1. I’d say use MBR unless you have a 2TB or more boot disk.

      2. Yes – the Arch Linux wiki has a good tutorial for getting it up and running using MBR with ZFS – I did this recently when I was testing out various install options for this machine

      3. ZFS is definitely worth is for many reasons other than redundancy, but does add complexity that you may wish to avoid at the moment. It’s certainly not a pre-requisite. If you get in to multiple disks and want performance later it’s an option. Booting off ZFS in Linux is not trivial.

      4. Yes for Linux but no if you want Windows on the same disk

      Regarding doing a specific low-latency audio tutorial unfortunately I just don’t know the knowledge to offer a good tutorial. I may be able to get something up and working but without knowing what “good” looks like I couldn’t comment if it was remotely usable for intended purposes.


  2. Hi Guy,

    Hope you are well. Thank you for your excellent feedback, it was very helpful. I will definitely fill you in on how it all pans out. Once again thank you so much!!!



  3. Hey Guy – thank you for the guide, it was the best one out there! I had a few notes as I went through the two blog posts (each item marked with —)

    — Out of order – mkpart creates swap as partition 4, and root as partition 5, however parted labels show swap as 5 and rpool as 4
    — Out of order – boot gets mounted in /mnt/gentoo, buit zfs create commands expect empty directory

    zpool create -f -o ashift=12 -o cachefile=none -O compression=lz4 -m none -R /mnt/gentoo rpool /dev/nvme0n1p5
    zpool create -f -d -o ashift=12 -o cachefile=none -m /boot -R /mnt/gentoo boot /dev/nvme0n1p3
    zfs create rpool/ROOT
    zfs create -o mountpoint=/ rpool/ROOT/gentoo
    zfs create -o mountpoint=/home rpool/HOME
    zfs create -o mountpoint=/root rpool/HOME/root

    — Missing cp /etc/zfs/zpool.cache etc/zfs/
    — Out of Order: fstab should be drive 4, not 5, for swap mount

    — repos.conf should be a directory
    mkdir /mnt/gentoo/etc/portage/repos.conf
    cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf

    — bliss config should be bliss.conf under /mnt/gentoo/etc/portage/repos.conf

    — ‘move’ is not a command, switch to ‘mv’


    1. Thank you so much for this reply and I owe a big apology for not responding sooner – this came in about 6 hours before I launched the ICO for a new business I’m starting and things have been a little hectic.

      Most of the changes I’ve implemented as is but a couple I haven’t, and I wanted to say why:

      “Out of order – boot gets mounted in /mnt/gentoo, buit zfs create commands expect empty directory”
      -> On the boot CD I used initially /mnt/gentoo is there and this works without any additional commands, not sure if the boot CD has changed or if I have misunderstood

      “Missing cp /etc/zfs/zpool.cache etc/zfs/”
      -> The custom boot image I’m using to mount zpools doesn’t use the ZFS cache. It should but there are a couple of other changes to do for that so copying it is a pointless activity here as the zpools get created with cache disabled to get around some weird issues I was seeing when they were on.

      “repos.conf should be a directory”
      “bliss config should be bliss.conf under /mnt/gentoo/etc/portage/repos.conf”
      -> There was a .config file in the tarball at my time of use. I know that historically wasn’t the case so if it has changed since then I agree this should go in there.

      For the first one if you can provide me some clarity, for the other two points I’m going to leave them as-is but also leave this response as some of it will vary on the image versions you’re using. I will try and do a fresh reinstall at some point and get all this updated as there are also a number of steps to improve the ZFS setup having spoken to a few people, including the maintainer, so when I get a couple of days I’ll try to integrate all the changes. For now I’m very thankful for this comment to help others reading this!


  4. I wish to install gentoo on zfs on a lenovo x1 carbon laptop . with 480 ssd .
    can you advise me if it s a good idea


    1. Bit late for me to answer now but it depends what you want to do but it never hurts to try 🙂 Some laptops have weirdness with things like track pads in Linux but if it works in Linux it will work in Gentoo 🙂


  5. Hi Guy got a problem with bliss-initramfs

    Please enter the kernel name: 4.9.95-gentoo-FC.01

    [*] Checking preliminary binaries …
    [*] Creating temporary directory at /dev/disk/by-partlabel/bi-813069772 …
    [*] Checking required files …
    [+] Using ZFS
    [*] Copying binaries …
    Traceback (most recent call last):
    File “/sbin/bliss-initramfs”, line 67, in
    File “/sbin/bliss-initramfs”, line 51, in start
    File “/opt/bliss-initramfs/pkg/libs/”, line 509, in CopyBinaries
    File “/opt/bliss-initramfs/pkg/libs/”, line 555, in FilterAndInstall
    Tools.Copy(file, dontFail=optionalArgs.get(“dontFail”, False))
    File “/opt/bliss-initramfs/pkg/libs/”, line 169, in Copy
    shutil.copy(targetFile, path)
    File “/usr/lib64/python3.4/”, line 229, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
    File “/usr/lib64/python3.4/”, line 110, in copyfile
    copyfileobj(fsrc, fdst)
    File “/usr/lib64/python3.4/”, line 70, in copyfileobj
    OSError: [Errno 28] No space left on device

    Would you know whats going on there



  6. Same as brett Stevens
    sysresccd /dev/disk/by-partlabel # bliss-initramfs zfs 4.9.95-gentoo-FC.01
    Bliss Initramfs – v7.1.3
    Jonathan Vasquez

    [*] Copying library dependencies …
    Traceback (most recent call last):
    File “/usr/lib64/python3.5/”, line 122, in copyfile |
    copyfileobj(fsrc, fdst) |
    File “/usr/lib64/python3.5/”, line 82, in copyfileobj |
    OSError: [Errno 28] No space left on device |
    During handling of the above exception, another exception occurred: |
    Traceback (most recent call last): |
    File “/sbin/bliss-initramfs”, line 67, in |
    Main.start() |
    File “/sbin/bliss-initramfs”, line 59, in start |
    Core.CopyDependencies() |
    File “/opt/bliss-initramfs/pkg/libs/”, line 663, in CopyDependencies |
    Tools.Copy(library) |
    File “/opt/bliss-initramfs/pkg/libs/”, line 169, in Copy |
    shutil.copy(targetFile, path) |
    File “/usr/lib64/python3.5/”, line 241, in copy |
    copyfile(src, dst, follow_symlinks=follow_symlinks) |
    File “/usr/lib64/python3.5/”, line 122, in copyfile
    copyfileobj(fsrc, fdst)
    OSError: [Errno 28] No space left on device
    sysresccd /dev/disk/by-partlabel # df -h
    Filesystem Size Used Avail Use% Mounted on
    boot 879M 26M 854M 3% /boot
    rpool/HOME 830G 128K 830G 1% /home
    rpool/HOME/root 830G 128K 830G 1% /root
    /dev/nvme0n1p2 1022M 188K 1022M 1% /boot/efi
    udev 10M 10M 0 100% /dev
    shm 32G 0 32G 0% /dev/shm
    sysresccd /dev/disk/by-partlabel # ls
    bi-294158739 boot esp grub rpool swap

    root@sysresccd /mnt/gentoo % parted -a optimal /dev/nvme0n1 |
    GNU Parted 3.2 |
    Using /dev/nvme0n1
    Welcome to GNU Parted! Type ‘help’ to view a list of commands.
    (parted) print
    Model: Unknown (unknown)
    Disk /dev/nvme0n1: 1000GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    Disk Flags:

    Number Start End Size File system Name Flags
    1 1049kB 3146kB 2097kB grub bios_grub
    2 3146kB 1077MB 1074MB fat32 esp boot, esp
    3 2125MB 3199MB 1074MB boot
    4 3199MB 78.7GB 75.5GB linux-swap(v1) swap
    5 78.7GB 1000GB 922GB rpool

    bi-294*** takes up all the space on /dev. I had this working once using the /usr/src/linux directory to run the bliss-intramfs. I even got as far as modprob nvidia. Then tried to make a kernel change and screwed up. I had to start over. And I’ve tried a 100 times to get grub to run the kernel but each time I get as far as ‘gentoo’ and last time ‘kernels’ and it just hangs and won’t load. Tried increasing size of /boot double of your example and it still fills up with bi-***. 64G of mem Samsung 960 evo 1000g 16 core intel processor Asus Prime x-299 deluxe motherboard. Nvidia Geforce GTX 1080 Ti


  7. Up and running. CONFIG_EFI_FB=y I kept setting to n Confusing nvidia thing. Still used /usr/src/linux to do intramfs Now to get the 5 4TB drives added Thanks Guy-robot



    I’d have been utterly sunk without this guide – thank you so much for taking the time to put in the level of detail you have done. Like many folks I followed the fearedbliss guide at the Gentoo wiki and ended up in a recovery console at the final reboot 😀 I’ve modified that article to point folks with an NVMe SSD here ;o)

    I have a few tweaks/comments for you guide that I came across as I went through it:

    Creating ZFS Pools
    – First and most important, careful with differing support for ZFS Feature flags! Right now Gentoo’s testing packages for zfs are v0.7.12, whereas the available minimal installation liveCDs with ZFS are either a too-old SysRescCD (net-setup doesn’t support WPA2!) or else one with ZFS 0.8.0-rc2. I used the latter and ended up with an rpool pool that used feature flags that the built kernel didn’t support, hence once again rpool wouldn’t mount. The solution is to include the -d option when creating the rpool pool and then explicitly use -o feature@=enabled to add back in support for all features excepting project_quota and spacemap_v2.
    – it’s best to create the boot pool after creating the zfs filesystems in the rpool pool, else those filesystem creations work but complain their mountpoint is not empty

    Building initramfs
    The /dev/ hive is not large enough for this, resulting in a ‘no space left on device’ at some point in the process. Instead I recommend creating a temp folder under / and doing it all there instead.

    A few typos of variable importance
    – When moving the kernel and initramfs the guide says cd /etc/boot but it should be cd /boot
    – When modifying initramfs the guide mentions ‘go back to home’ but there’s no explicit ‘cd /root’. The guide’s style tends to include the dir change commands explicitly
    – Editing the init file – go to end of file is Ctrl-W Ctrl-V

    Again, thank you so much for this guide!!! I’ve dreamt of having ZFS as my main filesystem for years now, and finding your guide has made it possible for me \o/




    1. Thanks Ian. That’s great for others following this guide. Massively pushed for time at the moment so I’ve added in typo changes but not ZFS pool/initramfs. If you’ve got explicit commands (to save me going back and double checking) I’ll modify guide to pop them in – otherwise I’ll just put a node suggesting referring to this comment until I have time to run through it again.


  9. So for the initramfs fix, simply change your line:

    cd /dev/disk/by-partlabel


    cd /
    mkdir build-initramfs
    cd build-initramfs

    And I guess at some point when the initramfs has been moved into /boot this temp folder can be deleted.

    For the rpool create the replacement line is (deep breath):

    zpool create -f -d -o feature@async_destroy=enabled -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled -o feature@multi_vdev_crash_dump=enabled -o feature@spacemap_histogram=enabled -o feature@enabled_txg=enabled -o feature@hole_birth=enabled -o feature@extensible_dataset=enabled -o feature@embedded_data=enabled -o feature@bookmarks=enabled -o feature@filesystem_limits=enabled -o feature@large_blocks=enabled -o feature@sha512=enabled -o feature@skein=enabled -o feature@edonr=enabled -o feature@userobj_accounting=enabled -o ashift=12 -o cachefile=none -O compression=lz4 -m none -R /mnt/gentoo rpool /dev/nvme0n1p5

    The point here is to control exactly which features the pool supports, rather than risking adding support for flags that the finished install cannot handle, given that zfs doesn’t allow us to disable features once they’ve gone active.

    Finally, if you move the boot zpool create line to below the three zfs creates, an error message is avoided (that may or may not matter, but still and all good not to scare people ;o).

    Liked by 1 person

  10. Hello, I have an edit for your guide.

    grub-install will fail if you do not remount efivars for read/write permissions as done in the fearbliss tutorial.

    # mount -o remount,rw /sys/firmware/efi/efivars/


    1. Additionally, when I want to update my kernel in the future, about how much of this am I going to have to repeat?


      1. I can’t believe I didn’t thank you for this guide in my first comment. It’s perfect, well written, and really saved my ass. Thanks!

        Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s