OSTREE-CREATE-USB(1)

NAME 💅

okay so this whole page is about ostree-create-usb — it puts the given refs on an external drive for P2P distribution. think “make a USB repo so other computers can find and pull these refs later” ✨.


SYNOPSIS 🎀

ostree create-usb [OPTIONS...] {MOUNT-PATH} {COLLECTION-ID REF}
                  [COLLECTION-ID REF...]

DESCRIPTION 🦋

so this command literally creates a repository in MOUNT-PATH and pulls the given REF(s) into it, so they can be found and pulled from (maybe by another computer that’s offline, no cap). for the full P2P distribution lore, check ostree-find-remotes(1).

for ostree to pull refs from a mounted filesystem (like a USB drive), the repo has to be in a standard location. the vibe check order is: subdirectories of .ostree/repos.d are checked, then .ostree/repo, ostree/repo, and var/lib/flatpak/repo are checked. by default ostree create-usb uses .ostree/repo, but if you specify another location using --destination-repo, a symbolic link will be created for you in .ostree/repos.d. slay.

heads up bestie: this command will regenerate the summary file in the destination repo so that it stays accurate, so you shouldn’t try to use summary signatures in the destination repo. this shouldn’t be a concern because clients that support pulling from USB mounts use signed per-repo and per-commit metadata instead of summary signatures. periodt.


OPTIONS 🌸

  • --disable-fsync — do not invoke fsync(). that’s it, no fsync for you 💅
  • --destination-repo=DEST — create the repository in DEST under MOUNT-PATH, rather than the default location. cute.
  • --commit=COMMIT — pull COMMIT instead of whatever REF points to. this can only be used if a single ref is specified. don’t try it with multiple refs, bestie 😭

EXAMPLE 🔥

here’s the whole vibe in action, command first:

ostree --repo=/var/lib/flatpak/repo create-usb
/run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be
com.exampleos.Apps app/org.kde.Khangman/x86_64/stable com.exampleos.Apps
ostree-metadata com.exampleos.Apps appstream/x86_64

and the output was giving:

           5 metadata, 213 content objects imported; 1 KiB transferred in 1 seconds                                                                                                                      Copied 3/3 refs successfully from ‘/var/lib/flatpak/repo’ to ‘.ostree/repo’ repository in ‘/run/media/mwleeds/f6d04c7a-60f6-4ba3-bb96-0f40498675be’.

okay that’s the whole page, bestie! source/version: OSTree; page name: OSTREE CREATE-USB(1); date: the original footer didn’t print one, so i’m not inventing one — no fake date energy here 💜🫶

📦 where this page comes from