Code Monkey home page Code Monkey logo

grub2-zfs-be's Introduction

Grub2 ZFS Boot Environments

Utilities to add support for maintaining multiple boot environments for Linux root installations on ZFS. Intended to work with environments based on following this guide modified to split /boot/grub into a separate dataset shared across boot environments and identifying boot environments as datasets with zfs properties mountpoint=/ and canmount=noauto.

This project is primarily an effort to satisfy a personal need (See Issue 5809) in absence of a mature beadm-like toolset for Ubuntu's current LTS release.

Warning: this is an experimental project with currently no participation by experienced members of the ZOL project, package maintainers, or distribution developers. Use at your own risk.

grub-mkconfig

At present the primary utility provided is a grub-mkconfig helper script 15_linux_zfs, built to run alongside/after and eventually replace /etc/grub.d/10_linux. In its current state, the script only supports zfs roots with some menu entry details still hard-coded to my specific local environment and configuration.

Use the included test.sh script to non-destructively determine whether your configuration is supported. EFI booting is theoretically supported but untested. Due to the limited range of test environments and unstable state, even when installed the script will not replace stock grub scripts the entries they generate. Boot-environment-specific entries will appear after the stock entries.

beadm-alt

Lightweight partial implementation of beadm that can list, create, destroy, and activate boot environments. (Activation requires GRUB_DEFAULT=saved in /etc/default/grub.)

Supported options:

  • beadm list
  • beadm create [-a] [-e bename@snapname] bename
  • beadm destroy bename
  • beadm activate bename

Creating boot environments across pools is not supported, nor even is creating a boot environment in a location separate from the origin dataset. However, manually created boot environments in separate datasets will be correctly understood so long as no collissions occur on dataset name.

grub2-zfs-be's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

grub2-zfs-be's Issues

Improving performance

Overhauling the structure of the grub-mkconfig helper script removed inline optimizations and trades extensive detail duplication in the code for extensive duplication of command execution, causing a substantial hit to performance. Said hit is made even worse due to package upgrades triggering grub-mkconfig multiple times in a row, enough even to meaningfully affect end users.

I would like to attempt incorporating https://bitbucket.org/dimo414/bash-cache into both the helper script and beadm.sh so that the performance can be addressed in a graceful, less intrusive way.

Concerns to address:

  • How should bash-cache be distributed with grub2-zfs-be?
    • I would like to keep installation as simple and dependency-free as possible.
  • Are there any runtime scenarios where intruduction of caching behavior would prevent operation?
    • Can we rely on access to our chosen location of cache backing store--probably /run/shm?
    • Will caching fail gracefully if the backing store is unavailable/unreliable?
  • Can I be certain cache is always invalidated when underlying changes occur while still enjoying substantial performance gains?
    • Can beadm.sh cleanly share usage of bash-cache+configuration to manage the same cache store?
    • What about when kernel versions are installed/removed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.