经测试,Kickstart 文件在 Centos 7 中出现故障

经测试,Kickstart 文件在 Centos 7 中出现故障

尝试启动 CENTOS 7 并收到一条意外消息。kickstart 文件之前已与 5 和 6 配合使用。有些东西发生了变化。有人遇到过这种情况吗?

Installation

 1) [x] Timezone settings                 2) [x] Installation source
        (America/Toronto timezone)               (http://centos.mirror.iweb.ca/7
 3) [!] Software selection                       /os/x86_64/)
        (Installation source not set up   4) [x] Install Destination
        )                                        (Custom partitioning selected)
 5) [x] Network settings
        (Wired (eth0) connected)

快速启动

install
text
url --url http://centos.mirror.iweb.ca/7/os/x86_64/
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp --ipv6 xxxxx::10/64 --gateway xxxxx:1 --nameserver --hostname foo.example.com
rootpw xxxxxxxxxxxxx
firewall --disabled
authconfig --enableshadow --enablemd5
timezone America/Toronto
bootloader --location=mbr --append="rhgb quiet console=tty0 console=ttyS0,115200n8"
user --name=neil --password=xxxxxxxxxxxx
zerombr
clearpart --initlabel --all
part /boot --fstype ext4 --size=200 --ondisk=vda --asprimary
part pv.3 --size=100 --grow --ondisk=vda
volgroup vg01 pv.3
logvol / --fstype ext4 --name=lv01 --vgname=vg01 --size=3072 --grow
logvol swap --fstype swap --name=swaplv01 --vgname=vg01 --size=1024

%packages
--ignoremissing
vim*
tmux
openssl-devel
pcre-devel
make
gcc
fakeroot
%end

在日志中发现:

22:59:18,869 DEBUG packaging: adding yum repo anaconda with baseurl http://centos.mirror.iweb.ca/7/os/x86_64/ and mirrorlist None
22:59:19,036 ERR packaging: base repo (url/http://centos.mirror.iweb.ca/7/os/x86_64/) not valid -- removing it

答案1

我猜想错误信息是由于拼写错误引起的: 应该是 顺便说一句,我认为您也应该将“@core”添加到“%packages”部分;它包含一组最少的非常重要的 RPM。 url --url http://centos.mirror.iweb.ca/7/os/x86_64/ url --url=http://centos.mirror.iweb.ca/7/os/x86_64/

答案2

我认为您需要从 kickstart 中的网络命令中删除 --device eth0。Centos7 现在使用一些奇怪的网络设备名称(例如,在我的 vmware Centos7 VM 上,它自动将网络设备检测为 Eno160,而不是 eth0)

network --bootproto dhcp --ipv6 xxxxx::10/64 --gateway xxxxx:1 --nameserver --hostname foo.example.com

答案3

有两种情况可能会导致此问题:

  1. 您指定了一个不存在或无效的存储库。
  2. 您的包裹清单有问题。

我检查了 repo 并且它看起来是正确的。

但是,你的包裹清单看起来不正确。具体来说:

%packages
--ignoremissing

这应该出现在一行上,即:

%packages --ignoremissing

答案4

我最近一直在为此苦苦挣扎 - 与您不太一样,因为我使用的是本地存储库,但最终结果相同。事实证明,在提取 ISO 时,repodata 中的文件的文件名被截断了。将您的 repodate 文件夹与(例如)进行比较http://mirror.ox.ac.uk/sites/mirror.centos.org/7/os/x86_64/repodata/

此信息可能会帮助其他通过谷歌搜索错误找到此页面的人。

相关内容