Skip to content

ZFS improvements #400

Description

@bsdice

Yo... attached is a patch with experimental improvements. Filet from it as you see fit. I spent quite a few days debugging and developing.

Improvements:

  • Option force_zfs: Import ZFS root pool by force without zpool.cache. Also if zpool.cache does not exist, like in a fresh VM, this flag is forced on.
  • Option break_shell: Just before switching root, break to a shell for debugging.
  • Add NVDIMM drivers so initramfs can boot ZFS from PMEM100 and later Optane NVDIMMs in App Direct mode. /dev/disk/by-id etc. will be populated correctly. I left out by-uuid because parsing ZFS from disk is a pain and also by-uuid shouldn't be used for pool import anyway.
  • Added virtio_net driver
  • Added zdb binary for debugging issues with ZFS boot
  • Hiked zstd compression to best
  • When no zfs= parameter is given (user selected enableZfs but root device is ext4 etc.), init now falls through to try root= instead of giving up.
  • Right before timeout when trying to import a ZFS pool, init will try zpool without zpool.cache defaults and in forceZfs case which should have succeeded with devices in /dev as last resort.
  • enableZfs will honor mount_timeout

I worked on the PKGBUILD as well:

  • This is for development. You need a checked out booster tree in directory of PKGBUILD and a booster.yaml file as preset.
  • Packages are split into normal and "nohooks" version, so I can install the package for testing, without it stomping over present initramfs images e.g. by mkinitcpio.
  • Since I use ZFSBootMenu, its detection of kernel and initramfs images will not encompass files called "booster-", which is the default. Instead, booster hook scripts are now adding microcode for Intel/AMD if present in front of the initramfs, and also move them into place automatically where ZBM will find them. ZBM does not support microcode loading so this was hit two birds with one stone.

License: Public Domain

1.patch
PKGBUILD.txt

Example yaml file:

extra_files: busybox,lsblk,fsck,fsck.vfat,fsck.msdos,fsck.ext4,fsck.btrfs,fsck.xfs,xfs_repair
enable_mdraid: true
mount_timeout: 30s
enable_zfs: true
universal: true

# enable_plymouth: false
# modules: qxl,ast,i915
# break_shell: true
# force_zfs: true
# vconsole: true
# network:
#   dhcp: on

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions