gpt4 book ai didi

automation - 如何使用 OEMDRV 卷自动安装 CentOS7 最小启动安装?

转载 作者:行者123 更新时间:2023-12-04 19:30:55 31 4
gpt4 key购买 nike

我正在尝试在 VirtualBox 中自动化 CentOS7 的安装过程。 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 最小虚拟机。
#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 Controller 。

此命令在文件夹外创建卷标为“OEMDRV”的 OEMDV.iso 文件,这正是我们所需要的。

$ mkisofs -V OEMDRV -o OEMDRV.iso path/to/directory

关于automation - 如何使用 OEMDRV 卷自动安装 CentOS7 最小启动安装?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56986502/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com