uCore Documentation
repository·main·Indexed 20 days ago
https://github.com/ublue-os/ucoreuCore is an opinionated, OCI-based distribution built on top of Fedora CoreOS, designed as a 'batteries-included' lightweight server image. It provides various image variants including ucore-minimal, ucore, and ucore-hci, with support for x86_64 and aarch64 architectures. The distribution offers multiple build streams (stable, lts, testing) and specialized tags for NVIDIA driver support. Key features include ZFS integration, build transparency via SBOMs and provenance, and support for containerized workloads using Podman and Docker.
What's inside uCore
- uCore is an OCI image based on Fedora CoreOS that comes with "batteries included". It is an opinionated, custom CoreOS image built daily to serve as a lightweight server image. It includes common tools and services or the building blocks required to host them, making it suitable for server environments.
Choose the right uCore image variant
mainuCore provides three primary image types tailored for different use cases. All images are based on Fedora CoreOS and can be optionally combined with NVIDIA driver tags.
ucore-minimal: Lightweight and functional. Best for running containerized workloads on bare metal or virtual machines. Includesbootc,cockpit,firewalld, guest VM agents,docker-buildx,docker-compose,podman-compose,tailscale,wireguard-tools,tmux, and ZFS drivers.ucore: Built onucore-minimal. Adds drivers, storage tools, and utilities. Best for bare metal or NAS/storage server use cases. Includesdistrobox,mergerfs,nfs-utils,rclone,samba,snapraid, andcockpit-zfs-manager.ucore-hci: Built onucore. Adds virtualization tools for Hyper-Converged Infrastructure. Includeslibvirt-client,libvirt-daemon-kvm,virt-install, andcockpit-machines.
Use NVIDIA drivers in uCore
mainIf you use a uCore image tagged with
-nvidia, the following are pre-installed:- NVIDIA kernel module
- Basic CUDA libraries
nvidia-container-toolkit
Important: This does not install desktop graphics services. It is intended for container workloads (e.g., using the GPU for
nvdec,nvenc, orCUDAinside containers).If you require an older or different driver version, consider using the
container-toolkit-fcosdriver approach, which uses a systemd service to load drivers in Podman at boot. This approach is typically used with standard uCore images rather than the-nvidiatagged ones.Build Transparency: SBOMs, Provenance, and Changelogs
mainuCore provides build transparency features to help users verify their images:
- RPM Package Provenance: Information regarding the origin of RPM packages from each image build is surfaced.
- Software Bill of Materials (SBOM): Signed per-architecture SPDX SBOMs are attached to image digests.
- Release Changelogs: Generated GitHub Release changelogs are available for the
stable,testing, andltsstreams.
uCore Build Streams and Kernels
mainuCore uses different streams to balance stability and feature updates:
stable: Follows the standard Fedora CoreOS kernel. This is the recommended stream for most users.lts: Uses a Long Term Support (LTS) kernel (e.g.,longterm-6.18) to provide more consistent behavior for servers between updates. Note that using the LTS kernel with SecureBoot enabled requires importing the ublue-os MOK before rebooting to avoid boot failure.testing: Uses the upstream Fedora CoreOS kernel and is intended for testing new updates before they reachstable.
Inspect a running VM using `VM_TEST_KEEP`
mainIf you want to manually inspect the guest state after a test completes (successfully or otherwise), set the
VM_TEST_KEEPenvironment variable to any non-empty value.When
VM_TEST_KEEPis set:- The script leaves the QEMU process running.
- The complete work directory is retained.
- The script will print the SSH command and the QEMU process ID (PID) before exiting so you can connect to the guest or stop the process manually.
Important: You must manually stop the recorded QEMU process before deleting the work directory.
VM_TEST_KEEP=1 just vm-test SOURCE_IMAGE TARGET_IMAGEAvailable uCore Image Variants
mainuCore provides several image variants depending on your needs:
ucore-minimal: A stripped-down version for minimal footprints.ucore: The standard "batteries included" image.ucore-hci: A variant specifically for Human Interface Controller (HCI) use cases.
Images are available for both
x86_64andaarch64(ARM64) architectures. Note thataarch64builds may lack certain Intel-specific packages (e.g.,intel-compute-runtime) and currently do not includemergerfs.Select uCore tags for stability and drivers
mainuCore uses a tag matrix to combine image types with different update streams and driver support. Use these tags when pulling images from
ghcr.io/ublue-os/.Stream Tags:
stable: Based on Fedora CoreOS stable stream (includes ZFS).testing: Based on Fedora CoreOS testing stream (includes ZFS).lts: Based on Fedora CoreOS stable stream with a Long Term Support (LTS) kernel (includes ZFS).
Driver Tags:
nvidia: Includes the latest open NVIDIA driver and container runtime.nvidia-lts: Includes the LTS NVIDIA driver and container runtime.
Example Combinations:
ucore:stable(Minimal, stable stream)ucore:lts-nvidia(Minimal, LTS kernel, NVIDIA drivers)ucore-hci:testing-nvidia-lts(HCI, testing stream, LTS kernel, NVIDIA drivers)
Configure NFS Server sharing
mainTo use uCore as an NFS server, you must configure the firewall, SELinux contexts, and the service itself.
1. Firewall Configuration
Add the NFS service to the
FedoraServerzone:sudo firewall-cmd --permanent --zone=FedoraServer --add-service=nfs sudo firewall-cmd --reload2. SELinux Configuration
By default,
nfs-serveris blocked from sharing directories. You must set the appropriate context.For Read-Only shares:
sudo semanage fcontext --add --type "public_content_t" "/path/to/share/ro(/.*)?" sudo restorecon -R /path/to/share/roFor Read-Write shares:
sudo semanage fcontext --add --type "public_content_rw_t" "/path/to/share/rw(/.*)?" sudo restorecon -R /path/to/share/rwSimplest (Least Secure) Method: To allow sharing anything without specific context management:
- Read-only:
sudo setsebool -P nfs_export_all_ro 1 - Read-write:
sudo setsebool -P nfs_export_all_rw 1
3. Service Management
Enable and start the service:
sudo systemctl enable --now nfs-server.service4. Export Configuration
Configure shares in
/etc/exportsor/etc/exports.d/*.# Example: Enable RW NFS sharing via SELinux booleans sudo setsebool -P nfs_export_all_rw 1 # Example: Start the service sudo systemctl enable --now nfs-server.service- Read-only:
Install uCore via Auto-Rebase
mainThe fastest way to install uCore is to use a Butane template to generate an Ignition file that automatically rebases the system to a uCore image during the initial Fedora CoreOS installation.
Prerequisites:
- You must follow the Fedora CoreOS bare metal installation guide.
- You must produce an Ignition file that, at minimum, sets a password and an SSH key for the default user (
core).
Steps:
- Use
examples/ucore-autorebase.butaneas a template. ReplaceYOUR_GOOD_PASSWORD_HASH_HEREwith your actual password hash and add your SSH public key. - Generate an Ignition file from your Butane configuration using the
butaneutility. - Install CoreOS on your target platform (hypervisor, cloud, or bare-metal) using the
coreos-installerand point it to your Ignition file via--ignition-urlor--ignition-file.
Tip: Test your Ignition configuration in a VM before attempting a bare-metal installation.
sudo coreos-installer install /dev/nvme0n1 --ignition-url https://example.com/ucore-autorebase.ignConfigure Samba sharing
mainTo use uCore as a Samba server, configure the firewall, SELinux, and the service.
1. Firewall Configuration
sudo firewall-cmd --permanent --zone=FedoraServer --add-service=samba sudo firewall-cmd --reload2. SELinux Configuration
Set the
samba_share_tcontext on your directories:sudo semanage fcontext --add --type "samba_share_t" "/path/to/share(/.*)?" sudo restorecon -R /path/to/shareSimplest (Least Secure) Method: To allow Samba to share anything:
sudo setsebool -P samba_export_all_rw 13. Service Management
sudo systemctl enable --now smb.service4. Share Configuration
Manual configuration is done in
/etc/samba/smb.conf. Alternatively, use user shares via:net usershare add sharename /path/to/share [comment] [user:{R|D|F}] [guest_ok={y|n}]# Example: Enable Samba service sudo systemctl enable --now smb.service # Example: Set SELinux context for a specific share sudo semanage fcontext --add --type "samba_share_t" "/var/home/myshare(/.*)?" sudo restorecon -R /var/home/myshareConfigure ZFS on uCore
mainZFS kernel modules and tools are pre-installed but not loaded by default.
1. Loading the Module
Load it manually with
modprobe zfs. To ensure it loads automatically at boot, create a configuration file:echo zfs > /etc/modules-load.d/zfs.conf2. Creating Zpools on an Immutable Root
Because the uCore root filesystem (
/) is immutable, you cannot create directories for mountpoints directly in/. Always specify a mountpoint in a writable location (like/var) when creating a pool:Correct:
zpool create -m /var/tank tank /dev/sdbTo fix an existing pool with the wrong mountpoint:
zfs set mountpoint=/var/tank tank3. ZFS Scrub Timers
You can enable built-in timers to periodically run
zpool scrubfor data integrity:- Weekly:
systemctl enable --now zfs-scrub-weekly@<pool>.timer - Monthly:
systemctl enable --now zfs-scrub-monthly@<pool>.timer
4. Backups with Sanoid/Syncoid
ucoreincludessanoidandsyncoid.- Sanoid: Use it for automated snapshots. Create a
sanoid.confin/etc/sanoid(use a template from the sanoid repo) and enable the timer:systemctl enable sanoid.timer. - Syncoid: Use it for ZFS replication. For a "pull" configuration, create a
syncoid.serviceandsyncoid.timerin/etc/systemd/system/and enable the timer.
# Load ZFS at boot echo zfs > /etc/modules-load.d/zfs.conf # Create a pool with a writable mountpoint zpool create -m /var/tank tank /dev/sdb # Enable weekly scrub systemctl enable --now zfs-scrub-weekly@tank.timer- Weekly: