Skip to content

Add CentOS CoreOS (SCOS) & Red Hat Linux CoreOS (RHCOS)#1674

Merged
antonym merged 1 commit intonetbootxyz:developmentfrom
CrAazZyMaN21:development
Apr 19, 2026
Merged

Add CentOS CoreOS (SCOS) & Red Hat Linux CoreOS (RHCOS)#1674
antonym merged 1 commit intonetbootxyz:developmentfrom
CrAazZyMaN21:development

Conversation

@CrAazZyMaN21
Copy link
Copy Markdown
Contributor

Solves #1553

Also adding CentOS CoreOS for the OKD project 😃

@CrAazZyMaN21 CrAazZyMaN21 force-pushed the development branch 2 times, most recently from 9985e79 to 11ef6a7 Compare September 12, 2025 20:45
@CrAazZyMaN21 CrAazZyMaN21 marked this pull request as draft September 12, 2025 20:52
@CrAazZyMaN21 CrAazZyMaN21 force-pushed the development branch 2 times, most recently from 8ff37bc to 9bac5d2 Compare September 12, 2025 20:59
@CrAazZyMaN21 CrAazZyMaN21 marked this pull request as ready for review September 12, 2025 21:05
@antonym
Copy link
Copy Markdown
Member

antonym commented Sep 12, 2025

@claude review

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Sep 12, 2025

Claude finished @antonym's task —— View job


Code Review: Add CentOS CoreOS & Red Hat Linux CoreOS

I've reviewed PR #1674 which adds support for CentOS CoreOS and Red Hat Linux CoreOS. Here's my comprehensive analysis:

Positive Aspects

  1. Addresses Valid Need: The PR solves issue [Request] RedHat CoreOS (RHCOS) for OpenShift PXE Boot #1553 and adds support for two important CoreOS variants used in enterprise environments
  2. Follows Existing Patterns: The implementation appears to follow the established pattern used by Fedora CoreOS
  3. Appropriate File Structure: New template files follow the naming convention (centos-coreos.ipxe.j2, rhcos.ipxe.j2)

⚠️ Areas for Review & Potential Issues

1. Configuration Structure Concerns
Based on the existing CoreOS configuration in roles/netbootxyz/defaults/main.yml:191-203, I notice:

  • The Fedora CoreOS configuration has specific base_dir, mirror, and versioning structure
  • Need to ensure CentOS CoreOS and RHCOS have appropriate configuration entries with:
    • Proper mirror URLs and base directories
    • Correct versioning scheme
    • Appropriate naming conventions

2. Template File Consistency
From examining the existing coreos.ipxe.j2 template, the new templates should:

  • Follow the same parameter structure (install_device, ignition_url)
  • Use consistent variable naming and menu structure
  • Handle architecture detection properly (x86_64 vs aarch64)
  • Include proper error handling and exit paths

3. README Integration
The README.md should be updated to include:

  • CentOS CoreOS entry in the Operating Systems table (around line 138 where Fedora CoreOS is listed)
  • Red Hat CoreOS entry with appropriate URL references
  • Consistent formatting with existing entries

4. Missing Configuration Verification
Since I cannot access the actual PR files due to branch access limitations, I recommend verifying:

For main.yml additions:

releases:
  centos-coreos:
    base_dir: [appropriate path]
    enabled: true
    menu: linux
    mirror: [official CentOS CoreOS mirror]
    name: CentOS CoreOS
    versions:
    - code_name: [version]
      name: [display name]
  
  rhcos:
    base_dir: [appropriate path] 
    enabled: true
    menu: linux
    mirror: [official RHCOS mirror]
    name: Red Hat CoreOS
    versions:
    - code_name: [version]
      name: [display name]

For template files:

  • Ensure URL patterns match official distribution methods
  • Verify kernel/initrd/rootfs URL structures
  • Test ignition config integration
  • Validate install device handling

🔍 Recommendations

  1. Verify Mirror URLs: Ensure the mirror URLs point to official, stable sources
  2. Test Boot Process: Validate that the boot process works with real hardware/VMs
  3. Documentation: Consider adding usage examples or links to official documentation
  4. Versioning Strategy: Ensure the versioning scheme aligns with upstream release patterns

