Kickstart netinstall 忽略托管在 LAN 中的 kickstart 文件并继续进行手动安装

Pow*_*lus 3 centos kickstart system-installation

虚拟机由 vmware 工作站管理。

我在192.168.0.31运行 centos 7 的vm1 上启动了我的 Web 服务器。我创建了 kickstart 文件并将其上传ks.cfg192.168.0.31/ks.cfg. 你可以看看下面的文件。

我局域网中的每个虚拟机都可以ks.cfg通过转到192.168.0.31/ks.cfg. 我使用 centos 7 的 netinstall iso 启动 vm2 并添加ks=http://192.168.0.31/ks.cf到启动选项并按 Enter。我唯一想到的是不知何故中的镜像地址ks.cfg无效,但我从官方centos站点复制了它并尝试了多个。我也试过在网上找到的镜像,都没有解决问题。

配置文件

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Use network installation
url --url="http://mirrors.mit.edu/centos/7/os/x86_64/"
# System language
lang en_US
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
# SELinux configuration
selinux --enforcing
# Do not configure the X Window System
skipx

# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=dhcp --device=eth0
# Halt after installation
halt
# System timezone
timezone Africa/Abidjan
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
Run Code Online (Sandbox Code Playgroud)

Pow*_*lus 5

错误是kickstart 文件不包括自动安装发生的所有必要信息。网络工作正常。如果ks.cfg获取失败,则会出现以下消息:在此处输入图片说明 如果ks.cfg获取成功但内容不足,以下可能会迎接我们:在此处输入图片说明

修复No disks selected在 GUI 中手动定义分区。或者使用自动分区(在 GUI 中不可能,将所有内容留空不会导致自动分区) -ks.cfg需要编辑,只需添加autopart --type=lvm# System bootloader configuration文件的部分即可。为了修复Nothing selectedSOFTWARE SELECTION我刚才添加的情况如下:

%packages
%end
Run Code Online (Sandbox Code Playgroud)

在文件的末尾。

特尔;博士:

在 GUI 中创建 kickcstart 文件后,需要补充:

%packages
%end
Run Code Online (Sandbox Code Playgroud)

如果需要自动分区,可以通过在文件中补充:autopart --type=lvmin# System bootloader configuration部分来完成。我在那种特定情况下的错误是在 GUI 中将所有分区选项留空,认为这会导致自动分区。