青岛公路建设集团有限公司网站,代表网站开发的logo,wordpress锁定文件,wordpress获取用户文章最近需要制作自动安装系统的iso镜像文件#xff0c;写个笔记以防忘记第一步、拿到iso原始文件#xff0c;我用的是rhel7.7的把rhel7.7文件复制出来到一个目录中第二步、编写一个名字叫ks.cfg文件内容如下#xff1a;#versionDEVELInstall OS instead of upgradeinstallKeybo…最近需要制作自动安装系统的iso镜像文件写个笔记以防忘记第一步、拿到iso原始文件我用的是rhel7.7的把rhel7.7文件复制出来到一个目录中第二步、编写一个名字叫ks.cfg文件内容如下#versionDEVELInstall OS instead of upgradeinstallKeyboard layoutskeyboard usRoot passwordrootpw --iscrypted $1$S9tWSvP1$Vyl.b9AEONgjTh08Acdfb.System languagelang en_US.UTF-8 --addsupportzh_CN.UTF-8Firewall configurationfirewall --enabledSystem authorization informationauth --useshadow --passalgosha512Use CDROM installation mediacdromUse graphical installgraphicalSELinux configurationselinux --disabledDo not configure the X Window Systemskipxeula --agreedReboot after installationreboot --ejectSystem timezonetimezone Asia/ShanghaiSystem bootloader configurationbootloader --locationmbrClear the Master Boot Recordzerombrbootloader --append crashkernelauto --locationmbr --boot-drivesdaPartition clearing informationclearpart --all drivessdaDisk partitioning informationreqpart --add-bootpart /boot --fstypeext4 --size512 --ondisksda#part /boot/efi --fstypeefi --ondisksda --size512 --fsoptionsumask0077,shortnamewinntpart pv.01 --fstypelvmpv --size1 --grow --ondisksdavolgroup rhel pv.01logvol / --fstypeext4 --size10240 --nameroot --vgnamerhellogvol swap --fstypeswap --size4096 --nameswap --vgnamerhellogvol /home --fstypeext4 --size10240 --namehome --vgnamerhellogvol /opt --fstypeext4 --size10240 --nameopt --vgnamerhellogvol /tmp --fstypeext4 --size10240 --nametmp --vgnamerhellogvol /usr --fstypeext4 --size10240 --nameusr --vgnamerhellogvol /var --fstypeext4 --size10240 --namevar --vgnamerhellogvol /toptea --fstypeext4 --size500 --nametoptea --vgnamerhel%packages%end%postsystemctl set-default multi-user.target%end第三步、这步关键啊博主在这里被坑了几个小时在镜像文件中isolinux/isolinux.cfg的文件在里面需要添加label ksmenu label autoinstallkernel vmlinuzappend initrdinitrd.img inst.kscdcrom:/ks.cfgmenu default记住一定要加这个不然在启动的时候他显示找不到卷标第四步、最后用mkisofs工具把文件夹制作成iso镜像文件就万事告成啦mkisofs -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -V rhel8.1x86_64_AUTO_Install -b isolinux/isolinux.bin -c isolinux/boot.cat -o /tmp/rhel8.1_auto_install.iso /tmp/redhat8.1_auto/之后用这个镜像安装系统的时候不用再手动去配置了。