2.9 KiB
Install
bootvine always shows stage 2 and shutdown. To show the boot from the initrd as well, the initrd has to run systemd.
NixOS
-
Add the flake to your system flake's inputs and pass its module in:
{ inputs.bootvine = { url = "git+https://codeberg.org/wvhulle/bootvine"; inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { nixpkgs, bootvine, ... }: { nixosConfigurations.my-host = nixpkgs.lib.nixosSystem { modules = [ bootvine.nixosModules.default ./configuration.nix ]; }; }; } -
Enable it in
configuration.nix:{ services.bootvine.enable = true; }The initrd is a systemd initrd by default since NixOS 26.05, and the only kind after it. On NixOS 25.11 and earlier, also set
boot.initrd.systemd.enable = trueto show the boot from the initrd. -
Rebuild and reboot:
sudo nixos-rebuild switch --flake .#my-host
Ubuntu
-
Install the build dependencies and Rust. The repository pins a nightly toolchain in
rust-toolchain.toml, which rustup fetches on the first build:sudo apt install build-essential pkg-config libdbus-1-dev git curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
Clone, build and install the binary and the systemd units, and enable them.
cargo xtask installbuilds as you and askssudoonly for the copying andsystemctl enable:git clone https://codeberg.org/wvhulle/bootvine.git cd bootvine cargo xtask installThis installs
/usr/bin/bootvine, andbootvine.serviceandbootvine-shutdown.servicein/usr/lib/systemd/system, which is enough for stage 2 and shutdown. -
Optionally, show the boot from the initrd. This needs a dracut initramfs with systemd in it; initramfs-tools has no systemd, so on releases that use it bootvine starts in stage 2 only.
cargo xtask install --initrd dracut sudo dracut --forceThis adds the dracut module in
/usr/lib/dracut/modules.d/90bootvineand enables it in/etc/dracut.conf.d/bootvine.conf. -
Reboot.
Other distributions
Install as in the Ubuntu steps, with your distribution's packages for a C
toolchain, pkg-config and the libdbus headers.
For the initrd, use the dracut module as above, or on mkinitcpio:
-
Install the hook in
/usr/lib/initcpio/install/sd-bootvine:cargo xtask install --initrd mkinitcpio -
Add
sd-bootvineaftersystemdinHOOKSin/etc/mkinitcpio.conf. -
Rebuild the initramfs:
sudo mkinitcpio -P
Packaging
cargo xtask install --destdir <dir> stages the files under <dir> instead of
the root, and combines with --initrd.
Uninstall
cargo xtask uninstall removes everything cargo xtask install put in place.
On NixOS, remove services.bootvine.enable and rebuild.