制作centos6的启动光盘boot.iso
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了制作centos6的启动光盘boot.iso相关的知识,希望对你有一定的参考价值。
思路:参考ISO光盘文件,制作boot6.iso
1、将光盘isoliunx目录复制到data/myiso目录下,ks6-mini.cfg文件复制到/data/myiso/ksdir下,结构如下:
[[email protected] ~]# tree /data/myiso
/data/myiso
├── isolinux
│?? ├── boot.cat
│?? ├── boot.msg
│?? ├── grub.conf
│?? ├── initrd.img
│?? ├── isolinux.bin
│?? ├── isolinux.cfg
│?? ├── memtest
│?? ├── splash.jpg
│?? ├── TRANS.TBL
│?? ├── vesamenu.c32
│?? └── vmlinuz
└── ksdir
└── ks6-mini.cfg
2 directories, 12 files
2、修改isolinux.cfg文件
cd isolinux/
vim isolinux.cfg
内存检测删掉
本地安装留下,且留作默认项(重要)
救援模式删掉
增加桌面安装
label desktop
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/ksdir/ks6_desktop.cfg
增加最小化安装
label mini
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/ksdir/ks6_mini.cfg 效果如下:
[[email protected] isolinux]# vim isolinux.cfg
default vesamenu.c32
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to CentOS 6.10!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img
label vesa
menu label Install system with ^basic video driver
kernel vmlinuz
append initrd=initrd.img nomodeset
label local
menu label Boot from ^local drive
localboot 0xffff
label desktop
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/ksdir/ks6_desktop.cfg
label mini
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/ksdir/ks6_mini.cf
3、.生成boot.iso文件
mkisofs -R -J -T -v --no-emul-boot --boot-load-size 4 --boot-info-table -V "CentOS 6.9 x86_64 boot" -b isolinux/isolinux.bin -c isolinux/boot.cat -o /root/boot.iso /data/myiso/ 效果如下:
[[email protected] ~]# mkisofs -R -J -T -v --no-emul-boot --boot-load-size 4 --boot-info-table -V "CentOS 6.9 x86_64 boot" -b isolinux/isolinux.bin -c isolinux/boot.cat -o /root/boot.iso /data/myiso/
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage 1.1.9 (Linux)
Scanning /data/myiso/
Scanning /data/myiso/ksdir
Scanning /data/myiso/isolinux
Excluded: /data/myiso/isolinux/TRANS.TBL
Excluded by match: /data/myiso/isolinux/boot.cat
Writing: Initial Padblock Start Block 0
Done with: Initial Padblock Block(s) 16
Writing: Primary Volume Descriptor Start Block 16
Done with: Primary Volume Descriptor Block(s) 1
Writing: Eltorito Volume Descriptor Start Block 17
Size of boot image is 4 sectors -> No emulation
Done with: Eltorito Volume Descriptor Block(s) 1
Writing: Joliet Volume Descriptor Start Block 18
Done with: Joliet Volume Descriptor Block(s) 1
Writing: End Volume Descriptor Start Block 19
Done with: End Volume Descriptor Block(s) 1
Writing: Version block Start Block 20
Done with: Version block Block(s) 1
Writing: Path table Start Block 21
Done with: Path table Block(s) 4
Writing: Joliet path table Start Block 25
Done with: Joliet path table Block(s) 4
Writing: Directory tree Start Block 29
Done with: Directory tree Block(s) 3
Writing: Joliet directory tree Start Block 32
Done with: Joliet directory tree Block(s) 3
Writing: Directory tree cleanup Start Block 35
Done with: Directory tree cleanup Block(s) 0
Writing: Extension record Start Block 35
Done with: Extension record Block(s) 1
Writing: The File(s) Start Block 36
22.21% done, estimate finish Fri Feb 1 05:06:43 2019
44.31% done, estimate finish Fri Feb 1 05:06:41 2019
66.49% done, estimate finish Fri Feb 1 05:06:40 2019
88.60% done, estimate finish Fri Feb 1 05:06:40 2019
Total translation table size: 5380
Total rockridge attributes bytes: 1912
Total directory bytes: 4096
Path table size(bytes): 40
Done with: The File(s) Block(s) 22396
Writing: Ending Padblock Start Block 22432
Done with: Ending Padblock Block(s) 150
Max brk space used 1a000
22582 extents written (44 MB)
4、将boot.iso文件导出系统,新开一台虚拟机,挂载boot.iso,并设置光盘引导启动,在root下可以找到 boot.iso
[[email protected] isolinux]# ls /root
anaconda-ks.cfg boot.iso install.log install.log.syslog
sz boot.iso到桌面,
在虚拟机电源处点击“打开电源时进入固件”,即可设置,
5、开机成功,显示我们通过isolinux.cfg修改过的菜单选项,默认本地安装,选择其他选项将进行对应系统的自动安装
以上是关于制作centos6的启动光盘boot.iso的主要内容,如果未能解决你的问题,请参考以下文章
基于kickstart实现网络共享以及制作光盘和U盘实现半自动安装centos6系统