Help with kickstart autoinstall OS

Hi,
i’m trying to generate a USB to automate Rocky 8 install, with the anaconda-ks.cfg it made after the first install to other machines with the completely same specs. VID_20240131111303 - VEED But here you can see it doesn’t do as i was expecting.

This is the original ks after install

#version=RHEL8
# Use graphical install
graphical

repo --name="AppStream" --baseurl=file:///run/install/sources/mount-0000-hdd-device/AppStream

%packages
@^server-product-environment
@headless-management
kexec-tools

%end

# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --hostname=localhost.localdomain

# Use hard drive installation media
harddrive --dir= --partition=LABEL=ROCKY-8-7-X

# Run the Setup Agent on first boot
firstboot --enable

ignoredisk --only-use=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=1024
part pv.283 --fstype="lvmpv" --ondisk=sda --size=393224
part /boot/efi --fstype="efi" --ondisk=sda --size=1024 --fsoptions="umask=0077,shortname=winnt"
volgroup rl --pesize=4096 pv.283
logvol /usr --fstype="xfs" --size=10240 --name=usr --vgname=rl
logvol / --fstype="xfs" --size=40960 --name=root --vgname=rl
logvol /home --fstype="xfs" --size=20480 --name=home --vgname=rl
logvol /var/lib/docker --fstype="xfs" --size=102400 --name=var_lib_docker --vgname=rl
logvol /var/tmp --fstype="xfs" --size=10240 --name=var_tmp --vgname=rl
logvol /tmp --fstype="xfs" --size=10240 --name=tmp --vgname=rl
logvol /var/log --fstype="xfs" --size=10240 --name=var_log --vgname=rl
logvol /var/log/audit --fstype="xfs" --size=10240 --name=var_log_audit --vgname=rl
logvol /var --fstype="xfs" --size=10240 --name=var --vgname=rl
logvol swap --fstype="swap" --size=65536 --name=swap --vgname=rl
logvol /opt --fstype="xfs" --size=102400 --name=opt --vgname=rl

# System timezone
timezone Europe/Madrid --isUtc --nontp

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

And then i tried to modify for non interactive

#version=RHEL8
# use text
text --non-interactive

repo --name="AppStream" --baseurl=file:///run/install/sources/mount-0000-hdd-device/AppStream

%packages
@^server-product-environment
@headless-management
kexec-tools

%end

# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --hostname=localhost.localdomain

# Use hard drive installation media
harddrive --dir= --partition=LABEL=ROCKY-8-7-X

# Run the Setup Agent on first boot
firstboot --disable

ignoredisk --only-use=sda
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --ondisk=sda --size=1024
part pv.283 --fstype="lvmpv" --ondisk=sda --size=393224
part /boot/efi --fstype="efi" --ondisk=sda --size=1024 --fsoptions="umask=0077,shortname=winnt"
volgroup rl --pesize=4096 pv.283
logvol /usr --fstype="xfs" --size=10240 --name=usr --vgname=rl
logvol / --fstype="xfs" --size=40960 --name=root --vgname=rl
logvol /home --fstype="xfs" --size=20480 --name=home --vgname=rl
logvol /var/lib/docker --fstype="xfs" --size=102400 --name=var_lib_docker --vgname=rl
logvol /var/tmp --fstype="xfs" --size=10240 --name=var_tmp --vgname=rl
logvol /tmp --fstype="xfs" --size=10240 --name=tmp --vgname=rl
logvol /var/log --fstype="xfs" --size=10240 --name=var_log --vgname=rl
logvol /var/log/audit --fstype="xfs" --size=10240 --name=var_log_audit --vgname=rl
logvol /var --fstype="xfs" --size=10240 --name=var --vgname=rl
logvol swap --fstype="swap" --size=65536 --name=swap --vgname=rl
logvol /opt --fstype="xfs" --size=102400 --name=opt --vgname=rl

# System timezone
timezone Europe/Madrid --isUtc --nontp


%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

eula --agreed

I also modified the isolinux.cfg on this part:

label linux
  menu label ^Install Rocky Linux 8
  kernel vmlinuz
  append initrd=initrd.img inst.repo=hd:LABEL=ROCKY-8-7-X inst.ks=file:anaconda-ks.cfg quiet

Is this wrong? what am i missing?

Hi,

What isn’t working with the kickstart?

Try Replacing

inst.ks=file:anaconda-ks.cfg quiet

With

inst.ks=hd:LABEL=ROCKY-8-7-X:/anaconda-ks.cfg quiet

To support uefi you’ll probably need to update /EFI/BOOT/grub.cfg aswell:

linuxefi /images/pxeboot/vmlinuz inst.repo=hd:LABEL=ROCKY-8-7-X  inst.ks=hd:LABEL=ROCKY-8-7-X:/anaconda-ks.cfg quiet

Also how are you generating the ISO for the usb?

Regards Tom.

1 Like

Thanks for the reply,
i was expecting the graphic install to not appear. The LiveUSB was made by downloading the DVD iso installer from the web and then just apply with UNetbootin or Rufus don’t remember.

Now i get a Warning: Can’t get kickstart from /dev/sdb1:anaconda-ks.cfg

And it got solved by moving the anaconda-ks.cfg to the root of the USB, thank you so much.

2 Likes

Hi, I have the same problem as you and I need help, could you write me the details of how you did it to create ISO for USB, also share anaconda and isolinux files with me, and how you solved the anaconda cfg problem. I would be grateful if you leave me a contact I will write to you there. I’ve been looking for someone who has done this for a long time

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.