Hi everyone,
I’m trying to install Rocky Linux 8.9 using a Kickstart file, but I’m running into an issue at the point where the installation should detect the local media to boot from. Unfortunately, it’s not finding the media.
Here’s a summary of my setup and what I’ve done so far:
- Using Rocky Linux 8.9
- Kickstart implementation for unattended installation (at /isolinux/ks.cfg)
- the ilo only supports UEFI booting, i did add the relevent lines to use the ks.cfg at the /EFI/grub.cfg file
- when deploying the ISO manually from the original Minimal download without ks.cfg the image is getting mounted as it should and getting detected by anaconda.
*the command i been using to create the ISO:
genisoimage -U -r -v -T -J -joliet-long \
-V "Rocky-8-9-x86_64-dvd" -volset "Rocky-8-9-x86_64-dvd" \
-A "Rocky-8-9-x86_64-dvd" \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
-o Rocky-ASMS.iso /home/admin/Rocky/ISO_WORKING_LAB/ASMS_A33
isohybrid --uefi Rocky-ASMS.iso
kickstart:
#version=RHEL8
# Use graphical install
graphical
repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --onboot=no --device=link --noipv4 --noipv6 --hostname=**
# Root password
rootpw --iscrypted ********
# Enable SSH server
services --enabled="sshd,chronyd"
services --disabled="kdump"
# System timezone
timezone America/Los_Angeles --isUtc
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Run the Setup Agent on first boot
firstboot --disable
# Do not configure the X Window System
skipx
# System services
firewall --disabled
# Reboot after installation
reboot
# Create user
user --groups=wheel --name=******** --password=******** --iscrypted --gecos="********"
# System bootloader configuration
bootloader --append="net.ifnames=0 biosdevname=0 crashkernel=auto" --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=1024
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
part biosboot --fstype="biosboot" --ondisk=sda --size=1
part pv.986 --fstype="lvmpv" --ondisk=sda --size=1 --grow
# Volume group configuration
volgroup vg_alo --pesize=4096 pv.986
# Logical volume configuration
logvol / --fstype="xfs" --size=49589 --name=OS --vgname=vg_alo
logvol /data --fstype="xfs" --size=1 --grow --name=data --vgname=vg_alo
logvol swap --fstype="swap" --size=30516 --name=swap --vgname=vg_alo
%pre
# Copy the contents from /run/install/repo/ to /run/install/sources/mount-0000-cdrom/
cp -ax /run/install/repo/* /run/install/sources/mount-0000-cdrom/
%end
%post
/usr/sbin/adduser admin
/usr/sbin/usermod -p '$1$Lo$qPTpmUXcJ6bK4AHeJ1TD1.' admin
/usr/bin/chfn -f "********" admin
mv /etc/rc.d/rc.local /etc/rc.d/rc.local.00
echo '#!/bin/bash' > /etc/rc.d/rc.local
ln -s ../rc.local /etc/rc.d/rc5.d/S99rclocal
chmod 755 /etc/rc.d/rc.local
echo 'mkdir -p /var/log/vmware' >> /etc/rc.d/rc.local
echo 'exec 1> /var/log/vmware/rc.local.log' >> /etc/rc.d/rc.local
echo 'exec 2>&1' >> /etc/rc.d/rc.local
echo 'set -x' >> /etc/rc.d/rc.local
echo 'echo Installing Open VM Tools' >> /etc/rc.d/rc.local
echo 'set -x' >> /etc/rc.d/rc.local
echo '/bin/eject sr0 || /bin/true' >> /etc/rc.d/rc.local
echo '/bin/eject sr1 || /bin/true' >> /etc/rc.d/rc.local
echo '/bin/vmware-rpctool' \'guest.upgrader_send_cmd_line_args --default\' >> /etc/rc.d/rc.local
echo '/bin/vmware-rpctool' \'upgrader.setGuestFileRoot /tmp\' >> /etc/rc.d/rc.local
echo '/bin/vmware-rpctool' \'toolinstall.installerActive 1\' >> /etc/rc.d/rc.local
echo '/bin/vmware-rpctool' \'toolinstall.installerActive 100\' >> /etc/rc.d/rc.local
echo 'rm -f /etc/rc.d/rc.local' >> /etc/rc.d/rc.local
echo 'rm -f /etc/rc.d/rc5.d/S99rclocal' >> /etc/rc.d/rc.local
echo 'mv /etc/rc.d/rc.local.00 /etc/rc.d/rc.local' >> /etc/rc.d/rc.local
/bin/echo done
%end
# Package selection
%packages
@^minimal-environment
@standard
kexec-tools
chrony
%end
# Post-installation script
%post --log=/root/ks-post.log
#!/bin/bash
# Create admin user
/usr/sbin/adduser admin
/usr/sbin/usermod -p '$1$Lo$qPTpmUXcJ6bK4AHeJ1TD1.' admin
/usr/bin/chfn -f "Ziv L" admin
# Setup local repository
mkdir /localrepo
mount -o loop /dev/cdrom /mnt
rsync -avl /mnt/ /localrepo
mkdir -p /etc/yum.repos.d/old
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/old/
cat > /etc/yum.repos.d/local.repo << EOF
[dvd]
name=Rocky Linux 8.9 Local Repository
baseurl=file:///localrepo
enabled=1
gpgcheck=0
EOF
# Create alo appliance directory
mkdir -p /usr/share/alo
touch /usr/share/alo/appliance_model.txt
# Create runonce service
cat > /etc/systemd/system/runonce.service << EOF
[Unit]
Description=Run once
After=network-online.target
[Service]
Type=simple
ExecStart=/localrepo/local/runonce.sh
[Install]
WantedBy=multi-user.target
EOF
# Setup SSH configuration
mkdir -m 0700 /root/.ssh
touch /root/.ssh/config
chmod 0600 /root/.ssh/config
# Enable runonce service
chmod +x /localrepo/local/runonce.sh
chmod +x /localrepo/local/*
systemctl enable runonce.service
systemctl daemon-reload
%end
Has anyone experienced this issue or know how to resolve it? Any help or suggestions would be greatly appreciated!
Thanks in advance.