Skip to content

A tool for creating small bootable Linux images that can do something right after they boot up.

License

Notifications You must be signed in to change notification settings

KrystianD/runboot

Repository files navigation

runboot

A tool for creating small bootable Linux images that can do something right after they boot up.

For example, it can create a bootable USB Flash Drive that will run a Python script which copies some files from the boot medium to the hard disk.

It utilizes Buildroot, GRUB and tools for creating ISO images.

Usage

Everything is set up to run under Docker, which is the only requirement on the host system.

  1. Build Docker images:
./1_build_images.sh
  1. (optional) Make adjustment to Buildroot (via menuconfig):
./menuconfig.sh
  1. Build kernel and rootfs with Buildroot:
./2_run_buildroot.sh
  1. Copy your files to diskroot/ directory. After booting, runboot will run run.sh.

  2. Create ISO image:

./3_create_iso.sh

Optionally, path to diskroot can be provided as first argument of 3_create_iso.sh script.

Image will be placed in output-iso/ directory.

  1. (optional) Test your ISO image with QEMU:
./run_in_qemu.sh cdrom-pc # or cdrom-efi, hda-pc, hda-efi

Supports

  • BIOS and UEFI modes in a single image,
  • booting from USB Flash Drive, CD-ROM drive or a hard disk.

Example

Default repository configuration creates a bootable image that shows Hello World from a Python script and reboots the system.