Petitboot

A kexec based bootloader

Petitboot is a platform independent bootloader based on the Linux kexec warm reboot mechanism. Petitboot supports loading kernel, initrd and device tree files from any Linux mountable filesystem, plus can load files from the network using the FTP, SFTP, TFTP, NFS, HTTP and HTTPS protocols. Petitboot can boot any operating system that includes kexec boot support.

Petitboot includes graphical and command line user interface programs. The command line programs can be used to boot the system remotely via telnet or ssh sessions. Multiple user interface programs can run simultaneously.

Petitboot is licensed under the GPLv2.

Screen Shots

NCURSES UI Over Telnet The TWIN GUI
NCURSES UI in Portrait The NCURSES Option Editor

Design & Features

Petitboot has a client-server design. The petitboot server, pb-discover, uses several event mechanisms to dynamically update its knowledge of available boot configurations as they become available or unavailable at run time. The petitboot client programs implement the petitboot user interfaces and display the curent boot configurations known by pb-discover.

Petitboot monitors udev block device events, and when a new block device becomes available to the system pb-discover will search for boot configuration files on the device. When a device is removed from the system pb-discover will remove any boot configurations associated with that device.

pb-discover exposes a generic event mechanism that allows utility programs to provide boot configuration information. Petitboot includes utility programs to process boot configuration info from DHCP servers, and if configured to do so, will manage any boot configuration info received.

Petitboot provides a programming framework for creating custom user interface programs.

Presentations

Linux Plumbers Conference 2012

Using Petitboot

You can navigate the ncurses user interface with the keyboard arrow keys. A help and status menu is displayed at the lower part of the petitboot screen.

In the GUI client each discovered configuration source will appear as an icon on the left-hand pane of the screen. Boot options from the selected source will appear on the right.

Petitboot man pages:

petitboot
pb-cui
pb-discover
pb-event

Source Code

The current petitboot and twin windowing system sources can be found at kernel.org:

petitboot.git
libtwin.git

Distributions

Petitboot has some support in several Linux Distributions:

Debian
Ubuntu
OpenWRT
Fedora

Authors

The concept of petitboot and its initial implementation was the work of Benjamin Herrenschmidt.

The client-server design and considerable clean up work followed by Jeremy Kerr. Jeremy's petitboot pages, now out of date, can be found at the ozlabs.org Web site.

The petitboot GUI program uses Keith Packard's twin windowing system.

Petitboot is currently maintained by Geoff Levand.

About

You can find the latest version of this document, and some other useful things here:

http://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html

Please send comments to <geoff @ infradead.org>.