From 4b78e45d119395f35e85b3e04931e141fc0f72e9 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 23 Dec 2021 15:56:47 +0100 Subject: [PATCH] docs: Update examples Use mkosi verbs instead of direct invocations of systemd-nspawn and qemu. --- mkosi.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/mkosi.md b/mkosi.md index 24f99cca3..53cbd508c 100644 --- a/mkosi.md +++ b/mkosi.md @@ -1612,30 +1612,28 @@ variables: Create and run a raw *GPT* image with *ext4*, as `image.raw`: ```bash -# mkosi -# systemd-nspawn -b -i image.raw +# mkosi --bootable --incremental boot ``` Create and run a bootable btrfs *GPT* image, as `foobar.raw`: ```bash -# mkosi -t gpt_btrfs --bootable -o foobar.raw -# systemd-nspawn -b -i foobar.raw -# qemu-kvm -m 512 -smp 2 -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -drive format=raw,file=foobar.raw +# mkosi --format gpt_btrfs --bootable -o foobar.raw +# mkosi --output foobar.raw boot +# mkosi --output foobar.raw qemu ``` Create and run a *Fedora Linux* image into a plain directory: ```bash -# mkosi -d fedora -t directory -o quux -# systemd-nspawn -b -D quux +# mkosi --distribution fedora --format directory boot ``` Create a compressed image `image.raw.xz` and add a checksum file, and install *SSH* into it: ```bash -# mkosi -d fedora -t gpt_squashfs --checksum --compress --package=openssh-clients +# mkosi --distribution fedora --format gpt_squashfs --checksum --compress --package=openssh-clients ``` Inside the source directory of an `automake`-based project, configure @@ -1666,13 +1664,13 @@ make -j `nproc` make install EOF # chmod +x mkosi.build -# mkosi +# mkosi --bootable --incremental boot # systemd-nspawn -bi image.raw ``` To create a *Fedora Linux* image with hostname: ```bash -# mkosi -d fedora --hostname image +# mkosi --distribution fedora --hostname image ``` Also you could set hostname in configuration file: -- 2.47.2