PIBOOTCTL(1) | pibootctl | PIBOOTCTL(1) |
pibootctl - pibootctl manual
pibootctl [-h] [--version] command ...
The pibootctl utility exists to query and manipulate the boot configuration of the Raspberry Pi. It also permits easy storage and retrieval of boot configurations. Each of the commands provided by the utility are listed in the following section.
Typically, the status command is the first used, to determine the current boot configuration:
$ pibootctl status +------------------------+-------+ | Name | Value | |------------------------+-------| | i2c.enabled | on | | spi.enabled | on | | video.overscan.enabled | off | +------------------------+-------+
After which the save command might be used to take a backup of the configuration before editing it with the set command:
$ sudo pibootctl save default $ sudo pibootctl set camera.enabled=on gpu.mem=128 $ sudo pibootctl save cam
NOTE:
The configuration of pibootctl itself dictates where the stored configurations are placed on disk. By default this is under a "pibootctl" directory on the boot partition, but this can be changed in the pibootctl configuration. The application attempts to read its configuration from the following locations on startup:
The final location is only intended for developers working on pibootctl itself. The others should be used by packages providing pibootctl on your chosen OS.
Stored boot configurations are simply PKZIP <https://en.wikipedia.org/wiki/Zip_(file_format)> files containing the files that make up the boot configuration (sometimes this is just the config.txt file, and sometimes other files may be included).
NOTE:
In other words, you can simply place your Pi's SD card in a Windows or MAC OS X computer which should automatically mount the boot partition (which is the only partition that these OS' will understand on the card), find the "pibootctl" folder and under there you should see all your stored configurations as .zip files. Unzip one of these into the folder above "pibootctl", overwriting files as necessary and you have restored your boot configuration.
The diff command can be used to discover the differences between boot configurations:
$ pibootctl diff default +------------------------+---------------+-------------+ | Name | <Current> | default | |------------------------+---------------+-------------| | boot.firmware.filename | 'start_x.elf' | 'start.elf' | | boot.firmware.fixup | 'fixup_x.dat' | 'fixup.dat' | | camera.enabled | on | off | | gpu.mem | 128 (Mb) | 64 (Mb) | +------------------------+---------------+-------------+
NOTE:
The help command can be used to display the help screen for each sub-command:
$ pibootctl help save usage: pibootctl save [-h] [-f] name Store the current boot configuration under a given name. positional arguments: name The name to save the current boot configuration under; can include any characters legal in a filename optional arguments: -h, --help show this help message and exit -f, --force Overwrite an existing configuration, if one exists
Additionally, help will accept setting names to display information about the defaults and underlying commands each setting represents:
$ pibootctl help camera.enabled Name: camera.enabled Default: off Command(s): start_x, start_debug, start_file, fixup_file Enables loading the Pi camera module firmware. This implies that start_x.elf (or start4x.elf) will be loaded as the GPU firmware rather than the default start.elf (and the corresponding fixup file). Note: with the camera firmware loaded, gpu.mem must be 64Mb or larger (128Mb is recommended for most purposes; 256Mb may be required for complex processing pipelines).
The list command can be used to display the content of the configuration store, and load to restore previously saved configurations:
$ pibootctl list +---------+--------+---------------------+ | Name | Active | Timestamp | |---------+--------+---------------------| | cam | x | 2020-03-11 21:29:56 | | default | | 2020-03-11 21:29:13 | +---------+--------+---------------------+ $ sudo pibootctl load default
Dave Jones
2019-2020 Dave Jones
September 14, 2020 | 0.5.2 |