577ef3959d | ||
---|---|---|
.. | ||
helpers | ||
initcpio | ||
stubs | ||
validation | ||
.gitignore | ||
Makefile | ||
README.md | ||
TPSReport.md | ||
rollup.pl | ||
run.sh | ||
setup.sh |
README.md
Requirements
The testing environment setup and runtime depends on the following tools:
- kpartx
- qemu
- yq-go
- ZFS
- kvm kernel module
Arch
- m4
- pacman
- gpg
Ubuntu, Debian
- debootstrap
Creating a ZFSBootMenu Test Pool for QEMU
First, run ./setup.sh -a
; this will create, if necessary, a test directory
(chosen automatically or specified with the -D
command-line flag) and, within
the test directory:
- Create a test pool
- Create a 5GB RAW image file,
- Attach it to a loopback device,
- Create a GPT label and a ZFS pool
ztest
, - Install Void base-minimal onto the pool,
- Configure the installation, and
- Set the
bootfs
property ofztest
.
- Create a local generate-zbm configuration file (
local.yaml
) - Create a local dracut.conf.d configuration directory (
dracut.conf.d
) with a default configuration file - Create a local dracut modules directory (
modules.d
) with symlinks to all of the system modules, and a symlink to thedracut
directory in the current git checkout as the90zfsbootmenu
module.
These options can be individually executed if you need to reset any single portion of your testing environment.
The root password in the test installation will be set to zfsbootmenu
.
Booting the Test Pool
To boot the test environment, invoke ./run.sh
. This may be done as a regular
user, but make sure your user is a member of the kvm
group if you wish to
leverate KVM
.
The following defaults can be set to a local default in the .config
:
DRIVE="format=raw,file=zfsbootmenu-pool.img"
INITRD="initramfs-bootmenu.img"
MEMORY="2048M"
SMP="2"
DISPLAY="gtk"
APPEND="loglevel=7 timeout=5 root=zfsbootmenu:POOL=ztest"
The ZFSBootMenu kernel command line (specified in the APPEND
variable) can be
overridden per run by passing an optional -a
argument to ./run.sh
. The -n
argument can be used to skip image regeneration, allowing you to boot the
existing initramfs.