Skip to content

Commit

Permalink
README: provide an example to generate a booting image
Browse files Browse the repository at this point in the history
To help people get an impression of `bootc` this commit adds an
example how to install bootc to a disk-image and boot it with
qemu.

Arguable this example is not complete as there is no way for
the user to login in right now and maybe some example how to
use the host would be nice but this might be a useful start.
  • Loading branch information
mvo5 committed Jan 24, 2024
1 parent b62f6a5 commit 23e3e0b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ which is used to boot. At runtime on a target system, the base userspace is
*not* itself running in a container by default. For example, assuming
systemd is in use, systemd acts as pid1 as usual - there's no "outer" process.

# Example

To try bootc today run:
```
$ truncate -s 10G test-disk.img
$ sudo losetup -Pf test-disk.img
$ LOOP=$(sudo losetup | grep test-disk.img | cut -f1 -d' ')
$ sudo podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t quay.io/centos-bootc/fedora-bootc:eln bootc install to-disk --generic-machine "$LOOP"
$ qemu-system-x86_64 -m 1500 -snapshot -accel kvm -cpu host -bios /usr/share/OVMF/OVMF_CODE.fd ./test-disk.img
```


# More information

See the [project documentation](https://containers.github.io/bootc/).

0 comments on commit 23e3e0b

Please sign in to comment.