Skip to content

Runtime View

Build a deliverable

  1. The user writes the declarative JSON configuration, or starts from a shipped template.
  2. The disko module turns it into the partitioning plan.
  3. disko builds the image; the bootloader configuration and the catalog images are placed on it.

Write a stick

  1. The user writes a LibreToy image to the device with any tool of the user's choice.
  2. What follows depends on the variant:
    • image-full — the default for end users: libretoy-live starts on the first boot; from there the stick can be grown to the size available.
    • Advanced users may choose image-minimal instead: there is no libretoy-live on the stick, so the changes happen on the host while flashing. They pick it when they want full control, need their own adjustments, or distribute a preconfigured image to many sticks without starting libretoy-live on each. Installation documents the steps; the recommended way is libretoy-flash, which flashes and applies the configuration in one call.

Boot an image

  1. The firmware, BIOS or UEFI, starts GRUB.
  2. GRUB offers the images found on the stick as boot options.
  3. The user picks one; GRUB starts it by loopback.

Start libretoy-live

  1. The user picks the libretoy-live bootloader entry; kernel and initrd start.
  2. The initrd moves the GPT backup header to the end of the stick — the same repair that sgdisk -e does from the host for image-minimal. It is unconditional: it fixes a defect and decides nothing.
  3. The initrd opens a shell that offers three options:
  4. repartition the stick according to the JSON configuration on the stick,
  5. download an image from the catalog by URL and hash, or
  6. evaluate the current upstream flake and set up a NixOS system.