环境
- CentOS7.6
- genisoimage 1.1.11
- CentOS-7-x86_64-Minimal-1810.iso
复制 iso 内容到本地磁盘
mount -o loop CentOS-7-x86_64-Minimal-1810.iso /mnt/
mkdir -p /home/iso/centos7
cd /mnt && cp -af * /home/iso/centos7/
创建 isolinux/ks.cfg
mbr 启动,/home/iso/centos7/isolinux/ks.cfg 内容如下
# Install OS instead of upgrade
install
# Reboot after installation
reboot
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=cn --xlayouts='cn'
# System language
lang zh_CN.UTF-8
# Firewall configuration
firewall --disabled
# SELinux configuration
selinux --disabled
# Network information
#network --bootproto=dhcp --device=eth0 --onboot=off --ipv6=auto --no-activate
#network --hostname=localhost.localdomain
# Root password(111111)