### Minimal Fedora CoreOS Example Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aws This provides a minimal example for configuring and deploying Fedora CoreOS. It serves as a basic starting point for users to understand the fundamental configuration options. -------------------------------- ### Start Fedora CoreOS VM with virt-install Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-containers This command initiates a Fedora CoreOS virtual machine with specified resources (vCPUs, RAM), network configuration, and an ignition file for initial setup. It uses a qcow2 disk image and directs output to the console. ```bash virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \ --import --network=bridge=virbr0 --graphics=none \ --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/containers.ign" \ --disk="size=20,backing_store=${PWD}/fedora-coreos.qcow2" ``` -------------------------------- ### PXELINUX Configuration for Fedora CoreOS Installer Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This is an example pxelinux.cfg configuration file for booting the Fedora CoreOS installer images via PXELINUX. It specifies the kernel, initrd, and kernel arguments for the installation. ```bash DEFAULT pxeboot TIMEOUT 20 PROMPT 0 LABEL pxeboot KERNEL fedora-coreos-42.20250803.3.0-live-kernel-x86_64 APPEND initrd=fedora-coreos-42.20250803.3.0-live-initramfs.x86_64.img,fedora-coreos-42.20250803.3.0-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.ignition_url=http://192.168.1.101:8000/config.ign IPAPPEND 2 ``` -------------------------------- ### Start Fedora CoreOS VM with virt-install Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-services This command initiates a Fedora CoreOS virtual machine. It specifies the VM name, resources (vCPUs, RAM), OS variant, and uses an existing disk image. It also configures network connectivity, disables graphics, and provides a cloud-init configuration file for initial setup. ```bash virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \ --import --network=bridge=virbr0 --graphics=none \ --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/services.ign" \ --disk="size=20,backing_store=${PWD}/fedora-coreos.qcow2" ``` -------------------------------- ### Launching a Fedora CoreOS VM Instance Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aws This guide explains how to launch a virtual machine instance of Fedora CoreOS. It covers the prerequisites and steps involved in getting a Fedora CoreOS VM up and running. -------------------------------- ### PXELINUX Configuration for Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/live-booting This is an example `pxelinux.cfg` configuration file for booting Fedora CoreOS installer images using PXELINUX. It specifies the kernel, initrd, and Ignition configuration URL. ```bash DEFAULT pxeboot TIMEOUT 20 PROMPT 0 LABEL pxeboot KERNEL fedora-coreos-42.20250803.3.0-live-kernel-x86_64 APPEND initrd=fedora-coreos-42.20250803.3.0-live-initramfs.x86_64.img,fedora-coreos-42.20250803.3.0-live-rootfs.x86_64.img ignition.firstboot ignition.platform.id=metal ignition.config.url=http://192.168.1.101/config.ign IPAPPEND 2 ``` -------------------------------- ### Customized Fedora CoreOS Example Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aws This offers a more customized example for Fedora CoreOS configuration, demonstrating advanced options and settings. It allows users to tailor their Fedora CoreOS deployments beyond the minimal setup. -------------------------------- ### Start Fedora CoreOS VM with virt-install Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-autologin This command initiates a Fedora CoreOS virtual machine instance named 'fcos'. It specifies the number of vCPUs, RAM, OS variant, and uses an Ignition configuration file for setup. The command also configures networking and graphics, and utilizes a backing store for the disk image to preserve the original. ```bash virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \ --import --network=bridge=virbr0 --graphics=none \ --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/autologin.ign" \ --disk="size=20,backing_store=${PWD}/fedora-coreos.qcow2" ``` -------------------------------- ### Setup SELinux and Install Fedora CoreOS VM Source: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started This snippet demonstrates how to set the correct SELinux label for accessing configuration files and then uses `virt-install` to create and import a Fedora CoreOS virtual machine. It specifies connection details, VM name, resources, OS variant, disk image, and network configuration. ```bash chcon --verbose --type svirt_home_t ${IGNITION_CONFIG} virt-install --connect="qemu:///system" --name="${VM_NAME}" --vcpus="${VCPUS}" --memory="${RAM_MB}" \ --os-variant="fedora-coreos-$STREAM" --import --graphics=none \ --disk="size=${DISK_GB},backing_store=${IMAGE}" \ --network bridge=virbr0 "${IGNITION_DEVICE_ARG[@]}" ``` -------------------------------- ### Start Virtual Machine Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-proxmoxve Starts the specified virtual machine and waits for it to boot up. This is the initial step to bring the VM online. ```bash qm start ${VM_ID} ``` -------------------------------- ### Start Fedora CoreOS VM Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-virtualbox Starts a virtual machine instance. Ensure the VM_NAME variable is set to your instance's name before execution. ```bash VM_NAME=my-instance VBoxManage startvm "$VM_NAME" ``` -------------------------------- ### Download Fedora CoreOS QCOW2 Image for libvirt Source: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started This example demonstrates downloading the Fedora CoreOS QCOW2 image suitable for the QEMU platform using `coreos-installer`. It shows how to use `coreos-installer` both as an installed binary and as a container, specifying the stream and decompressing the image into the libvirt images directory. ```bash STREAM="stable" # as an installed binary: coreos-installer download -s $STREAM -p qemu -f qcow2.xz --decompress -C ~/.local/share/libvirt/images/ # or as a container: podman run --pull=always --rm -v "${HOME}/.local/share/libvirt/images/:/data" -w /data \ quay.io/coreos/coreos-installer:release download -s $STREAM -p qemu -f qcow2.xz --decompress ``` -------------------------------- ### Start Alibaba Cloud ECS Instance Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aliyun This command starts a stopped Alibaba Cloud ECS instance. It requires the Instance ID of the instance to be started. ```bash aliyun ecs StartInstance --region="${REGION}" --InstanceId="${INSTANCE_ID}" ``` -------------------------------- ### Get Podman Version and Info Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-autologin These commands display the version of Podman installed on the system and provide detailed information about the Podman installation, including its configuration and capabilities. This is essential for managing containers. ```bash podman version podman info ``` -------------------------------- ### Provision Fedora CoreOS on Vultr Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-vultr This section guides users through the process of provisioning Fedora CoreOS on Vultr. It covers the essential steps required to get Fedora CoreOS running on the Vultr platform, including setting up prerequisites, creating custom snapshots, and launching instances from these snapshots. ```markdown # Provisioning Fedora CoreOS on Vultr ``` -------------------------------- ### Provision Fedora CoreOS on Nutanix AHV Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-nutanix This section guides users through the process of provisioning Fedora CoreOS on Nutanix AHV. It covers the essential steps required to get Fedora CoreOS running within the Nutanix environment, from initial setup to launching a virtual machine. ```bash # Example command for uploading an image to Nutanix AHV (syntax may vary based on tools used) # Ensure you have the Nutanix CLI or API client installed and configured. # Example using Nutanix CLI: ncli image import --name "Fedora-CoreOS" --url "" --type "qcow2" ``` ```bash # Example command for launching a VM instance on Nutanix AHV (syntax may vary) # This is a conceptual example; actual parameters will depend on your specific configuration. # Example using Nutanix CLI: ncli vm create --name "fedora-coreos-vm" --vcpu 2 --memory 4096 --disk_size 20 --disk_type "SSD" --image "Fedora-CoreOS" --network "" --boot_order "cdrom,disk" ``` -------------------------------- ### Install with Network Configuration Copy Source: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration For manual bare metal installations, the `--copy-network` option for `coreos-installer install` copies NetworkManager connection files from `/etc/NetworkManager/system-connections/` to the installed system. This allows for flexible network configuration before installation using tools like `nmcli` or `nmtui`. ```bash coreos-installer install --copy-network ... ``` -------------------------------- ### Start and Check WireGuard Client Service Source: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-configure-wireguard This section details the commands to start the WireGuard service on the client and verify its status and configuration. It involves using `systemctl` to start `wg-quick@wg0.service` and then `wg show` and `ip a s wg0` to inspect the interface details, public/private keys, peer information, and IP addresses. ```bash sudo systemctl start wg-quick@wg0.service [root@wireguard-client ~]# wg show interface: wg0 public key: private key: (hidden) listening port: 51821 peer: preshared key: (hidden) endpoint: :51820 allowed ips: 192.168.71.0/24, fdc9:3c6b:21c7:e6bd::/64 [root@wireguard-client ~]# ip a s wg0 21: wg0: mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000 link/none inet 192.168.71.2/24 scope global wg0 valid_lft forever preferred_lft forever inet6 fdc9:3c6b:21c7:e6bd::2/64 scope global valid_lft forever preferred_lft forever ``` -------------------------------- ### Start Fedora CoreOS VM with virt-install Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-updates This command initiates a Fedora CoreOS virtual machine with specified resources (vCPUs, RAM), network configuration, and a custom ignition file for updates. It uses a backing store for the disk image. ```bash virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \ --import --network=bridge=virbr0 --graphics=none \ --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/updates.ign" \ --disk="size=20,backing_store=${PWD}/fedora-coreos-older.qcow2" ``` -------------------------------- ### Install Fedora CoreOS using coreos-installer Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This command installs Fedora CoreOS onto a specified device (e.g., /dev/sda) using the coreos-installer tool. It requires an Ignition configuration URL to provision the system. ```bash sudo coreos-installer install /dev/sda \ --ignition-url https://example.com/example.ign ``` -------------------------------- ### Install Fedora CoreOS (Bash) Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-raspberry-pi4 This command installs Fedora CoreOS onto a target disk using `coreos-installer`. It specifies the architecture, release stream, and an ignition configuration file. ```bash FCOSDISK=/dev/sdX STREAM="stable" # or `next` or `testing` sudo coreos-installer install -a aarch64 -s $STREAM -i config.ign $FCOSDISK ``` -------------------------------- ### Start a Systemd Service on First Boot in Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-services This guide explains how to create and enable a systemd service to run automatically on the first boot of Fedora CoreOS. It covers writing the service file, the Butane configuration for systemd units, and converting it to Ignition for deployment. ```systemd [Unit] Description=My First Boot Service [Service] Type=oneshot ExecStart=/usr/bin/echo "Hello from first boot!" [Install] WantedBy=multi-user.target ``` -------------------------------- ### Download CoreOS with coreos-installer Source: https://docs.fedoraproject.org/en-US/fedora-coreos/stream-metadata This snippet demonstrates how to use the `coreos-installer` command-line tool to download Fedora CoreOS. It's a common method for preparing installation media or fetching the OS image. ```bash sudo coreos-installer download -C /path/to/download/directory ``` -------------------------------- ### Generate Ignition Config with Butane Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-autologin This snippet demonstrates how to use Butane, a configuration transpiler, to generate an Ignition configuration file. Ignition is used for provisioning Fedora CoreOS machines. The example shows a basic configuration for setting a hostname and starting a service. ```yaml --- variant: fcos+ignition version: 1.0.0 passwd: users: - name: core ssh_authorized_keys: - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD... ``` -------------------------------- ### Install Butane via Scoop (Extras) Source: https://docs.fedoraproject.org/en-US/fedora-coreos/producing-ign Installs the Butane package on Windows systems using the Scoop package manager. It first adds the 'extras' bucket, which contains the Butane package, and then installs it. ```powershell scoop bucket add extras scoop install butane ``` -------------------------------- ### Install Docker CE on Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/docker-ce This section details how to install Docker CE on Fedora CoreOS, covering both installation on first boot and on a running system, as well as upgrading Docker CE. ```Bash # Installing Docker CE on first boot # This typically involves configuring the Ignition file to include Docker CE installation steps. # Installing Docker CE on a running system # This involves using rpm-ostree to overlay Docker CE. # Example command: # sudo rpm-ostree install docker-ce # Upgrading Docker CE # This involves updating the Docker CE package using rpm-ostree. # Example command: # sudo rpm-ostree upgrade docker-ce ``` -------------------------------- ### Install Fedora CoreOS using coreos-installer Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-raspberry-pi4 Installs Fedora CoreOS to a target disk using the `coreos-installer` command. It specifies the architecture, stream, an Ignition configuration file, and kernel arguments like `nomodeset` to work around potential display issues during boot. ```bash FCOSDISK=/dev/sdX STREAM=stable # or `next` or `testing` sudo coreos-installer install -a aarch64 -s $STREAM -i config.ign --append-karg nomodeset $FCOSDISK ``` -------------------------------- ### Install vfkit with Homebrew Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-applehv Installs the vfkit virtualization tool using the Homebrew package manager on macOS. ```bash brew install vfkit ``` -------------------------------- ### Running Containers with Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/running-containers This section details how to run containers on Fedora CoreOS. It covers the general process and provides examples for specific use cases like running etcd. ```General Running Containers * Introduction * Example configuration * Running etcd * For more information ``` -------------------------------- ### iPXE Boot Script for iSCSI Installation Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal An iPXE boot script that configures the iSCSI initiator IQN and initiates booting from an iSCSI target. This is used for diskless machines to connect to the Fedora CoreOS installation target. ```ipxe --- #!ipxe set initiator-iqn iqn.2023-11.coreos.diskless:testsetup sanboot iscsi:10.0.0.1::::iqn.2023-10.coreos.target.vm:coreos --- ``` -------------------------------- ### Launch systemd unit on boot Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-user-systemd-unit-on-boot This tutorial section focuses on launching a user-level systemd unit on boot within Fedora CoreOS. It covers the steps involved in setting up the systemd unit, writing the Butane configuration and converting it to Ignition, testing the setup, and performing cleanup. -------------------------------- ### Install CoreOS Tools via Fedora Packages Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-setup Installs the Butane, coreos-installer, and ignition-validate tools directly on a Fedora system using the DNF package manager. This method provides native access to these utilities. ```bash # Installing the tools sudo dnf install -y butane coreos-installer ignition-validate ``` -------------------------------- ### PXELINUX Configuration with Ignition Initrd Source: https://docs.fedoraproject.org/en-US/fedora-coreos/live-reference An example PXELINUX APPEND line demonstrating how to boot a Fedora CoreOS live system with multiple initrds, including the main initramfs, the rootfs, and a separate initrd containing the Ignition configuration. It also includes kernel arguments for Ignition. ```bash APPEND initrd=fedora-coreos-42.20250803.3.0-live-initramfs.x86_64.img,fedora-coreos-42.20250803.3.0-live-rootfs.x86_64.img,ignition.img ignition.firstboot ignition.platform.id=metal ``` -------------------------------- ### Install Butane via winget Source: https://docs.fedoraproject.org/en-US/fedora-coreos/producing-ign Installs the Butane package on Windows systems using the Windows Package Manager Client (winget). This command fetches and installs Butane from the winget repository. ```powershell winget install --id Fedora.CoreOS.butane ``` -------------------------------- ### Example: EC2 CLI for CoreOS deployment Source: https://docs.fedoraproject.org/en-US/fedora-coreos/stream-metadata This example illustrates how to use the Amazon EC2 command-line interface (CLI) to deploy Fedora CoreOS. It typically involves specifying the AMI ID, instance type, and other AWS-specific configurations. ```bash # Example command to launch an EC2 instance with Fedora CoreOS # Replace 'ami-xxxxxxxxxxxxxxxxx' with the actual Fedora CoreOS AMI ID for your region # Replace 't3.micro' with your desired instance type # Replace 'your-key-pair-name' with your EC2 key pair name # Replace 'subnet-xxxxxxxxxxxxxxxxx' with your subnet ID # Replace 'sg-xxxxxxxxxxxxxxxxx' with your security group ID aws ec2 run-instances \ --image-id ami-xxxxxxxxxxxxxxxxx \ --instance-type t3.micro \ --key-name your-key-pair-name \ --subnet-id subnet-xxxxxxxxxxxxxxxxx \ --security-group-ids sg-xxxxxxxxxxxxxxxxx \ --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=FedoraCoreOS-Instance}]' \ --user-data file://user-data.sh # Optional: for cloud-init configuration ``` -------------------------------- ### Launch Fedora CoreOS VM with Ignition Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-user-systemd-unit-on-boot This command sequence sets up and starts a Fedora CoreOS virtual machine using `virt-install`. It first applies the correct SELinux label to the Ignition file (`user.ign`) to ensure access, then launches the VM with specified resources, network configuration, and the Ignition config passed via QEMU's firmware config. ```bash # Setup the correct SELinux label to allow access to the config chcon --verbose --type svirt_home_t user.ign # Start a Fedora CoreOS virtual machine virt-install --name=fcos --vcpus=2 --ram=2048 --os-variant=fedora-coreos-stable \ --import --network=bridge=virbr0 --graphics=none \ --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=${PWD}/user.ign" \ --disk="size=20,backing_store=${PWD}/fedora-coreos.qcow2" ``` -------------------------------- ### Set up SSH Access and Start Containers on Boot Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-containers This section details how to configure Fedora CoreOS to enable SSH access for remote management and how to start containers automatically upon system boot. It covers essential steps for setting up a secure and functional containerized environment. ```bash # Example command to enable SSH access (requires Ignition configuration) sudo systemctl enable sshd # Example command to start a container on boot (using systemd service) # Create a systemd service file for your container # Example: /etc/systemd/system/my-container.service # [Unit] # Description=My Container Service # Requires=docker.service # After=docker.service # # [Service] # Restart=always # ExecStart=/usr/bin/podman run --name my-container-instance my-image # ExecStop=/usr/bin/podman stop my-container-instance # # [Install] # WantedBy=multi-user.target sudo systemctl enable my-container.service sudo systemctl start my-container.service ``` -------------------------------- ### Install vfkit with MacPorts Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-applehv Installs the vfkit virtualization tool using the MacPorts package manager on macOS. ```bash sudo port install vfkit ``` -------------------------------- ### Install Fedora CoreOS to iSCSI with Manual Configuration Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal Installs Fedora CoreOS to an iSCSI target with manual configuration of initiator and network root. This method is used when iBFT is not available or needs to be overridden. It specifies the target device, initiator IQN, network root, console, and an Ignition URL. ```bash sudo coreos-installer install \ /dev/disk/by-path/ip-10.0.0.1\:3260-iscsi-iqn.2023-10.coreos.target.vm\:coreos-lun-0 \ --append-karg rd.iscsi.initiator=iqn.2024-02.com.yourorg.name:lun0 \ --append-karg netroot=iscsi:iqn.2023-10.coreos.target.vm:coreos` \ --console ttyS0 \ --ignition-url https://example.com/example.ign ``` -------------------------------- ### Query Installed Fedora CoreOS Packages Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-autologin This command queries the system to list the installed versions of key Fedora CoreOS packages, including ignition, kernel, moby-engine, podman, systemd, rpm-ostree, and zincati. It helps in understanding the software composition of the OS. ```bash [core@tutorial ~]$ rpm -q ignition kernel moby-engine podman systemd rpm-ostree zincati ignition-2.15.0-3.fc38.x86_64 kernel-6.3.11-200.fc38.x86_64 moby-engine-20.10.23-1.fc38.x86_64 podman-4.5.1-1.fc38.x86_64 systemd-253.4-1.fc38.x86_64 rpm-ostree-2023.5-1.fc38.x86_64 zincati-0.0.25-4.fc38.x86_64 ``` -------------------------------- ### Booting Fedora CoreOS on Alibaba Cloud Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aliyun This section details the process of booting Fedora CoreOS on Alibaba Cloud. It covers prerequisites, downloading the Alibaba Cloud image, uploading it to Alibaba Cloud, creating a VSwitch, and launching an ECS instance. ```markdown Fedora CoreOS * Provisioning Machines * Booting on Alibaba Cloud __ __ __ ### Contents * Prerequisites * Downloading an Alibaba Cloud image * Uploading the image to Alibaba Cloud * Creating a VSwitch * Launching an ECS instance ``` -------------------------------- ### Install strace and trace toolbox utility Source: https://docs.fedoraproject.org/en-US/fedora-coreos/debugging-with-toolbox Inside the toolbox container, this command installs the 'strace' utility using the dnf package manager. It is then used to trace read syscalls made by the host's 'toolbox' utility, with host directories mounted at /run/host. ```shell sudo dnf install strace strace -eread /run/host/usr/bin/toolbox list ``` -------------------------------- ### PXELINUX APPEND Line with Network Initrd Source: https://docs.fedoraproject.org/en-US/fedora-coreos/live-reference An example PXELINUX APPEND line demonstrating how to include a custom network initrd image alongside the standard Fedora CoreOS initramfs and rootfs images. ```bash APPEND initrd=fedora-coreos-42.20250803.3.0-live-initramfs.x86_64.img,fedora-coreos-42.20250803.3.0-live-rootfs.x86_64.img,network.img ignition.firstboot ignition.platform.id=metal ``` -------------------------------- ### Customize Live ISO with NetworkManager Keyfile Source: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration Embed NetworkManager keyfiles directly into a live ISO or PXE image using the `--network-keyfile` option with `coreos-installer`. This configuration is applied in the initramfs before Ignition runs and can be forwarded to the installed system if automatic installation options are also used. ```bash coreos-installer iso customize --network-keyfile ... ``` ```bash coreos-installer pxe customize --network-keyfile ... ``` -------------------------------- ### Producing an Ignition File for Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aws This guide explains how to create an Ignition file, a crucial component for provisioning Fedora CoreOS. It covers the structure and content of Ignition files, which define the initial configuration of a system. -------------------------------- ### Download Fedora CoreOS PXE Images using Podman Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This command downloads the necessary Fedora CoreOS PXE kernel, initramfs, and rootfs images using Podman. It's a prerequisite for setting up a PXE installation. ```bash podman run --security-opt label=disable --pull=always --rm -v .:/data -w /data \ quay.io/coreos/coreos-installer:release download -f pxe ``` -------------------------------- ### Create public-ipv4.sh script Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-services This script fetches the public IPv4 address using icanhazip.com and writes it to a file in /etc/issue.d/ for display as a prelogin message. It's intended as an example for running services on boot. ```bash cat <<'EOF' > public-ipv4.sh #!/bin/bash echo "Detected Public IPv4: is $(curl https://ipv4.icanhazip.com)" > \ /etc/issue.d/50_public-ipv4.issue EOF ``` -------------------------------- ### Butane Config for Wi-Fi Enablement in Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-enabling-wifi This Butane configuration example demonstrates how to enable Wi-Fi on Fedora CoreOS during installation. It includes a systemd service to install the necessary NetworkManager-wifi and iwlwifi-dvm-firmware packages, and a NetworkManager connection profile for a guest Wi-Fi network. ```yaml variant: fcos version: 1.6.0 systemd: units: # Enable Wi-Fi in NetworkManager for an Intel wireless card - name: rpm-ostree-install-wifi.service enabled: true contents: | [Unit] Description=Enable Wi-Fi Wants=network-online.target After=network-online.target Before=zincati.service ConditionPathExists=!/var/lib/%N.stamp [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/rpm-ostree install -y --allow-inactive NetworkManager-wifi iwlwifi-dvm-firmware ExecStart=/bin/touch /var/lib/%N.stamp ExecStart=/bin/systemctl --no-block reboot [Install] WantedBy=multi-user.target storage: files: - path: /etc/NetworkManager/system-connections/wifi-guest.nmconnection mode: 0600 contents: inline: | [connection] id=wifi-guest type=wifi autoconnect=true [wifi] cloned-mac-address=permanent mode=infrastructure ssid=guest mac-address=ab:cd:01:02:03:04 [wifi-security] auth-alg=open key-mgmt=wpa-psk psk=PASSWORD [ipv4] method=auto ``` -------------------------------- ### Install FCOS via iPXE Boot Script Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This iPXE script fetches and loads Fedora CoreOS artifacts directly from Fedora infrastructure. It sets variables for the stream, version, installation device, configuration URL, and base URL for the FCOS build artifacts. The script then loads the kernel and initrd with specified kernel command-line arguments. ```ipxe #!ipxe set STREAM stable set VERSION 42.20250803.3.0 set INSTALLDEV /dev/sda set CONFIGURL https://example.com/config.ign set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64 kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel.x86_64 initrd=main coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img coreos.inst.install_dev=${INSTALLDEV} coreos.inst.ignition_url=${CONFIGURL} initrd --name main ${BASEURL}/fedora-coreos-${VERSION}-live-initramfs.x86_64.img boot ``` -------------------------------- ### Provision Fedora CoreOS on libvirt Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-libvirt This section details the process of provisioning Fedora CoreOS on a libvirt environment. It outlines the prerequisites and steps for launching a VM instance. ```markdown # Provisioning Fedora CoreOS on libvirt ``` -------------------------------- ### Prepare FCOS Disk with EDK2 Firmware (Bash) Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-raspberry-pi4 This script prepares a Fedora CoreOS disk by first installing FCOS using `coreos-installer`, then mounting its EFI partition to download and extract the EDK2 firmware. This is done from an alternate machine. ```bash FCOSDISK=/dev/sdX STREAM="stable" # or `next` or `testing` sudo coreos-installer install -a aarch64 -s $STREAM -i config.ign $FCOSDISK FCOSEFIPARTITION=$(lsblk $FCOSDISK -J -oLABEL,PATH | jq -r '.blockdevices[] | select(.label == "EFI-SYSTEM")'.path) mkdir /tmp/FCOSEFIpart sudo mount $FCOSEFIPARTITION /tmp/FCOSEFIpart pushd /tmp/FCOSEFIpart VERSION=v1.34 # use latest one from https://github.com/pftf/RPi4/releases sudo curl -LO https://github.com/pftf/RPi4/releases/download/${VERSION}/RPi4_UEFI_Firmware_${VERSION}.zip sudo unzip RPi4_UEFI_Firmware_${VERSION}.zip sudo rm RPi4_UEFI_Firmware_${VERSION}.zip popd sudo umount /tmp/FCOSEFIpart ``` -------------------------------- ### Launch Fedora CoreOS Server on Hetzner with Ignition Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-hetzner This example shows how to launch a Fedora CoreOS server on Hetzner Cloud. It dynamically retrieves the latest Fedora CoreOS image ID, specifies server details like datacenter and type, and includes a user data file containing the Ignition configuration. ```bash IMAGE_ID="$(hcloud image list \ --type=snapshot \ --selector=os=fedora-coreos \ --output json \ | jq -r '.[0].id')" SSH_KEY_NAME="fedora-coreos-hetzner" # See: hcloud ssh-key list DATACENTER="fsn1-dc14" # See: hcloud datacenter list TYPE="cx22" # See: hcloud server-type list NAME="fedora-coreos-test" IGNITION_CONFIG="./config.ign" hcloud server create \ --name "$NAME" \ --type "$TYPE" \ --datacenter "$DATACENTER" \ --image "$IMAGE_ID" \ --ssh-key "$SSH_KEY_NAME" \ --user-data-from-file "$IGNITION_CONFIG" ``` -------------------------------- ### Install FCOS using coreos-installer container Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This command uses the `coreos-installer` container to install Fedora CoreOS onto a specified block device (e.g., `/dev/vdb`). It mounts necessary host directories and passes an Ignition configuration file (`config.ign`) for system provisioning. The `--pull=always` flag ensures the latest container image is used. ```bash sudo podman run --pull=always --privileged --rm \ -v /dev:/dev -v /run/udev:/run/udev -v .:/data -w /data \ quay.io/coreos/coreos-installer:release \ install /dev/vdb -i config.ign ``` -------------------------------- ### Connect to Fedora CoreOS VM via SSH Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-containers After starting the Fedora CoreOS VM, you can connect to it using SSH. This involves disconnecting from the serial console and using the VM's IP address. The example shows the process of accepting the host key and logging in as the 'core' user. ```shell $ ssh core@192.168.124.119 The authenticity of host '192.168.124.119 (192.168.124.119)' can't be established. ED25519 key fingerprint is SHA256:oBAvj2kaKKKK++gnchTbxpp/iphvX6EHr0EynwXZ19c. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.124.119' (ED25519) to the list of known hosts. Fedora CoreOS 38.20230709.3.0 Tracker: https://github.com/coreos/fedora-coreos-tracker Discuss: https://discussion.fedoraproject.org/tag/coreos Last login: Thu Aug 3 18:18:06 2023 [systemd] Failed Units: 1 failure.service ``` -------------------------------- ### Provisioning Fedora CoreOS on Hetzner Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-hetzner This section outlines the steps for provisioning Fedora CoreOS on Hetzner cloud. It covers prerequisites, downloading the Fedora CoreOS image for Hetzner, creating a snapshot of the image, and finally launching a server instance with Fedora CoreOS. ```text Prerequisites Downloading an Hetzner image Creating a snapshot Launching a server ``` -------------------------------- ### Download OCI Image with coreos-installer Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-oraclecloud This command downloads and decompresses the latest Fedora CoreOS image for Oracle Cloud Infrastructure (OCI) in qcow2 format. It utilizes `podman` to run the `coreos-installer` tool, specifying the architecture, stream, and output format. Ensure you have `podman` and `jq` installed. ```bash ARCH="x86_64" # or "aarch64" STREAM="stable" # or "testing", "next" podman run --security-opt label=disable --pull=always --rm -v .:/data -w /data \ quay.io/coreos/coreos-installer:release download -s $STREAM -p oraclecloud -f qcow2.xz -a $ARCH --decompress ``` -------------------------------- ### Provisioning Fedora CoreOS on QEMU Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-qemu This section outlines the steps to provision Fedora CoreOS on QEMU. It covers the necessary prerequisites, how to boot a new virtual machine, fetch the QCOW2 disk image, configure the VM, and begin exploring the operating system. ```markdown # Provisioning Fedora CoreOS on QEMU ## Contents * Prerequisites * Booting a new VM on QEMU * Fetching the QCOW2 image * Setting up a new VM * Exploring the OS ``` -------------------------------- ### Manually Download Fedora CoreOS Image Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-setup Manually downloads the Fedora CoreOS image and its signature file using `curl`. This method is useful when container or package installations are not feasible. ```bash RELEASE="42.20250803.3.0" curl -O https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${RELEASE}/x86_64/fedora-coreos-${RELEASE}-qemu.x86_64.qcow2.xz curl -O https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${RELEASE}/x86_64/fedora-coreos-${RELEASE}-qemu.x86_64.qcow2.xz.sig ``` -------------------------------- ### Enable Wi-Fi on Fedora CoreOS Source: https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-enabling-wifi Instructions for enabling Wi-Fi on Fedora CoreOS, including steps for adding Wi-Fi tools and firmware, configuring during installation, and setting it up on an existing system. ```markdown # Enabling Wi-Fi ## Contents * Adding Wi-Fi tools and firmware * When installing Fedora CoreOS * On an existing Fedora CoreOS system ``` -------------------------------- ### Download Fedora CoreOS Image for QEMU Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-libvirt Fetches the latest Fedora CoreOS image suitable for the QEMU platform using `coreos-installer`. This can be done either as an installed binary or via a Podman container. The image is decompressed and saved to a specified directory. ```bash STREAM="stable" # as an installed binary: coreos-installer download -s $STREAM -p qemu -f qcow2.xz --decompress -C ~/.local/share/libvirt/images/ # or as a container: podman run --pull=always --rm -v "${HOME}/.local/share/libvirt/images/:/data" -w /data \ quay.io/coreos/coreos-installer:release download -s $STREAM -p qemu -f qcow2.xz --decompress ``` -------------------------------- ### Enable User systemd Service with Butane Source: https://docs.fedoraproject.org/en-US/fedora-coreos/tutorial-user-systemd-unit-on-boot This Butane configuration creates the necessary directory structure and a symbolic link to enable a user-level systemd service for the 'sleeper' user. It ensures the 'linger-example.service' is linked to the default target's wants directory, allowing it to start on boot. ```yaml variant: fcos version: 1.6.0 storage: directories: - path: /home/sleeper/.config/systemd/user/default.target.wants mode: 0755 user: name: sleeper group: name: sleeper links: - path: /home/sleeper/.config/systemd/user/default.target.wants/linger-example.service user: name: sleeper group: name: sleeper target: /home/sleeper/.config/systemd/user/linger-example.service hard: false ``` -------------------------------- ### Customize FCOS ISO for installation Source: https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal This command customizes a Fedora CoreOS live ISO image for unattended installation. It specifies the destination device (`/dev/sda`), the Ignition configuration file (`config.ign`), console settings, network configuration, trusted CA certificate, and a post-installation script (`post.sh`). The output is a customized ISO file named `custom.iso`. ```bash # Create customized.iso which: # - Automatically installs to /dev/sda # - Provisions the installed system with config.ign # - Configures the installed GRUB and kernel to use a primary graphical # and secondary serial console # - Uses network configuration from static-ip.nmconnection # - Trusts HTTPS certificates signed by ca.pem # - Runs post.sh after installing coreos-installer iso customize \ --dest-device /dev/sda \ --dest-ignition config.ign \ --dest-console ttyS0,115200n8 \ --dest-console tty0 \ --network-keyfile static-ip.nmconnection \ --ignition-ca ca.pem \ --post-install post.sh \ -o custom.iso fedora-coreos-42.20250803.3.0-live.x86_64.iso ``` -------------------------------- ### Booting Fedora CoreOS on Oracle Cloud Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-oraclecloud This section details the process of booting Fedora CoreOS on Oracle Cloud Infrastructure. It covers prerequisites, downloading the OCI image, uploading it to OCI, and launching an instance. ```markdown Fedora CoreOS * Provisioning Machines * Booting on Oracle Cloud ### Contents * Prerequisites * Downloading an Oracle Cloud Infrastructure image * Uploading the image to Oracle Cloud Infrastructure * Launching an instance ``` -------------------------------- ### Enable kdump service using systemctl Source: https://docs.fedoraproject.org/en-US/fedora-coreos/debugging-kernel-crashes This command enables the `kdump.service` using `systemctl`, ensuring that kdump starts automatically on boot. This is part of the post-provisioning configuration. ```bash sudo systemctl enable kdump.service ``` -------------------------------- ### Connect to Fedora CoreOS Instance via SSH Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-aws This example shows how to connect to a newly launched Fedora CoreOS instance using SSH. It assumes you have the instance's IP address and are using the default 'core' user. ```bash ssh core@ ``` -------------------------------- ### Create Exoscale VM Instance with FCOS Template Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-exoscale This command creates a new Fedora CoreOS virtual machine instance on Exoscale. It specifies the instance name, type, disk size, the registered SSH key, the custom FCOS template (marked as private), and a path to an Ignition configuration file for initial setup. ```bash NAME='worker' TYPE='standard.medium' DISK='10' # in GiB SSHKEY='key-name' TEMPLATE=$TEMPLATE # template name set aboveexo compute instance create "${NAME}" \ --disk-size $DISK \ --ssh-key "${SSHKEY}" \ --template $TEMPLATE \ --template-visibility private \ --cloud-init "path/to/ignition-file.ign" ``` -------------------------------- ### Provisioning Fedora CoreOS on Exoscale Source: https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-exoscale This section details the process of setting up Fedora CoreOS on Exoscale. It includes prerequisites, uploading the FCOS image as a custom template, and launching a virtual machine instance. ```markdown # Provisioning Fedora CoreOS on Exoscale * Prerequisites * Uploading an FCOS image as a custom Template * Launching a VM instance ``` -------------------------------- ### Signing Keys and Updates Source: https://docs.fedoraproject.org/en-US/fedora-coreos/update-barrier-signing-keys This section details the process of signing keys and managing update barriers for Fedora CoreOS. It provides examples related to key rotation and ensuring secure updates. ```text Keys rotation and update barriers Example ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.