Last updated:
genpack-install is a tool for deploying SquashFS system images generated by genpack to physical disks, ISO images, and ZIP archives.
genpack-install [options] [system_image]
Root privileges are required.
| Argument | Required | Description |
|---|---|---|
system_image | Depends on mode | System image file (SquashFS) |
Required in self-update mode. Optional in --disk, --cdrom, and --zip modes — when omitted, the currently installed system image is used.
| Option | Type | Default | Description |
|---|---|---|---|
--disk <PATH> | String | (none) | Disk device path. Specify list to show installable disks |
--cdrom <PATH> | String | (none) | Path of ISO9660 image to create |
--zip <PATH> | String | (none) | Path of ZIP archive to create |
--system-cfg <PATH> | Path | (none) | Install specified system.cfg file |
--system-ini <PATH> | Path | (none) | Install specified system.ini file |
--label <NAME> | String | (none) | Volume label for boot partition or ISO image |
--gpt | Flag | false | Always use GPT instead of MBR |
--superfloppy | Flag | false | Use whole disk instead of partitioning |
--no-esp | Flag | false | Don’t mark boot partition as ESP |
--additional-boot-files <PATH> | Path | (none) | ZIP archive containing additional boot files |
-y | Flag | false | Skip confirmation prompts |
--debug | Flag | false | Show debug messages |
genpack-install has 4 operation modes depending on the combination of arguments.
genpack-install <system_image>
Atomically updates the system image of a running system. This mode is used when none of --disk, --cdrom, or --zip are specified.
Update procedure:
system.img or data partition’s system)system.old (if present)system.newsystem.cur (preserved for rollback)system.new to the original image pathsyncOn failure, automatic recovery from system.cur is attempted.
genpack-install --disk=<device path> [options] [system_image]
genpack-install --disk=list
Installs a system image to a physical disk.
Specifying --disk=list shows a list of installable disks. Read-only devices, mounted devices, and devices smaller than 4GiB are excluded.
Partitioning:
--gpt: Force GPT regardless of conditions--superfloppy: No partition table; formats the entire disk as FAT32 (images under 4GiB only)Normal mode (with partitioning) layout:
data-{boot partition UUID}Specifying --no-esp prevents the boot partition from being marked as ESP (EFI System Partition). Use this when certain bootloaders dislike the ESP flag (only effective with MBR).
A confirmation prompt is shown before installation. Use -y to skip.
genpack-install --cdrom=<output path> [--label=<label>] [system_image]
Creates a bootable ISO9660 image. Requires xorriso (libisoburn) to be installed.
eltorito-bios.img exists)eltorito-efi.img exists)When --label is omitted, the volume label defaults to GENPACK.
genpack-install --zip=<output path> [system_image]
Creates a ZIP archive containing the system image and boot files.
Files included in the ZIP:
system.img — System imagesystem.cfg — System configuration (when --system-cfg is specified)system.ini — System configuration (when --system-ini is specified)genpack-install uses GRUB as the bootloader. Bootloader files are searched in the following order:
/usr/lib/genpack-install/ inside the system image/usr/local/lib/genpack-install/ on the host/usr/lib/genpack-install/ on the hostInstalled files:
boot*.efi files are copied to efi/boot/boot.img, core.img, and grub.cfg exist and grub-bios-setup is availableSupported architectures:
| Architecture | BIOS | UEFI |
|---|---|---|
| x86_64 | boot.img + core.img | bootx64.efi |
| i386 | boot.img + core.img | bootia32.efi |
| aarch64 | — | bootaa64.efi |
| riscv64 | — | bootriscv64.efi |
Raspberry Pi support:
When the system image contains boot/bootcode.bin, it is treated as a Raspberry Pi image. All files under the boot/ directory are copied to the boot partition, and the root= parameter in cmdline.txt is rewritten to root=systemimg:auto.
grub.cfg system.img search logic:
system.img exists on the boot partition, use itdata-{boot partition UUID}d-{boot partition UUID}boot/kernel) and initramfs (boot/initramfs)grub.cfgsystem.cfg / system.ini (when specified)system.imgBoot partition size is max(4, image_size_gib * 3 + 1) GiB when the system image is under 4GiB, or 1 GiB when 4GiB or larger.
--superfloppy is useddata-{boot partition UUID}systemgenpack-install validates system images before installation:
.genpack/ directory must existboot/kernel and boot/initramfs exist (standard images)boot/bootcode.bin exists (Raspberry Pi images)Upon passing validation, the contents of .genpack/artifact and .genpack/variant are displayed.
This document was written based on the following repository snapshots: