mkisofs命令行格式
mkisofs [-adDfhJlLNrRTvz][-print-size][-quiet][-A <应用程序ID>][-b <开机映像文件>][-c <开机文件名称>][-hide <目录或文件名>][-hide-joliet <文件或目录名>][-m <目录或文件名>][-M <映像文件>][-o <映像文件>][-sysid <系统ID >][-V <volume ID >][-x <目录>][目录或文件] |
-o | 设置输出文件名 |
-V | Set Volume ID |
-v | verbose |
-m <目录或文件名> or -exclude <目录或文件名> | 排除某目录或文件,其将不会放入映像文件中 |
-M <映像文件> or -prev-session <映像文件> | Iso文件合并 与指定的映像文件合并 |
-no-emul-boot | Boot image is 'no emulation' image 非模拟模式启动 |
-b <开机映像文件> or -eltorito-boot <开机映像文件> | 指定在制作启动光盘时所需的开机映像文件 -b:启动image |
-c <开机文件名称> | -c:cat文件 制作启动光盘时,mkisofs会将开机映像文件中的全-eltorito-catalog*文件的全部内容作成一个文件 |
-J或-joliet | Generate Joliet directory information 生成Joliet 格式信息 Joliet是用于在 Windows 环境下使用的光盘 |
-R或-rock | Generate Rock Ridge directory information 生成Rock Ridge目录格式信息 Rock Ridge用于 UNIX/Linux 环境下的光盘。 文件名区分大小写,同时记录文件长度 |
-r或-rational-rock | 使用Rock Ridge 并开放全部文件的读取权限 |
-hide-rr-moved | Rename RR_MOVED to .rr_moved in Rock Ridge tree |
-hide | 使指定的目录或文件在ISO 9660或Rock RidgeExtensions的系统中隐藏 |
-hide-joliet <目录或文件名> | 使指定的目录或文件在Joliet系统中隐藏 |
-O | 采用 MD5 空间优化 |
-C <盘区编号,盘区编号> | 将许多节区合成一个映像文件时,必须使用此参数 |
-l -relaxed-filenames -gbk4dos-filenames -gbk4win-filenames | 允许长文件名 扩展的文件名 DOS下支持中文 WIN下支持中文 |
[root@mail home]# ls clamav |
[root@mail home]# mkisofs -o test.iso -v /home/guan /home/guant mkisofs 2.0 (i686-pc-linux-gnu) Scanning /home/guan Scanning /home/guan/.kde Scanning /home/guan/.kde/Autostart Scanning /home/guan/sun Scanning /home/guan/t1 Scanning /home/guan/t1/temp Scanning /home/guan/t1/temp/t11 Scanning /home/guant/t2/temp/t11 Scanning /home/guant/t2/temp/t11/t111 Using CLUST000.PDF;1 for Using CLUST001.PDF;1 for Using NTRAC000.DOC;1 for Using PRESE000.PPT;1 for Using CISCO000.MHT;1 for Writing: Done with: Initial Padbock Writing: Done with: Primary Volume Descriptor Writing: Done with: End Volume Descriptor Writing: Total translation table size: 0 Total rockridge attributes bytes: 0 Total directory bytes: 28672 Path table size(bytes): 168 Done with: The File(s) Writing: Done with: Ending pad block Max brk space used 21000 47760 extents written (93 Mb) [root@mail home]# |
[root@mail home]# ls -l test.iso -rw-r--r-- |
别忘了-r,否则做成的盘大写都变成小写,而且所有文件的权限都变成r_x
[root@mm guan]# ls /mnt/cdrom/ autorun EULA GPL images isolinux README-it.html README-ja.html README-ko.html README-pa.html README-pt_BR.html README-ru.html README-ta.html README-zh_CN.html README-zh_TW.html RedHat |
[root@mm guan]# mkiso -o linux-dev-redhat-as4r4.iso -v
-r /mnt/cdrom |
iso文件的检验最简单---------直接mount即可,相当于windows下的虚拟光驱
[root@mail home]# mount /home/test.iso /mnt/disk1 mount: /home/test.iso is not a block device (maybe try `-o loop'?) |
[root@mail home]# mount -o loop /home/test.iso /mnt/disk1 |
[root@mail home]# ls /mnt/disk1 4_root_l _bash_hi [root@mail home]# |
mkisofs -r -J -T -V "Custom RHEL4 Build" -o /home/guan/custom-RHEL4-dvd.iso \ |
-r -J: -rational-rock -b:启动image -c:cat文件 -no-emul-boot -boot-load-size 4: Set numbers of load sectors -boot-info-table:Patch boot image with info table |