📝 Final Assessment

The PR appears to be a solid addition that follows established patterns. However, without access to the actual implementation details, I recommend:

  1. Manual testing of the boot sequences
  2. Verification of mirror URL stability and availability
  3. Ensuring the configuration aligns with official CoreOS installation methods

Once these items are confirmed, this should be a valuable addition to netboot.xyz's distribution support.


@CrAazZyMaN21
Copy link
Copy Markdown
Contributor Author

Hi, I tried to find the issue why the Build PR Pipeline failed but I can't seem to find it. I am guessing the file name "centos-coreos.ipxe.j2" is not suitable and should be changed to e.g "scos.ipxe.j2"

@CrAazZyMaN21 CrAazZyMaN21 changed the title Add CentOS CoreOS & Red Hat Linux CoreOS Add CentOS CoreOS (SCOS) & Red Hat Linux CoreOS (RHCOS) Sep 15, 2025
@CrAazZyMaN21
Copy link
Copy Markdown
Contributor Author

@antonym Can you please let the workflow run again. I think it is fixed now and I squashed the commits.

@CrAazZyMaN21 CrAazZyMaN21 force-pushed the development branch 3 times, most recently from 2130856 to 4da58ab Compare November 9, 2025 14:08
@CrAazZyMaN21
Copy link
Copy Markdown
Contributor Author

  • Added RHCOS 4.20
  • Moved RHCOS 4.18 to Maintenance Support

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for two CoreOS variants to netboot.xyz: CentOS Stream CoreOS (SCOS) for the OKD project and Red Hat Enterprise Linux CoreOS (RHCOS) for OpenShift deployments. Both operating systems are designed for container-focused workloads and use the CoreOS installer framework with Ignition configuration.

Key Changes:

  • Added iPXE boot menu templates for SCOS and RHCOS with support for interactive installation device and Ignition config URL configuration
  • Added release configurations with version definitions and mirror URLs for both operating systems
  • Updated README documentation to include both new OS entries in the supported operating systems table

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
roles/netbootxyz/templates/menu/scos.ipxe.j2 New iPXE menu template for CentOS Stream CoreOS with multi-version support and configurable installation parameters
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 New iPXE menu template for Red Hat Enterprise Linux CoreOS with OpenShift version support
roles/netbootxyz/defaults/main.yml Added configuration entries for both RHCOS (versions 4.12-4.20) and SCOS (versions 9.x and 10.x) with mirror URLs and version metadata
README.md Added documentation entries for both CoreOS variants in the operating systems compatibility table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


:install_dev
echo -n Selected install device will be overwritten,
echo -n please ensure you know what are you doing...
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar issue: "ensure you know what are you doing" should be "ensure you know what you are doing" (remove "are" before "you").

Suggested change
echo -n please ensure you know what are you doing...
echo -n please ensure you know what you are doing...

Copilot uses AI. Check for mistakes.

:install_dev
echo -n Selected install device will be overwritten,
echo -n please ensure you know what are you doing...
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar issue: "ensure you know what are you doing" should be "ensure you know what you are doing" (remove "are" before "you").

Suggested change
echo -n please ensure you know what are you doing...
echo -n please ensure you know what you are doing...

Copilot uses AI. Check for mistakes.
{% for item in releases.rhcos.versions %}
iseq ${core_version} {{ item.code_name }} ||
{% endfor %}
set base_url ${rhcos_mirror}/${os_arch}/dependencies/rhcos
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base_url construction doesn't use the rhcos_base_dir variable that is defined in the configuration (set to "pub/openshift-v4"). The URL path should likely include this base directory. Based on the configuration, consider whether the URL should be ${rhcos_mirror}/${rhcos_base_dir}/${os_arch}/dependencies/rhcos instead of ${rhcos_mirror}/${os_arch}/dependencies/rhcos, or if the base_dir configuration needs to be adjusted to match the actual URL structure.

Suggested change
set base_url ${rhcos_mirror}/${os_arch}/dependencies/rhcos
set base_url ${rhcos_mirror}/${rhcos_base_dir}/${os_arch}/dependencies/rhcos

