大网数据广告活动
服务器运维问答

Error setting up base reposotory while using pxe booting centos9 with kickstart file

· 52CE 我爱测

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 netwo…

问题原文

原帖链接 · biplab · CC BY-SA 4.0

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

已采纳解答

原帖链接 · biplab · CC BY-SA 4.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2024-01-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。