1

I am trying to setup a PXE boot server in centos for unattended install of OS, for POC I am using a centos7 as a PXE server which is running on Citrix hypervisor, I am using a kickstart file. When I try to boot a machine on network boot it is taking all the Parameters from kickstart file(eg, keyboard ,language ,time) however it is giving "Error setting up base repository" on installation source section. How can I solve this issue. I saw a few articles but could not understand what I am doing wrong Note: I am trying to install centos 9.

the ks file:

#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
#using network boot
url --url="http://192.168.10.9/centos9"
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=xvda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

Network information

network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate network --hostname=localhost.localdomain

Root password

rootpw --iscrypted $6$KWLJKbrttDYtjWnk$rjRC4pR6ntyzYtJ7xjqOGC/0FYnlNEc6nacNP3Av93msT0aTLy10SUcKNaMvtkYN6gW2z128oB5aCMAhIlgXH0

System services

services --disabled="chronyd"

System timezone

timezone Asia/Kolkata --isUtc --nontp

System bootloader configuration

bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=xvda autopart --type=lvm

Partition clearing information

clearpart --none --initlabel

%packages @^minimal @core kexec-tools

%end

%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

Aaron Copley
  • 12,954
biplab
  • 57

1 Answers1

1

So I found out the solution, don't know if it is the standard way.

added the below line in my kickstart file

repo --name="BaseOS" --baseurl="http://192.168.10.9/centos9/BaseOS"

(here the IP is the IP of my PXE server and centos9 is the folder where all the installation files are, and BaseOS is folder has the repositories)

however just adding the above line didn't solved the issue as BaseOS is not the only repository which it required , it required AppStream as well however simply adding

repo --name="AppStream" --baseurl="http://192.168.10.9/centos9/AppStream"

didn't seem to work so I copied all the content of the Appstream folder to the folder where all OS files were there ie, centos9.

adding my ks file for reference:

lang en_US
keyboard --xlayouts='us'
timezone Asia/Kolkata --utc
rootpw $2b$10$l1loZtoAcesh8JpVrm5/ReXAyhLwvljGp1VRBagrylJd16O2uDh66 --iscrypted
repo --name="BaseOS" --baseurl="http://192.168.10.9/centos9/BaseOS"
reboot
url --url=http://192.168.10.9/centos9
bootloader --append="rhgb quiet crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M"
zerombr
clearpart --all --initlabel
autopart
network --bootproto=dhcp
firstboot --disable
selinux --disabled
firewall --enabled --http
%packages
@^graphical-server-environment
%end
Aaron Copley
  • 12,954
biplab
  • 57