Commit Graph

89 Commits

Author SHA1 Message Date
Zach Dykstra 937cb59ab0 Start of rw re-import in clone 2019-12-23 11:06:43 -06:00
Zach Dykstra 0d3d6b0d3b Make path to output files, catch copy errors and warn 2019-12-20 09:30:04 -06:00
Zach Dykstra 946ba753a6 Rename unified file to platform kernel prefix 2019-12-19 23:15:03 -06:00
Zach Dykstra 8707518746 Create generate-zbm which can be used to manage the lifecycle of the
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
2019-12-19 18:53:01 -06:00
Zach Dykstra 1c993bf20c Finally actually really finally fix this, maybe 2019-12-10 19:38:25 -06:00
Zach Dykstra bf0be1a328 Add xbps template and latest built package 2019-12-10 16:49:51 -06:00
Zach Dykstra 5c2bfb7041 Default to host-only initramfs creation 2019-12-10 11:19:13 -06:00
Zach Dykstra 8554bdd8ee Fix edge cases
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.
2019-12-09 21:28:24 -06:00
Zach Dykstra af408a9599 Speedup/safety mods
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.
2019-12-08 22:13:03 -06:00
Zach Dykstra b7b9119395 Include etc directory layout for packaging needs 2019-12-08 22:09:56 -06:00
Zach Dykstra b8615eeb74 Fix syntax error 2019-12-08 19:36:22 -06:00
Zach Dykstra 0b52a4c841 Split functions to include, document, DRY
- 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.
2019-12-01 21:44:42 -06:00
Zach Dykstra 17302b7d75 Support pinning a kernel
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.
2019-11-29 14:06:51 -06:00
Zach Dykstra 854344771a
Merge pull request #1 from johnsusek/master
Fix typo
2019-11-18 16:32:37 -06:00
John Susek 33fc05eb3d
Update README.md 2019-11-18 16:27:35 -06:00
Zach Dykstra 45f275aafa
Update README.md
Add asciicast link
2019-11-18 16:03:09 -06:00
Zach Dykstra ce9a883e91
Update README.md
Include basic documentation on native encryption, update kernel version
2019-11-18 16:00:34 -06:00
Zach Dykstra 41d7dc3f9a Code clean up / bug fixes
- 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
2019-11-16 08:37:05 -06:00
Zach Dykstra f3c47d932b
Update README.md 2019-11-04 18:13:56 -06:00
Zach Dykstra 6352dd42ad
Add note about passphrases / double entry 2019-11-04 17:52:12 -06:00
Zach Dykstra e23716f351
Initial documentation 2019-11-04 17:46:01 -06:00
Zach Dykstra 3ce747260b Upstream 90zfs patch to handle key files
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.
2019-11-04 00:16:10 -06:00
Zach Dykstra 9ba434f733 Allow loading a keyfile in the bootmenu, if you really want to 2019-11-02 22:37:46 -05:00
Zach Dykstra cfef2a858f Retab to set ts=2 2019-11-02 16:49:59 -05:00
Zach Dykstra 79f1c1e80a Unmount cloned filesystem after finding kernels 2019-11-02 16:49:40 -05:00
Zach Dykstra 1dd3edd346 Shift module load to bootmenu, fix pool export check, use getargbool 2019-11-02 16:30:54 -05:00
Zach Dykstra 4385013cde Clean up logic around handling of encryption 2019-11-02 15:34:53 -05:00
Zach Dykstra 52a1d0d090 Hook in key handling to the browser menu, center countdown text 2019-11-02 10:00:45 -05:00
Zach Dykstra 192c6ec0e2 Initial support for native encryption in ZoL, emergency shell function 2019-11-01 11:24:25 -05:00
Zach Dykstra f0e70c8e52 Easily track release artifacts 2019-10-29 23:30:44 -05:00
Zach Dykstra 915a136ac8 Small fixes
- 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
2019-10-21 21:15:20 -05:00
Zach Dykstra 08df12d46b Remove unused zfs-lib-* files 2019-10-11 15:21:01 -05:00
Zach Dykstra 5ac0b11bef Clean up a lot of small errors - snapshots, default boot, etc 2019-07-27 20:22:08 -05:00
Zach Dykstra 8eb62097bf Add an automatic boot option if BOOTFS can be detected 2019-07-24 18:01:34 -05:00
Zach Dykstra 61ea14f9cb More functions, rough draft of snapshot booting 2019-07-21 16:00:33 -05:00
Zach Dykstra fe7ecfd6dc Add in snapshot browser 2019-07-20 11:20:13 -05:00
root 87507949aa test.sh is a fairly complete rewrite 2019-07-20 01:01:02 -05:00
Zach Dykstra b6ec5a8e4e Basic working rough-draft boot menu 2019-07-18 16:44:35 -05:00
Zach Dykstra bbc9b88f6a
Initial commit 2019-06-10 20:57:51 -05:00