flatpak-create-usb - Linux


Overview

flatpak-create-usb generates a bootable USB drive with a distribution of Flatpak applications using the Ostree deployment system. It allows you to create portable workspaces with pre-configured applications on a USB drive.

Syntax

flatpak-create-usb [options] <USB_DRIVE> <FLATPAK_REPOS>...

Options/Flags

  • --arch: Specify the architecture for the target system.
  • --components: List of Flatpak components to install.
  • --create-efi: Create a USB drive with EFI boot partition.
  • --efi-boot: Boot strategy for EFI systems.
  • --file-system: Specify the file system to format the USB drive.
  • --format: Format the USB drive.
  • --help: Display help and exit.
  • --no-format: Do not format the USB drive.
  • --ostree-repo: Ostree repository to use.
  • --verbose: Enable verbose output.

Examples

Create a bootable USB drive with a minimal set of applications:

flatpak-create-usb /dev/sdb https://flathub.org

Create a bootable USB drive with a custom set of components:

flatpak-create-usb --components org.gnome.Calculator /dev/sdc https://flathub.org

Create a bootable USB drive with EFI boot partition:

flatpak-create-usb --create-efi /dev/sda https://flathub.org

Common Issues

  • USB drive not recognized: Ensure the USB drive is properly connected and formatted.
  • "Failed to create Ostree deployment" error: The system may not have enough free space or permissions to create the Ostree deployment.
  • "No bootable device" when booting from USB: Check the EFI boot settings in the target system’s BIOS and ensure the USB drive is selected as the boot device.

Integration

flatpak-create-usb can be integrated with other tools:

  • udisksctl: To detect and format USB drives.
  • ostree: To manage the deployment of Flatpak applications.

Related Commands

  • flatpak
  • ostree
  • udisksctl