Almalinux9 is not working

O.K. What is the evaluated template for the host you are trying to install and what is the exact errors you get?

I have tried with below default template which is creating kickstart image successfully but while installing os which is not working for almalinux9 whereas Centos 7 successfully installed using below default template.
Please suggest me whether below default template will work alma Linux 8, 9 ?

<%#
kind: provision
name: Kickstart default
model: ProvisioningTemplate
oses:
- AlmaLinux
- CentOS
- CentOS_Stream
- Fedora
- RedHat
- Rocky
test_on:
- host4dhcp
- host6dhcp
- host4and6dhcp
- host4static
- host6static
description: |
  The provisioning template for kickstart based distributions. The output is fetched by Anaconda installer during
  the network based installation. To customize the installation, modify the host parameters.

  This template accepts the following parameters:
  - lang: string (default="en_US.UTF-8")
  - selinux-mode: string (default="enforcing")
  - keyboard: string (default="us")
  - time-zone: string (default="UTC")
  - http-proxy: string (default="")
  - http-proxy-port: string (default="")
  - force-puppet: boolean (default=false)
  - enable-epel: boolean (default=false)
  - enable-puppetlabs-repo: boolean (default=false)
  - enable-puppetlabs-puppet5-repo: boolean (default=false)
  - enable-puppetlabs-puppet6-repo: boolean (default=false)
  - skip-puppet-setup: boolean (default=false)
  - salt_master: string (default=undef)
  - ntp-server: string (default=undef)
  - bootloader-append: string (default="nofb quiet splash=quiet")
  - disable-firewall: boolean (default=false)
  - package_upgrade: boolean (default=true)
  - disable-uek: boolean (default=false)
  - use-ntp: boolean (default depends on OS release)
  - fips_enabled: boolean (default=false)
  - encrypt_grub: boolean (default=false)

  Reference links:
  - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s1-kickstart2-options
  - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax
  - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user
-%>
# This kickstart file was rendered from the Foreman provisioning template "<%= @template_name %>".

<%
  rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name != 'Fedora'
  is_fedora = @host.operatingsystem.name == 'Fedora'
  os_major = @host.operatingsystem.major.to_i
  os_minor = @host.operatingsystem.minor.to_i
  realm_compatible = (@host.operatingsystem.name == 'Fedora' && os_major >= 20) || (rhel_compatible && os_major >= 7)
  # safemode renderer does not support unary negation
  proxy_uri = host_param('http-proxy') ? "http://#{host_param('http-proxy')}:#{host_param('http-proxy-port')}" : nil
  proxy_string = proxy_uri ? " --proxy=#{proxy_uri}" : ''
  puppet_enabled = !host_param_true?('skip-puppet-setup') && (host_puppet_server.present? || host_param_true?('force-puppet'))
  salt_enabled = host_param('salt_master') ? true : false
  chef_enabled = @host.respond_to?(:chef_proxy) && @host.chef_proxy
  section_end = (rhel_compatible && os_major <= 5) ? '' : '%end'
  use_ntp = host_param_true?('use-ntp', (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 7))
  iface = @host.provision_interface
  appstream_present = false
-%>

