initramfs, kernel and combined EFI image needed to boot a system.
This script is considered beta, ensure you have backups of the files in
your ESP before using it.
Remove old void packages
If zpool is set to a non-existent pool on the kernel command line, we
incorrectly handle setting a kernel mask in select_kernel.
This also simplifies setting BOOTFS, so we should now always have it
correctly set, or empty.
Add the 'ip' tool, so you can set an IP and zfs send/recv in the
bootloader.
Import any pools readonly, to help protect against data loss.
No longer export the pool on reboot - since we're mounted readonly we
can get away with skipping this step.
Set the fast reboot flag for kexec, so we don't do any memory integrity
checks.
- Move all functions to a file sourced in zfsbootmenu.sh.
- Document the arguments, return code and output of each function.
- Exercise DRY, now that the overal structure is more stable - new
functions were created to condense duplicated logic, existing functions
were modified to do a bit more work.
- Snapshot browsing now clones the snapshot, and brings you back to the
BE selection menu, so you can boot the snapshot or select a specific
kernel.
- Automatic booting and booting via the boot menu now prefer a kernel
version if org.zfsbootmenu:kernel is set on the filesystem. This
behavior will result in fewer surprises when booting.
The ZFS filesystem option 'org.zfsbootmenu:kernel' can now be set on a
boot environment. If set, this pattern is used to match a kernel file
name in /boot .
zfs set org.zfsbootmenu:kernel=5.3.10 zroot/ROOT/void.2019.11.15
If zroot/ROOT/void.2019.11.15 is your automatic boot environment (bootfs
on the pool), the first-found kernel in /boot that matches '5.3.10' will
be booted. In this example, 'vmlinuz-5.3.10_1' will match and be
booted.
This match only applies in the automatic boot menu. If you escape to the
environment/kernel/snapshot selection menus, the most recent kernel (or
one you specifically pick in a menu) will be used.
- Properly sort the list of kernels by version, so that 5.x.10 is
considered a higher version than 5.x.9
- Correctly set a return value for all zfs load-key operations
- Greatly simplify when a BE is mounted when trying to find kernels in
/boot
- Only add a BE to the environment list of one or more kernel/initramfs
pairs were found
If the keylocation is set to file://<file>, test if the file is present
in the initramfs. If present, load that key. If the file isn't present
and the keyformat is set to passphrase, use the standard prompt.
- Add a force_import kernel command line option, default to not force
importing
- Fix noting that we found a valid root= value
- wipe the screen before kexec
- remove static pool definition leftover from testing