Copilot uses AI. Check for mistakes.

:rhcos_boot
{% for item in releases.rhcos.versions %}
iseq ${core_version} {{ item.code_name }} ||
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name is incorrect. This line uses ${core_version} but should use ${rhcos_version} to match the variable set on line 23 and used throughout the rest of the file. This will cause the version comparison to fail since core_version is never set in this template.

Suggested change
iseq ${core_version} {{ item.code_name }} ||
iseq ${rhcos_version} {{ item.code_name }} ||

Copilot uses AI. Check for mistakes.
Comment thread roles/netbootxyz/templates/menu/rhcos.ipxe.j2
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread roles/netbootxyz/defaults/main.yml
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Feb 22, 2026

Code Review Summary

Status: 7 Issues Found (2 UPDATED) | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 4
WARNING 3
SUGGESTION 0

🔴 Critical Issues in Latest Update

Severity File Line Issue
CRITICAL roles/netbootxyz/templates/menu/rhcos.ipxe.j2 14 Invalid default value: install_device set to literal string "unset" will cause CoreOS installer to fail
CRITICAL roles/netbootxyz/templates/menu/scos.ipxe.j2 14 Invalid default value: install_device set to literal string "unset" will cause CoreOS installer to fail

Note: The previous circular reference bug on line 14 was addressed, but the fix introduced a new issue. The value "unset" is passed to the kernel parameter coreos.inst.install_dev=unset, but the CoreOS installer expects a valid device path like /dev/sda.

All Issue Details (click to expand)

CRITICAL (4 issues)

File Line Issue
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 14 Invalid default: install_device set to "unset" instead of valid device path
roles/netbootxyz/templates/menu/scos.ipxe.j2 14 Invalid default: install_device set to "unset" instead of valid device path
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 34 Missing slash separator between ${rhcos_base_dir} and ${rhcos_major_version} in base_url construction
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 32 Variable name inconsistency: Loop checks ${rhcos_version} but sets rhcos_major_version (confusing pattern)

WARNING (3 issues)

File Line Issue
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 44 Grammar: "ensure you know what are you doing" should be "ensure you know what you are doing"
roles/netbootxyz/templates/menu/scos.ipxe.j2 44 Grammar: "ensure you know what are you doing" should be "ensure you know what you are doing"
roles/netbootxyz/templates/menu/rhcos.ipxe.j2 32-33 Version matching loop doesn't break after finding match (inefficient)
Files Reviewed (4 files)
  • README.md - Table formatting and naming correction ✅
  • roles/netbootxyz/defaults/main.yml - Configuration additions (no issues in changes)
  • roles/netbootxyz/templates/menu/rhcos.ipxe.j2 - 4 issues (line 14 updated with new problem)
  • roles/netbootxyz/templates/menu/scos.ipxe.j2 - 3 issues (line 14 updated with new problem)

Fix these issues in Kilo Cloud


Reviewed by claude-4.5-sonnet-20250929 · 361,585 tokens

@CrAazZyMaN21 CrAazZyMaN21 force-pushed the development branch 2 times, most recently from 3f60279 to a5a1f8c Compare March 4, 2026 22:25
@CrAazZyMaN21
Copy link
Copy Markdown
Contributor Author

@antonym I guess I resolved all tasks. Do you need anything else?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to +15
isset ${install_device} || set install_device /dev/sda
isset ${ignition_url} || set ignition_url skip
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_device defaults to /dev/sda, and the kernel line always includes coreos.inst.install_dev=${install_device}. That means selecting SCOS can immediately start an automated install targeting /dev/sda without the user explicitly choosing a disk, which is a high risk for accidental data loss. Consider defaulting to a non-installing sentinel (e.g., unset, as done in coreos.ipxe.j2) and/or gating scos_boot until the user has explicitly set a real install device.

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +15
isset ${install_device} || set install_device /dev/sda
isset ${ignition_url} || set ignition_url skip
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

