Skip to content

yureutaejin/yob

Repository files navigation

YOB : Your own OS using bootc

Index

Translation

Contributors


Yuntae


Chunsoo

Introduction

Base project YOB referenced

bootc container

As everybody knows, The Linux container usually shares kernel with host OS,
so that we can easily create a "Container" which is more lightweight and faster than Virtual Machine.

The bootc project uses the method in reverse to create OS using the Linux container techniques.
Unlike usual OCI containers, the base OCI container (so called, bootable container) that bootc uses have below things already.

  • Linux kernel
  • Bootloader
  • systemd
  • System utilities & drivers

So we can create OS image using OCI container techniques which is familiar to modern developers/engineers.

Overall pipeline workflows

Currently, this project referred RHEL image mode pipeline diagram.

Image mode pipeline for RHEL

Quick Start

Quick start without editing few configurations.

Prerequisites

  • Docker
  • Make
  • OCI Registry
    • Get your account of OCI Registry (e.g. Docker Hub, Quay.io, etc.)
  • Just define local variables in host shell without fixing Makefile (Refer to default value in Makefile)

1. Build bootc

It will build OCI container based on bootc project and push it to your OCI Registry.

  1. make build-bootc
  2. make push-bootc

2. (Just for first boot) Convert bootc to disk format

  • make pull-bootc-image
    • Pull bootc image from OCI Registry (if you haven't yet)
  • make save-image-as-tgz
  • make convert-to-{iso,ami,qcow2}
    • Currently, only iso and ami format is tested.

3. Flash bootable disk

There are too many ways to make bootable disk. Just leave Bare Metal case for now.

  • (Bare Metal) Recommend to flash USB drive (3.0, color blue) with at least 8GB

4. Boot OS

Boot with created bootable disk Since we've set host's config with config.toml already, Just wait until first booting is done.

5. (On target machine) Rollback/Upgrade/Switch OS

Note

No need to make bootable disk again after first boot.

Simply push the new image to the OCI Registry, and the OS switching will be complete after downloading and rebooting.

  • sudo bootc upgrade
    • Upgrade to latest pushed image with same tag you booted
  • sudo bootc switch OCI_REGISTRY/OCI_IMAGE_REPO:OCI_IMAGE_TAG
    • Switch to specified bootc image
    • You can switch any bootc image if it is accessible
    • e.g. sudo bootc switch quay.io/fedora/fedora-bootc:latest
  • sudo bootc rollback
    • Rollback to previous image
    • (Important) OS will keep just 1 previous version of image for rollback

About

YOB: Your own OS using bootc

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published