我试图创建自定义Centos 7。我能够创建启动ISO,但安装时,在安装摘要页软件选择列表是空的。步骤:-
(有关详细步骤,请参见以下链接:-我使用以下链接:- 如何在CentOS中创建自定义ISO映像 )
截图:-


发布于 2018-08-10 12:02:44
我得到了答案。
你需要考虑以下几点。
1)comps.xml。
2)createrepo命令。
3)ks.cfg文件
4)isolinux.cfg
1)更新comps.xml并重新分配rpms的所有依赖项。在comps.xml组中添加rpm名称。将您的ks.cfg文件保存在iso解压缩文件夹之外。
<comps>
<group>
<id>core</id>
<name>Core</name>
<description>Smallest possible installation.</description>
<default>false</default>
<uservisible>false</uservisible>
<packagelist>
<packagereq type="mandatory">basesystem</packagereq>
<packagereq type="mandatory">centos-logos</packagereq>
<packagereq type="mandatory">bash</packagereq>
.........
<packagereq type="mandatory">[CUSTOM_PACKAGE_NAME]</packagereq>
</packagelist>
<group>
<comps>2)配置ks.cfg文件。创建ks.cfg文件并保存在isolinux/ks/ks.cfg位置上
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
#rootpw myPassword
# System language
lang en_US
# Firewall configuration
firewall --disabled
# System authorization information
auth --useshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use text mode install(for graphical setup comment or remove below text word)
text
#cmdline
# SELinux configuration
#selinux --enforcing
selinux --disabled
# Do not configure the X Window System
skipx
# Network information
network --bootproto=dhcp --device=dhcp
# Reboot after installation
reboot
# System timezone
timezone Asia/Kolkata
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
part /boot --fstype xfs --size=256
part swap --fstype swap --size=1024
part / --fstype xfs --grow --size=4000
reboot --eject
%packages
#below package name is you mention in comps.xml
@core
@core
%end
%post
mkdir /root/test/
%end3)isolinux.cfg文件存在于isolinux文件夹中。
。您可以看到下面的代码
label linux
menu label ^Install CentOS 7
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet以上代码执行默认的ks.cfg文件。用下面的代码替换以配置自定义ks文件
label linux
menu label ^Install CentOS 7
kernel vmlinuz
append initrd=initrd.img inst.ks=hd:LABEL=CentOS\x207\x20x86_64:/ks/ks-noraid.cfg inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet4)创建回购命令。打开iso文件夹并执行以下命令。
createreop -g ../comps.xml执行下面的命令来创建iso
mkisofs -o /root/centos7_test.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "CentOS 7 x86_64" -R -J -v -T isolinux/. .https://serverfault.com/questions/892372
复制相似问题