install_device defaults to /dev/sda, and the boot path always passes coreos.inst.install_dev=${install_device}. This can trigger an unattended install onto /dev/sda as soon as RHCOS is selected, which is a high risk for accidental disk overwrite. Suggest defaulting to a non-installing value (matching roles/netbootxyz/templates/menu/coreos.ipxe.j2, which uses unset) and/or requiring explicit selection/confirmation of the target disk before proceeding to rhcos_boot.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
#!ipxe

# CentOS Stream CoreOS (SCOS)
# https://www.centos.org/cloud/
# https://github.com/coreos/coreos-installer/blob/master/README.md#installing-from-pxe
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This template appears to contain CRLF line endings (visible as stray \r characters in labels/lines). Please normalize it to LF to match the rest of the menu templates and avoid any iPXE parsing/label-matching edge cases.

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
| Bodhi Linux | https://www.bodhilinux.com | No | Yes |
| CachyOS | https://cachyos.org | No | Yes |
| CentOS | https://centos.org | Yes | No |
| CentOS CoreOS | https://centos.org | Yes | No |
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README entry says "CentOS CoreOS", but the implementation/config uses "CentOS Stream CoreOS (SCOS)". For accuracy and consistency with the menu name, consider updating the README row to "CentOS Stream CoreOS".

Suggested change
| CentOS CoreOS | https://centos.org | Yes | No |
| CentOS Stream CoreOS | https://centos.org | Yes | No |

Copilot uses AI. Check for mistakes.
set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch x86_64 ||
iseq ${os_arch} arm64 && set os_arch aarch64 ||
isset ${install_device} || set install_device ${install_device}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Circular reference bug - variable set to itself

This line creates a circular reference: isset ${install_device} || set install_device ${install_device}. If install_device is NOT set, this attempts to set it to ${install_device} (which is empty/undefined), rather than providing a default value.

Suggested change
isset ${install_device} || set install_device ${install_device}
isset ${install_device} || set install_device /dev/sda

This should use a concrete default value like /dev/sda as it did before.

set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch x86_64 ||
iseq ${os_arch} arm64 && set os_arch aarch64 ||
isset ${install_device} || set install_device ${install_device}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Circular reference bug - variable set to itself

This line creates a circular reference: isset ${install_device} || set install_device ${install_device}. If install_device is NOT set, this attempts to set it to ${install_device} (which is empty/undefined), rather than providing a default value.

Suggested change
isset ${install_device} || set install_device ${install_device}
isset ${install_device} || set install_device /dev/sda

This should use a concrete default value like /dev/sda as it did before.

set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch x86_64 ||
iseq ${os_arch} arm64 && set os_arch aarch64 ||
isset ${install_device} || set install_device unset
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Invalid default value - will cause installation to fail

Setting install_device to the literal string "unset" will cause the CoreOS installer to fail. The kernel parameter coreos.inst.install_dev=unset (line 37) will be passed to the installer, which expects a valid device path like /dev/sda, /dev/vda, or /dev/nvme0n1.

Suggested change
isset ${install_device} || set install_device unset
isset ${install_device} || set install_device /dev/sda

Recommendation: Use a sensible default device path, or require users to explicitly set this value before installation.

set os_arch ${arch}
iseq ${os_arch} x86_64 && set os_arch x86_64 ||
iseq ${os_arch} arm64 && set os_arch aarch64 ||
isset ${install_device} || set install_device unset
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Invalid default value - will cause installation to fail

Setting install_device to the literal string "unset" will cause the CoreOS installer to fail. The kernel parameter coreos.inst.install_dev=unset (line 37) will be passed to the installer, which expects a valid device path like /dev/sda, /dev/vda, or /dev/nvme0n1.

Suggested change
isset ${install_device} || set install_device unset
isset ${install_device} || set install_device /dev/sda

Recommendation: Use a sensible default device path, or require users to explicitly set this value before installation.

@CrAazZyMaN21
Copy link
Copy Markdown
Contributor Author

Yeah, the PR is completed. I don't run circles for AI :D

Copy link
Copy Markdown

@asdat3 asdat3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antonym
Copy link
Copy Markdown
Member

antonym commented Apr 19, 2026

Should have enough here to test in the dev branch, approved. Thanks!

@antonym antonym merged commit f2fd6a0 into netbootxyz:development Apr 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants