Preview a GRUB 2.x theme using KVM/QEMU
Project description
About
grub2-theme-preview came into life when I was looking around for available GRUB 2.x themes and wanted a way to quickly see a theme in action without rebooting real hardware.
It takes a theme folder (or just a single picture),
creates a temporary bootable image using grub2-mkrescue
and launches
that image in a virtual machine using KVM/QEMU, all without root privileges.
Installation
To install the latest release from PyPI:
# pip install --user grub2-theme-preview
To install from a Git clone for development:
# pip install --user --editable .
Please make sure to install these non-PyPI dependencies as well:
grub2-mkrescue
(can be installed asgrub-mkrescue
on some systems)- QEMU — hypervisor that performs hardware virtualization
- mtools — collection of utilities to access MS-DOS
- libisoburn — frontend which enables creation and expansion of the ISO format
Usage
# grub2-theme-preview --help
usage: grub2-theme-preview [-h] [--image] [--grub-cfg PATH] [--verbose]
[--resolution WxH] [--timeout SECONDS] [--version]
[--grub2-mkrescue COMMAND] [--qemu COMMAND]
[--xorriso COMMAND] [--debug]
[--plain-rescue-image]
PATH
positional arguments:
PATH Path of theme directory (or image file) to preview
optional arguments:
-h, --help show this help message and exit
--image Preview a background image rather than a whole theme
--grub-cfg PATH Path of custom grub.cfg file to use (default:
/boot/grub{2,}/grub.cfg)
--verbose Increase verbosity
--resolution WxH Set a custom resolution, e.g. 800x600
--timeout SECONDS Set timeout in whole seconds or -1 to disable
(default: 30 seconds)
--version show program's version number and exit
command location arguments:
--grub2-mkrescue COMMAND
grub2-mkrescue command (default: grub-mkrescue)
--qemu COMMAND KVM/QEMU command (default: qemu-system-<machine>)
--xorriso COMMAND xorriso command (default: xorriso)
debugging arguments:
--debug Enable debugging output
--plain-rescue-image Use unprocessed GRUB rescue image with no theme
patched in; useful for checking if a plain GRUB rescue
image shows up a GRUB shell, successfully.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for grub2-theme-preview-1.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ec928b8f535cc581a01636f2009fe0604753ba06a984f59f5a052b3f9e1a1da |
|
MD5 | fa9d4136b5ecac8b85e60c1af1ef9965 |
|
BLAKE2b-256 | b0e94613ec0594bbb11384a20eb0f9256b624c1527e437a6265778fcfe2b0fc6 |
Close
Hashes for grub2_theme_preview-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe7db079635a600a7d3c8a310134ac7993dec0eef4596ef824d1214969eeb25 |
|
MD5 | f413d0878ec250813d43e6610c28cc44 |
|
BLAKE2b-256 | 3134268ea748d672b55fe47a03592fc39fb1bf8965e82eb8a1643a666c9e9573 |