<% if (is_fedora && os_major < 29) || (rhel_compatible && os_major <= 7) -%>
install
<% end -%>
<%
if host_param('kickstart_liveimg')
  img_name = host_param('kickstart_liveimg')
  liveimg_url = if host_param('kt_activation_keys')
    repository_url(img_name, 'isos')
  else
    if img_name.match(%r|^([\w\-\+]+)://|)
      img_name
    else
      "#{medium_uri}/#{img_name}"
    end
  end
%>
liveimg --url=<%= liveimg_url %> <%= proxy_string %>
<% else %>
<%= @mediapath %><%= proxy_string %>
<% @additional_media.each do |medium| -%>
repo --name <%= medium[:name] %> --baseurl <%= medium[:url] %> <%= medium[:install] ? ' --install' : '' %><%= proxy_string %>
<% end -%>
<%= snippet_if_exists(template_name + " custom repositories") %>
<% end %>
lang <%= host_param('lang') || 'en_US.UTF-8' %>
selinux --<%= host_param('selinux-mode') || host_param('selinux') || 'enforcing' %>
keyboard <%= host_param('keyboard') || 'us' %>
skipx

<%
  network_options = []
  nameservers = []
  subnet4 = iface.subnet
  subnet6 = iface.subnet6

  # device and hostname
  if iface.bond? && rhel_compatible && os_major >= 6
    network_options.push("--device=#{iface.identifier}")
  else
    network_options.push("--device=#{iface.mac || iface.identifier}")
  end
  network_options.push("--hostname #{@host.name}")

  # single stack
  if subnet4 && !subnet6
    network_options.push("--noipv6")
  elsif !subnet4 && subnet6
    network_options.push("--noipv4")
  end

  # dual stack MTU check
  raise("IPv4 and IPv6 subnets have different MTU") if subnet4 && subnet6 && subnet4.mtu.present? && subnet6.mtu.present? && subnet4.mtu != subnet6.mtu

  # IPv4
  if (subnet4 && !subnet4.dhcp_boot_mode?) || @static
    network_options.push("--bootproto static")
    network_options.push("--ip=#{iface.ip}")
    network_options.push("--netmask=#{subnet4.mask}")
    network_options.push("--gateway=#{subnet4.gateway}")
  elsif subnet4 && subnet4.dhcp_boot_mode?
    network_options.push("--bootproto dhcp")
  end
  if subnet4
    nameservers.concat(subnet4.dns_servers)
    network_options.push("--mtu=#{subnet4.mtu}") if subnet4.mtu.present?
  end

  # IPv6
  if rhel_compatible && os_major >= 6
    if (subnet6 && !subnet6.dhcp_boot_mode?) || @static6
      network_options.push("--ipv6=#{iface.ip6}/#{subnet6.cidr}")
      network_options.push("--ipv6gateway=#{subnet6.gateway}")
    elsif subnet6 && subnet6.dhcp_boot_mode?
      if host_param_true?('use-slaac')
        network_options.push("--ipv6 auto")
      else
        network_options.push("--ipv6 dhcp")
      end
    end
    if subnet6
      nameservers.concat(subnet6.dns_servers)
      network_options.push("--mtu=#{subnet6.mtu}") if subnet6.mtu.present?
    end
  end

  # bond
  if iface.bond? && rhel_compatible && os_major >= 6
    bond_slaves = iface.attached_devices_identifiers.join(',')
    network_options.push("--bondslaves=#{bond_slaves}")
    network_options.push("--bondopts=mode=#{iface.mode},#{iface.bond_options.tr(' ', ',')}")
  end

  # VLAN (only on physical is recognized)
  if iface.virtual? && iface.tag.present? && iface.attached_to.present?
    if rhel_compatible && os_major == 6
      network_options.push("--vlanid=#{iface.tag}")
    else
      network_options.push("--interfacename=vlan#{iface.tag}")
    end
  end

  # DNS
  if nameservers.size > 0
    network_options.push("--nameserver=#{nameservers.join(',')}")
  else
    network_options.push("--nodns")
  end
-%>
network <%= network_options.join(' ') %>

rootpw --iscrypted <%= root_pass %>
<% if host_param_true?('disable-firewall') -%>
firewall --disable
<% else -%>
firewall --<%= os_major >= 6 ? 'service=' : '' %>ssh
<% end -%>
<% if (is_fedora && os_major >= 28) || (rhel_compatible && os_major > 7) -%>
authselect --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downcase || 'sha256' %> --kickstart
<% else -%>
authconfig --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downcase || 'sha256' %> --kickstart
<% end -%>
timezone --utc <%= host_param('time-zone') || 'UTC' %> <%= host_param('ntp-server') ? "--ntpservers #{host_param('ntp-server')}" : '' %>

<% if rhel_compatible -%>
services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd
<% end -%>

<% if realm_compatible && host_enc['parameters']['realm'] && @host.realm && @host.realm.realm_type == 'Active Directory' -%>
# One-time password will be requested at install time. Otherwise, $HOST[OTP] is used as a placeholder value.
realm join --one-time-password='<%= @host.otp || "$HOST[OTP]" %>' <%= @host.realm %>
<% end -%>

<% if @host.operatingsystem.name == 'OracleLinux' && os_major == 7 && os_minor < 5 -%>
repo --name="Server-Mysql"
<% end -%>

<% if @host.operatingsystem.name == 'Fedora' && os_major <= 16 -%>
# Bootloader exception for Fedora 16:
bootloader --append="<%= host_param('bootloader-append') || 'nofb quiet splash=quiet' %> <%= ks_console %>" <%= grub_pass %>
part biosboot --fstype=biosboot --size=1
<% else -%>
bootloader --location=mbr --append="<%= host_param('bootloader-append') || 'nofb quiet splash=quiet' %>" <%= grub_pass %>
<% if os_major == 5 -%>
key --skip
<% end -%>
<% end -%>

<% if @dynamic -%>
%include /tmp/diskpart.cfg
<% else -%>
<%= @host.diskLayout %>
<% end -%>

text
reboot

%packages
<%= snippet_if_exists(template_name + " custom packages") %>
yum
dhclient
<% if use_ntp -%>
ntp
-chrony
<% else -%>
chrony
-ntp
<% end -%>
<% if rhel_compatible && os_major < 9 -%>
wget
<% end -%>
@Core
<% if host_param_true?('fips_enabled') -%>
<%=   snippet 'fips_packages' %>
<% end -%>
<%= section_end %>

<% if @dynamic -%>
%pre --log=/tmp/install.pre.dynamic.log
<%= snippet_if_exists(template_name + " custom pre") %>
<%= @host.diskLayout %>
<%= section_end %>
<% end -%>

%post --nochroot
exec < /dev/tty3 > /dev/tty3
chvt 3
(

<% if host_param_false?('no-resolv-override') -%>
cp -va /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
<% end -%>

<%= snippet_if_exists(template_name + " custom postnochroot") -%>

chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
<%= section_end %>

<%#
Main post script, if it fails the last post is still executed.
%>
%post
exec < /dev/tty3 > /dev/tty3
chvt 3
(
logger "Starting anaconda <%= @host %> postinstall"
<%= snippet 'kickstart_networking_setup' %>

<%= snippet 'ntp' %>

<%= snippet 'yum_proxy' %>

<% if rhel_compatible && host_param_true?('enable-epel') -%>
<%= snippet 'epel' -%>
<% end -%>

<%= snippet 'redhat_register' %>

<% if host_enc['parameters']['realm'] && @host.realm && (@host.realm.realm_type == 'FreeIPA' || @host.realm.realm_type == 'Red Hat Identity Management') -%>
<%= snippet 'freeipa_register' %>
<% end -%>

<% unless host_param_false?('package_upgrade') -%>
# update all the base packages from the updates repository
if [ -f /usr/bin/dnf ]; then
  dnf -y update
else
  yum -t -y update
fi
<% end -%>

<%= snippet('remote_execution_ssh_keys') %>

<%= snippet "blacklist_kernel_modules" %>

<% if chef_enabled %>
<%= snippet 'chef_client' %>
<% end -%>

<% if puppet_enabled %>
<% if host_param_true?('enable-puppetlabs-repo') || host_param_true?('enable-official-puppet7-repo') || host_param_true?('enable-puppetlabs-puppet6-repo')|| host_param_true?('enable-puppetlabs-puppet5-repo') -%>
<%= snippet 'puppetlabs_repo' %>
<% end -%>
<%= snippet 'puppet_setup' %>
<% end -%>

<% if salt_enabled %>
<%= snippet 'saltstack_setup' %>
<% end -%>

<% if @host.operatingsystem.name == 'OracleLinux' && host_param_true?('disable-uek') -%>
# Uninstall the Oracle Unbreakable Kernel packages
yum -t -y remove kernel-uek*
sed -e 's/DEFAULTKERNEL=kernel-uek/DEFAULTKERNEL=kernel/g' -i /etc/sysconfig/kernel
<% end -%>

<%= snippet('ansible_provisioning_callback') %>

<%= snippet 'efibootmgr_netboot' %>

<%= snippet_if_exists(template_name + " custom post") %>

<% if host_param_true?('host_registration_insights') -%>
<%= snippet 'insights' -%>
<% end -%>

touch /tmp/foreman_built

chvt 1
) 2>&1 | tee /root/install.post.log
<%= section_end %>

# copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/*.pre.*.log /mnt/sysimage/root/
<%= section_end %>

<%#
The last post section halts Anaconda to prevent endless loop in case HTTP request fails
%>
<% if (is_fedora && os_major < 20) || (rhel_compatible && os_major < 7) -%>
%post
<% else -%>
%post --erroronfail --log=/root/install-callhome.post.log
<% end -%>

<%= snippet 'eject_cdrom' -%>

if test -f /tmp/foreman_built; then
  echo "calling home: build is done!"
  <%= indent(2, skip1: true) { snippet('built', :variables => { :endpoint => 'built', :method => 'POST', :body_file => '/root/install.post.log' }) } -%>
else
  echo "calling home: build failed!"
  <%= indent(2, skip1: true) { snippet('built', :variables => { :endpoint => 'failed', :method => 'POST', :body_file => '/root/install.post.log' }) } -%>
fi

sync
<%= section_end %>

I don’t know what is not working if you don’t post what’s happening.

Again: please post the evaluated template aka the actual kickstart file used for provisioning and also post what’s happening including the exact errors.

Please below required information and let us know if you are able to provide any suggestion it would be help for me

# This kickstart file was rendered from the Foreman provisioning template "Kickstart default".


install

url --url http://ptks.micron.com/linux/centos/9.1.2021/BaseOS/x86_64/kickstart/


lang en_US.UTF-8
selinux --enforcing
keyboard us
skipx

network --device=00:50:56:81:ce:46 --hostname hylsubhaashinik.micron.com --noipv6 --bootproto dhcp --mtu=1500 --nameserver=10.70.84.5,10.71.157.5

rootpw --iscrypted $5$6zc4M4uzFdNnTCUn$Ztpyt/ZdJFAdGQuEPa1urOs8eUeA3QHuCAGR/t/wW79
firewall --ssh
authconfig --useshadow --passalgo=sha256 --kickstart
timezone --utc UTC 

services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd



bootloader --location=mbr --append="nofb quiet splash=quiet" 


zerombr
clearpart --all --initlabel
autopart 


text
reboot

%packages

yum
dhclient
ntp
-chrony
wget
@Core



%post --nochroot
exec < /dev/tty3 > /dev/tty3
chvt 3
(



chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log



%post
exec < /dev/tty3 > /dev/tty3
chvt 3
(
logger "Starting anaconda hylsubhaashinik.micron.com postinstall"




# ens192 interface
real=`grep -l 00:50:56:81:ce:46 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1`
sanitized_real=`echo $real | sed s/:/_/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="dhcp"
DOMAIN="micron.com"
DEVICE=$real
HWADDR="00:50:56:81:ce:46"
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
MTU=1500
EOF




echo "Updating system time"
yum -y install ntpdate
  systemctl enable --now ntpd
/usr/sbin/hwclock --systohc















# update all the base packages from the updates repository
if [ -f /usr/bin/dnf ]; then
  dnf -y update
else
  yum -t -y update
fi





user_exists=false
getent passwd root >/dev/null 2>&1 && user_exists=true


if $user_exists; then


  mkdir -p ~root/.ssh

  cat << EOF >> ~root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8iRY0QIwm6Lk33F+kbZDJKeSyMJmJFkl3RDowvPAV5BqIk3hqlfaxDiQlRrBvsOYk/LyuKDee0ST+oF6P41ymfDnfulLi5XSzFcFehU7yI+r4josjjS5iaWDN9aho3Hr0QJHeWdfQJiSL63m4R/vC6vrTRoacX+9NWW5zF9RXYpHKVLpiiWXH6Yu6E16I6mZCwfTQ1Wq3l/lHnQNOXsBjHAlx330GQXtxhFKIWEWhMACMfpURe3gXbHNQxU3WKrnCsPjhh79NMHnW72/ac3Q9yJS4+vCyeZPO62kt7f4eW8qEuQ/603vlVGsUS4ANMfB34OF7GO8hPl5het1lQ2iT foreman-proxy@hylformanproxy.micron.com
EOF

  chmod 0700 ~root/.ssh
  chmod 0600 ~root/.ssh/authorized_keys
  chown -R root: ~root/.ssh

  # Restore SELinux context with restorecon, if it's available:
  command -v restorecon && restorecon -RvF ~root/.ssh || true

else
  echo 'The remote_execution_ssh_user does not exist and remote_execution_create_user is not set to true.  remote_execution_ssh_keys snippet will not install keys'
fi















touch /tmp/foreman_built

chvt 1
) 2>&1 | tee /root/install.post.log


# copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/*.pre.*.log /mnt/sysimage/root/



%post


if test -f /tmp/foreman_built; then
  echo "calling home: build is done!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  fi
else
  echo "calling home: build failed!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  fi
fi

sync


error

for centos7 successfully installed


# This kickstart file was rendered from the Foreman provisioning template "Kickstart default".


install

url --url http://ptks.micron.com/linux/centos/7.9.2009/os/x86_64


lang en_US.UTF-8
selinux --enforcing
keyboard us
skipx

network --device=00:50:56:81:ce:46 --hostname hylsubhaashinik.micron.com --noipv6 --bootproto dhcp --mtu=1500 --nameserver=10.70.84.5,10.71.157.5

rootpw --iscrypted $5$nUSqKmJZdnJnLsxI$8eMmDbIAGBPR7rrE6neLN3le9LBDsIeoA2wv407r326
firewall --service=ssh
authconfig --useshadow --passalgo=sha256 --kickstart
timezone --utc UTC 

services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd



bootloader --location=mbr --append="nofb quiet splash=quiet" 


zerombr
clearpart --all --initlabel
autopart 


text
reboot

%packages

yum
dhclient
ntp
-chrony
wget
@Core
%end


%post --nochroot
exec < /dev/tty3 > /dev/tty3
chvt 3
(



chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log
%end


%post
exec < /dev/tty3 > /dev/tty3
chvt 3
(
logger "Starting anaconda hylsubhaashinik.micron.com postinstall"




# ens192 interface
real=`grep -l 00:50:56:81:ce:46 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1`
sanitized_real=`echo $real | sed s/:/_/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="dhcp"
DOMAIN="micron.com"
DEVICE=$real
HWADDR="00:50:56:81:ce:46"
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
MTU=1500
EOF




echo "Updating system time"
yum -y install ntpdate
  systemctl enable --now ntpd
/usr/sbin/hwclock --systohc















# update all the base packages from the updates repository
if [ -f /usr/bin/dnf ]; then
  dnf -y update
else
  yum -t -y update
fi





user_exists=false
getent passwd root >/dev/null 2>&1 && user_exists=true


if $user_exists; then


  mkdir -p ~root/.ssh

  cat << EOF >> ~root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8iRY0QIwm6Lk33F+kbZDJKeSyMJmJFkl3RDowvPAV5BqIk3hqlfaxDiQlRrBvsOYk/LyuKDee0ST+oF6P41ymfDnfulLi5XSzFcFehU7yI+r4josjjS5iaWDN9aho3Hr0QJHeWdfQJiSL63m4R/vC6vrTRoacX+9NWW5zF9RXYpHKVLpiiWXH6Yu6E16I6mZCwfTQ1Wq3l/lHnQNOXsBjHAlx330GQXtxhFKIWEWhMACMfpURe3gXbHNQxU3WKrnCsPjhh79NMHnW72/ac3Q9yJS4+vCyeZPO62kt7f4eW8qEuQ/603vlVGsUS4ANMfB34OF7GO8hPl5het1lQ2iT foreman-proxy@hylformanproxy.micron.com
EOF

  chmod 0700 ~root/.ssh
  chmod 0600 ~root/.ssh/authorized_keys
  chown -R root: ~root/.ssh

  # Restore SELinux context with restorecon, if it's available:
  command -v restorecon && restorecon -RvF ~root/.ssh || true

else
  echo 'The remote_execution_ssh_user does not exist and remote_execution_create_user is not set to true.  remote_execution_ssh_keys snippet will not install keys'
fi















touch /tmp/foreman_built

chvt 1
) 2>&1 | tee /root/install.post.log
%end

# copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/*.pre.*.log /mnt/sysimage/root/
%end


%post --erroronfail --log=/root/install-callhome.post.log


if test -f /tmp/foreman_built; then
  echo "calling home: build is done!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/built?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/built?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/built?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  fi
else
  echo "calling home: build failed!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/failed?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/failed?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/failed?token=28552d0f-e057-4b35-9d44-faac6ef8302b'
  fi
fi

sync
%end

I am sorry, but I think you should ask someone else who has more experience with Linux. You are really making a huge mess and keep confusing everything.

Why do you keep posting CentOS 7 installation? You have a problem with AlmaLinux 9. Constantly posting information about your CentOS 7 installation isn’t helping. Every time, when I want to check some of your configuration for AlmaLinux I have to double check and triple check that the output I have on the screen is the one for Alma 9 and not CentOS 7. There is no point posting about CentOS 7. You have posted before that it’s working for CentOS 7. I have pointed out before that EL7 and EL8/9 are quite different in kickstart installation that’s why it’s not helpful to know that CentOS 7 is working.

And at any turn it makes me doubt if that what you post is really what it is or whether you have mixed something up. Just like you have edited the template replacing each appearance of 7 by 9 to basically make a EL 7 with EL 9, even though the reason why those conditions check for 7 or 9 in the template is because it is actually really different and installations for EL7 must be handled differently from EL9. Which really makes me think that you don’t understand the template and what they do at all. Thus, maybe you ask someone else?

I mean if you read the rendered kickstart and the very first statement printed:

and look at the template code generating that statement in the posted template you claim you are using:

You can see that there is obviously something wrong there: either you are still using your broken template where you have replaced the 7 by 9 or the selected operating system for the host isn’t configured correctly as rhel_compatible and the correct os_major.

The variables are set before in that template:

Thus verify that the template you are using is really the original, unmodified kickstart template and check the configuration of the operating system in foreman you have selected for the host to be provisioned.

The rendered kickstart is wrong and it’s either because the template is broken or because the information going into the expressions for the if statement above are incorrect.

Either way, you have messed something up pretty badly to get

(is_fedora && os_major < 29) || (rhel_compatible && os_major <= 7)

evaluated to true with a AlmaLinux 9 operating system configured in foreman. The only explanation for me for that to happen would be

either you are still using your broken template where you have replaced the 7 in that line with 9 and not the one you claim to use.

Or the operating system is configured to be os major version 7 which would mean you have set up your AlmaLinux 9 operating system in foreman explicitly as os_major 7. Which again is wrong on so many levels…

Hi ,

When attempting to install using the kickstart default template for 7, which is now operational and updated with log information, I updated the two scenarios mentioned above.

You can see in the screenshot of alamalinux9 above that the uri links for each one will differ while using the same kickstart default template.

When attempting to install using the kickstart default template for 7, which is now operational and updated with log information, I updated the two scenarios mentioned above.

You can see in the screenshot of alamalinux9 above that the uri links for each one will differ while using the same kickstart default template.

Error related 9 version
image

# This kickstart file was rendered from the Foreman provisioning template "Kickstart default".


install

url --url http://ptks.micron.com/linux/centos/9.1.2021/BaseOS/x86_64/kickstart/


lang en_US.UTF-8
selinux --enforcing
keyboard us
skipx

network --device=00:50:56:81:ce:46 --hostname hylsubhaashinik.micron.com --noipv6 --bootproto dhcp --mtu=1500 --nameserver=10.70.84.5,10.71.157.5

rootpw --iscrypted $5$6zc4M4uzFdNnTCUn$Ztpyt/ZdJFAdGQuEPa1urOs8eUeA3QHuCAGR/t/wW79
firewall --ssh
authconfig --useshadow --passalgo=sha256 --kickstart
timezone --utc UTC 

services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd



bootloader --location=mbr --append="nofb quiet splash=quiet" 


zerombr
clearpart --all --initlabel
autopart 


text
reboot

%packages

yum
dhclient
ntp
-chrony
wget
@Core



%post --nochroot
exec < /dev/tty3 > /dev/tty3
chvt 3
(



chvt 1
) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log



%post
exec < /dev/tty3 > /dev/tty3
chvt 3
(
logger "Starting anaconda hylsubhaashinik.micron.com postinstall"




# ens192 interface
real=`grep -l 00:50:56:81:ce:46 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1`
sanitized_real=`echo $real | sed s/:/_/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="dhcp"
DOMAIN="micron.com"
DEVICE=$real
HWADDR="00:50:56:81:ce:46"
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
MTU=1500
EOF




echo "Updating system time"
yum -y install ntpdate
  systemctl enable --now ntpd
/usr/sbin/hwclock --systohc















# update all the base packages from the updates repository
if [ -f /usr/bin/dnf ]; then
  dnf -y update
else
  yum -t -y update
fi





user_exists=false
getent passwd root >/dev/null 2>&1 && user_exists=true


if $user_exists; then


  mkdir -p ~root/.ssh

  cat << EOF >> ~root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8iRY0QIwm6Lk33F+kbZDJKeSyMJmJFkl3RDowvPAV5BqIk3hqlfaxDiQlRrBvsOYk/LyuKDee0ST+oF6P41ymfDnfulLi5XSzFcFehU7yI+r4josjjS5iaWDN9aho3Hr0QJHeWdfQJiSL63m4R/vC6vrTRoacX+9NWW5zF9RXYpHKVLpiiWXH6Yu6E16I6mZCwfTQ1Wq3l/lHnQNOXsBjHAlx330GQXtxhFKIWEWhMACMfpURe3gXbHNQxU3WKrnCsPjhh79NMHnW72/ac3Q9yJS4+vCyeZPO62kt7f4eW8qEuQ/603vlVGsUS4ANMfB34OF7GO8hPl5het1lQ2iT foreman-proxy@hylformanproxy.micron.com
EOF

  chmod 0700 ~root/.ssh
  chmod 0600 ~root/.ssh/authorized_keys
  chown -R root: ~root/.ssh

  # Restore SELinux context with restorecon, if it's available:
  command -v restorecon && restorecon -RvF ~root/.ssh || true

else
  echo 'The remote_execution_ssh_user does not exist and remote_execution_create_user is not set to true.  remote_execution_ssh_keys snippet will not install keys'
fi















touch /tmp/foreman_built

chvt 1
) 2>&1 | tee /root/install.post.log


# copy %pre log files into chroot
%post --nochroot
cp -vf /tmp/*.pre.*.log /mnt/sysimage/root/



%post


if test -f /tmp/foreman_built; then
  echo "calling home: build is done!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/built?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  fi
else
  echo "calling home: build failed!"
  if [ -x /usr/bin/curl ]; then
    /usr/bin/curl -o /dev/null --noproxy \* -H 'Content-Type: text/plain' --data @/root/install.post.log --silent 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  elif [ -x /usr/bin/wget ]; then
    /usr/bin/wget -q -O /dev/null --no-proxy --method POST --header 'Content-Type: text/plain' --body-file=/root/install.post.log 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  else
    wget -q -O /dev/null --header 'Content-Type: text/plain' 'http://hylformanproxy.micron.com:8000/unattended/failed?token=8f6a698f-f6ff-495d-8468-c34f1bc25ec0'
  fi
fi

sync

When attempting to install using the kickstart default template for 7, which is now operational and updated with log information, I updated the two scenarios mentioned above.

You can see in the screenshot of alamalinux9 above that the uri links for each one will differ while using the same kickstart default template.

When attempting to install using the kickstart default template for 7, which is now operational and updated with log information, I updated the two scenarios mentioned above.

You can see in the screenshot of alamalinux9 above that the uri links for each one will differ while using the same kickstart default template.

I apologise if this is confusing you, however if you require any additional information, i will give it to you.

I’m attempting to communicate my intention after observing it.

We created the Almhalinux 9 operating system and the provision template, selecting the default template for it.

The kickstart template you are trying to use does not match the version
of anaconda installer from the EL Linux distribution you are attempting
to install from. As gvde has stated, you need to start with the default
kickstart template for EL 9 not try to fudge the EL 7 template it simply
won’t work with EL 9 without many modifications. Try the vanilla default
kickstart template just to get a satisfactory Alma 9 basic install.
After that you can gradually make modifications by cloning the template
then test each modification one by one to ensure everything works as
expected.

thank you for your suggestion for EL9, how can we get vanilla default
kickstart ?
the below templates are available on foreman.

Well, as pointed out before: you can see at the install statement in the rendered kickstart that that is not the case.

You really have to fix what I wrote in my previous post. Repeating the same mistakes over and over again is futile.

thank you for your suggestion for EL9, how can we get vanilla default
kickstart ?
the below templates are available on foreman.

I now understand that the EL9 architecture is unique, but how can I obtain a template to install it? On the Foreman server, templates that are currently accessible are listed.

It’s the one called “Kickstart default” (provisioning template)

Read my post before where I have explained the situation and the two (most likely) reasons why that goes wrong.

You have posted the content of the Kickstart default template before. You have it. Read my post before. I have explained it in detail.

Because the architecture is different while installing Almalinux 9, kickstart default does not function. I learned via gvde that we needed an EL9 template, however our foreman’s kickstart defautl template wasn’t compatible with EL9.

Which version of foreman are you running?

Just to be absolutely sure, you have disassociated that Almal Linux 9
provisioning template(as shown in your ealier image) and associated
“Kickstart default” with the Alma Linux 9 Operating System? Before
provisioning your host please double check that it is picking up the
“Kickstart Default” template and not your custom A"Alma Linux 9" one.

we created operating system9 almalinux9 and integrated kickstart-defautl