• Stars
    star
    450
  • Rank 93,460 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 3 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast and secure initramfs generator

Booster - fast and secure initramfs generator

Booster initramfs generator

Initramfs is a specially crafted small root filesystem that mounted at the early stages of Linux OS boot process. This initramfs among other things is responsible for unlocking encrypted partitions and mounting it as a root filesystem.

Booster is a tool to create such early boot images. Booster is made with speed and full disk encryption use-case in mind.

Booster advantages:

  • Fast image build time and fast boot time.
  • Out-of-box support for full disk encryption setup.
  • Clevis style data binding. The encrypted filesystem can be bound to TPM2 chip or to a network service. This helps to unlock the drive automatically but only if the TPM2/network service presents.
  • Systemd-cryptenroll type of binding. Booster is able to detect and unlock systemd-fido2 and systemd-tpm2 style partitions.
  • Supports autodiscoverable root partition
  • Easy to configure.
  • Automatic host configuration discovery. This helps to create minimalistic images specific for the current host.

There are other initramfs generators similar to booster: mkinitcpio and dracut.

Install

Arch Linux

Install booster package from the official repository.

At the installation time this package will create a number of booster images in your /boot/ directory:

$ ls -lh /boot/booster-*.img
-rwxr-xr-x 1 root root 3.9M Dec 10 20:51 /boot/booster-linux.img

Void Linux

Install booster with xbps-install -S booster.

Run xbps-reconfigure -f linux to create the initramfs for a previously installed kernel.

Alpine Linux

Install booster using apk add booster.

Refer to /usr/share/doc/booster/README.alpine for bootloader configuration instructions (which depend on the desired setup).

Manual

Or optionally the image can be generated manually as booster build mybooster.img. Note that by default booster generates host specific images with minimum binaries needed for the current host. Providing --universal flag to booster tool will add more modules and tools and the result image will be bigger.

Once the image is generated it is time to configure the bootloader.

Usage

For usage instructions please see booster manpage using man booster or the same document available online.

Build

The project consists of 3 components:

  • init binary that runs as a part of your machine boot process. It is going to be the very first user process run at your machine.
  • generator tool that creates ramfs image with all components needed to boot the computer
  • integration_tests tests that involve all components and use QEMU to boot from a generated image

These components use standard Golang tooling. To build any part do go build, to run tests do go test.

Run tests

cd {init,generator,integration_tests}
go test -v

Credits

Work on this project has been started as a part of Twitter's hack week. Huge thanks to my employer for its support of open-source development. Special thanks to Ian Brown.

Booster architecture has been inspired by Michael Stapelberg's project called distri. Initial version of booster borrowed a lot of ideas from the distri's initramfs generator.

Licence

See license

More Repositories

1

pacoloco

Caching proxy server for Arch Linux pacman
Go
187
star
2

smart.go

Pure-Go library to access drive's S.M.A.R.T. information
Go
158
star
3

vmtest

Go framework for integration testing with Virtual machines (e.g. QEMU)
Go
94
star
4

luks.go

Pure Golang library to manage LUKS partitions
Go
75
star
5

google-coredumper

Mirror of https://code.google.com/p/google-coredumper/ with Arch package fixes
Shell
55
star
6

quarry

Rubygems binary repository for Arch Linux
Ruby
52
star
7

gem2arch

Create PKGBUILD from Ruby Gem Package
Ruby
25
star
8

devmapper.go

Go
20
star
9

clevis.go

Pure Golang implementation of clevis encryption framework
Go
20
star
10

uriparser

Extremely fast uri parser suitable for embedded applications
C
13
star
11

menuconfig

Out-of-tree version of Linux' kconfig tool
C
13
star
12

vala-sample

Vala sample
Vala
9
star
13

ucode-image-gen

Tool to generate early boot ucode firmware images
Go
8
star
14

pkgoutofdate

Checks ArchLinux packages repository for upstream updates
Ruby
8
star
15

tang.go

Pure Golang implementation of server-side ECMR exchange functionality (Tang server)
Go
6
star
16

android-platform-tools-build

Minimalistic build for Android platform tools (adb, fastboot)
Ruby
4
star
17

stm32f4-examples

My experiments with stm32f4-discovery board
C
4
star
18

subtle

Tailing windows manager that uses Ruby
C
3
star
19

archpackages

Files for my arch packages
Shell
3
star
20

clevis-extra-pins

Additional clevis pins
Shell
2
star
21

verity.go

Go
2
star
22

shog

Ruby frontend for Ninja build system
Ruby
1
star
23

showcase

Fullscreen application that rotating over a set of html pages
C
1
star