Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions rhel-10.1-installer
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ FROM registry.redhat.io/rhel10/rhel-bootc:10.1

ARG TARGETARCH

# NOTE: bootc containers are shipped with empty /boot. While these images are created,
# /boot is moved to /usr/lib/bootupd/updates by bootupd. When bootc install is
# run to create a disk image, it calls bootupd that unpacks /usr/lib/bootupd/updates
# back into /boot/efi.
#
# For the installer ISO image, we need the /boot to be populated, to fulfill the
# container-native ISO contract (https://github.com/ondrejbudai/bootc-isos#container-native-iso-contract-v010).
#
# Reinstall shim-x64 to ensure that required files are not missing from /boot/efi/EFI
#
# This will have to change later due to https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1
RUN dnf reinstall -y \
shim-x64 \
&& dnf clean all

# Packages needed for Anaconda; and build dependencies
RUN dnf install -y \
anaconda \
Expand All @@ -23,24 +38,21 @@ RUN dnf install -y \
squashfs-tools \
&& dnf clean all

# XXX: https://github.com/osbuild/bootc-foundry/issues/50
#RUN mkdir -p /boot/efi \
# && cp -rva /usr/lib/efi/*/*/EFI /boot/efi


RUN mkdir -p /usr/lib/image-builder/bootc

COPY <<EOT /usr/lib/image-builder/bootc/iso.yaml
label: "CentOS-Stream-10-bootc-Installer"
label: "RHEL-10.1-bootc-Installer"
grub2:
entries:
- name: "Install CentOS Stream 10 (bootc)"
linux: "/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS-Stream-10-bootc-Installer console=tty0 inst.graphical selinux=0 rhgb quiet"
- name: "Install RHEL 10.1 (bootc)"
linux: "/images/pxeboot/vmlinuz inst.stage2=hd:LABEL=RHEL-10.1-bootc-Installer console=tty0 inst.graphical selinux=0 rhgb quiet"
initrd: "/images/pxeboot/initrd.img"
EOT

COPY <<EOT /usr/share/anaconda/interactive-defaults.ks
bootc --source-imgref registry:quay.io/centos-bootc/centos-bootc:stream10 --target-imgref quay.io/centos-bootc/centos-bootc:stream10
# NOTE: the bootc command is available only in RHEL-10.2+
#bootc --source-imgref local-storage://quay.io/redhat-services-prod/insights-management-tenant/image-builder-bootc-foundry/rhel-10.1-qcow2:latest
ostreecontainer --url=quay.io/redhat-services-prod/insights-management-tenant/image-builder-bootc-foundry/rhel-10.1-qcow2 --transport=containers-storage --no-signature-verification
EOT

RUN echo "install:x:0:0:root:/root:/usr/libexec/anaconda/run-anaconda" >> /etc/passwd && \
Expand Down
Loading