如何使用OEMDRV卷自动执行CentOS7最小启动安装? [英] How to automate CentOS7 minimal kickstart installation using OEMDRV volume?
本文介绍了如何使用OEMDRV卷自动执行CentOS7最小启动安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在VirtualBox中自动化CentOS7 Minimal的安装过程。KickStart文件就是解决方案。我发现将ks.cfg文件放入OEMDRV.vhdm磁盘并将其挂载到VM内存中是允许VM访问配置文件的最简单方法。 Anaconda读取ks.cfg文件,因为它指出了拼写错误,但一旦正确写入文件,VM就会运行错误,如果ks.cfg文件为空,也会发生同样的情况:
The I/O cache encountered an error while updating data in medium "ahci-
0-1" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the
disk and that the disk is working properly. Operation can be resumed
afterwards.
主机是Windows 10,下面是我的ks.cfg文件。该文件取自已存在的CentOS7最小VM。
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use cmdline/text/graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=enp0s3 --ipv6=auto --activate
network --hostname=localhost.localdomain
# Root password #working on --isctrypted rootpw
rootpw --iscrypted $6$6eqrvzKwp2ST4PMi$VUqUy8G/AsbaZK9XbtqlQcSIZjZ7QQk5yFqe5h/91YwM3GI3PjxEASc062EFPgGjvsmMxcLuKvx8d69KLplYJ1
# System services
services --disabled="chronyd"
# System timezone
timezone Europe/Warsaw --isUtc --nontp
# User
user --groups=wheel --name=secutest --password=$6$Ct923BcyZG.13TR2$jEUcu5tlvncoejaWa9eof.5GL1oU3wLVe0zEWLDrpKY6oXJhGeV4CRvoiYfFeC1IpkPeaXc1z912E3HdvOS/t/ --iscrypted --gecos="secutest"
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
%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
reboot
推荐答案
解决方案是使用OEMDRV.iso、ISO磁盘类型。接下来,必须将OEMDRV磁盘挂载到VM的SATA控制器。
此命令在文件夹中创建带有标记为‘OEMDRV’的卷的OEMDV.iso文件,这正是我们需要的。
$ mkisofs -V OEMDRV -o OEMDRV.iso path/to/directory
这篇关于如何使用OEMDRV卷自动执行CentOS7最小启动安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文