Reference address: http://hi.baidu.com/bailang3106/blog/item/364aa700bee4d48fe950cdf0.html
Mkisofs is a tool commonly used in UNIX systems to create ISO image files. Although mkisofs manpage is the same as cdrecord, there are only a few common options. Now we can demonstrate several mkisofs syntaxes:
Mkisofs-O image_name.iso/home/Willie
Create the/home/Willie directory as the image_name.iso image file.
Mkisofs-o ha. iso-r/
Create the/directory as the ha. ISO image file and specify it as the Rock Ridge format.
You can use the Rock Ridge format to save file-related permissions.
Mkisofs-J-r/tmp | cdrecord speed = 4-v-data-
In this example, apart from adding the-J option to the joliet format (you can use the document name in Unicode storage), and directly throwing it to cdrecord for on the fly burning, saving the steps to create an image file.
Mkisofs (make ISO file system)
Function Description: Create an ISO 9660 image file.
Syntax: mkisofs [-addfhjllnrrtvz] [-print-size] [-Quiet] [-
<Application ID>] [-Abstract <ABSTRACT File>] [-B <Boot Image File>] [-Biblio] [-C
<Boot file name>] [-C <disk ID, disk ID>] [-copyright <copyright File>] [-hide
<Directory or file name>] [-hide-Joliet <file or directory NAME>] [-log-file <Record File>] [-m
<Directory or file name>] [-M <Boot Image File>] [-O <Image File>] [-P <Data Handler>] [-P
<CD issuer>] [-sysid <System ID>] [-v <cd id>] [-volset
<Volume Set ID>] [-volset-size <total number of discs>] [-volset-seqno <volume No.>] [-x
<Directory>] [directory or file]
Note: mkisofs can make the specified directory and file into an image file in ISO 9660 format for burning the disc.
Parameters:
-J ----- Joliet file system. The file name can contain 64 Chinese characters or 64 English letters.
-R -------- create a Linux/Unix CD format. Rockridge format
-Mac-name-the disc format used to create the Macintosh command
-G -------- make an Apple Computer in the same format (-the same as Apple)
-Joliet-long-Supports file names with 103 Chinese characters or 103 English letters. no limit on the number of bytes.
-Max-iso9660-filenames-file names in 37 bytes are supported in iso9660 format. 18 Chinese characters, 37 numbers, or 37 English letters)
-O ----------- MD5 space optimization
-X ----------- a file excluded from adding a file (-M and-exclude serve the same purpose)
-V "w98seboot" ------ set the disc size (-volid is also applicable)
-O mycd. ISO --------- set the output file name
-Hide -------------- hide the iso9660 file (invisible under DOS)
-Hkdden -------------- set the file hiding attribute (use dir in DOS
/AH)
-Hide-Joliet --------- hide the joliet File
-A ------------- set the application version. Create parameters that support Chinese names with the cdwin recording software (do not add this patch parameter to UNIX/liunx to support Chinese characters as well)
-Gbk4dos-filenames-dos support for Chinese (abbreviated as-gbk4d)
-Gbk4win-filenames --- win support for Chinese (abbreviated-gbk4w)
Extension parameter patch for file name naming
-L ------ supports 31-byte files in the iso9660 format (if this parameter is not added, only 12-byte file names are supported. Standard DOS 8.3 format)
-D ----------------- ignore the periodicity of file names (dikemu is required)
-L ----------------- allowed file names in the iso9660 format to start '.'
-N ----------------- ignore the file name version number (required for diskemu)
-Allow-lowercase ----- lowercase letters are allowed
-Relaxed-filenames --- seven bit extensions are allowed, except for the lower-case mother.
-Allow-multidot ----- allow multiple vertices in a file name "n. 5"
-U ------------------ load the preceding seven parameters to one
-D ------------------ disable redirection to deep Directories
Startup options
-Hard-disk-boot myhard. IMG ---- the boot file is an image file in hard disk format.
-B dos. IMG -------------------- Boot Image in floppy disk format
(-Identical eltorito-boot)
-B dos. IMG ------------------ enter the startup image of the Sun Workstation
-No-emul-boot ----------------- non-analog floppy disk startup (abbreviated as-no-E)
-C ------------- rename the boot. catalog file.
Required parameters for loading dikemu startup (application instance)
-U-c cctrv-no-e-B loader. Bin
Load startup parameter-no-e-B loader. Bin
This must be the case. Loader. Bin must only be in the light
The Startup File directory cannot be defined freely in ultraiso.
(And ultraiso cannot be used to modify the image created by mkisofs. Once modified, the image cannot be started)
-No-e-B D:/boot/loader. Bin
(Incorrectly Add the boot file)
-No-e-B boot/loader. Bin (incorrect boot file inclusion)
-No-e-B D:/loader. Bin (incorrect guide file)
The loader. BIN file can only be-no-e-B loader. Bin.
(Unable to change its loader. binfile path) The following are legal
-No-e-B loader. Bin
-No-e-B loader. Bin
-No-e-B loader. Bin
-No-e-B loader. Bin
Of course, at this time, you will also encounter that loader. Bin cannot be found.
This Startup File. Haha
There is also a case sensitivity issue. Please refer to the Case sensitivity issue.
Parameters of the Advanced Application List
-Graft-points ----- You can connect parameters in the form of a list (abbreviated as-Gr)
Key parameters are expressed in a list.
-Path-list list.txt-call list. TX to create and add files when multiple files are added.
-Hide-list hide.txt-hide the file as defined in hide.txt.
-Hide-Joliet-list hidej.txt-use the File defined in hidej.txt to hide the file.
-Hidden-list hidden.txt -you can call the hidden.txt definition to hide the object.
-Exclude-list exclude.txt-use exclude.txt to exclude the defined files
Mkisofs command
Example. bat
The content is as follows (enable the CD to support Chinese characters and add the parameter/R to be compatible with Unix/Linux formats)
Mkisofs-O example. iso-V "The New Light Disk is good! "-U-d-r
-Gbk4d-gbk4w-Gr-path list.txt-hide-Joliet-l
Hidej.txt-exclude-l exclude.txt
Definition of List Files
1. add files in different directories to the problem
Take-path list.txt as an example (-path-list is abbreviated as-path)
Add boot. ini ntdetect. com ntldr on the C drive to the CD
Three files in
Put these three files into a file named bootnt when creating an ISO disc.
Folder. Also add
C:/Windows/notepad.exe
This file is stored in the root directory of the CD. Add C:/Program
Files/Internet Explorer is placed in the folder named ie. Add
C:/Windows/regedit.exe create a file named
"Registry Folder/Windows Registry"
Answer:
In the following format: list.txt
Bootnt/= C:/boot. ini
Bootnt/= C:/ntdetect.com
Bootnt/= C:/ntldr
C:/Windows/notepad.exe
IE/= C:/program files/Internet Explorer
Registry Folder/Windows Registry/= C:/Windows/regedit.exe
2. Problem:
Files to be added to this folder. Exclude files not to be added.
Take-exclude-l hidej.txt as an example (-exclude-list
The abbreviated form is
-Exclude-l)
To add C:/program files/Internet Explorer
Exclude the Mui sub-
Folder and C:/program files/Internet Explorer
Hmmapi. dll file.
Because you have made this CD. I don't need these two files. So we need to exclude them.
In the format of exclude.txt
C:/program files/Internet Explorer/Mui
C:/program files/Internet Explorer/hmmapi. dll
3. Hidden problem files
Take-hide-Joliet-l hidej.txt as an example (-hide-Joliet-list
-Hide-Joliet-l)
To hide the sub-files Connection Wizard and
Iexplore. EXE file and C:/boot. ini file
Answer:
In the following format: hidej.txt
C:/program files/Internet Explorer/Connection Wizard
C:/program files/Internet Explorer/iw.e. exe
C:/boot. ini
Hide the file list file formats-hide-Joliet-L and-hide-L and
-Hidden-l Lattice
Is basically the same.
Note that
Mkisofs does not support Chinese characters for hidden files or folders
A file name or directory cannot hide a file with a Chinese name.
And does not support adding the list function.
The folder that is automatically created when the file is imported, but the files and words in the automatically created folder are hidden.
The folder hiding function can still be used.
Case sensitivity;
Mkisofs is case sensitive. If you cannot master certain skills, it is prone to errors.
The new file is case-insensitive.
The file added to the list.txt definition is case-insensitive.
C:/Windows/notepad.exe can also be written
C:/Windows/notepad.exe can be added
Function of adding the notepad.exe file to the Windows directory
It also has the ability to initialize the case-sensitive path name. If it is notepad.exe
, Nasheng
The ISO file is also notepad.exe.
In hidej.txt
When hiding a file, you must follow the case-sensitive path defined at the time of adding.
To hide the C:/Windows/notepad.exe file
You must reference the above
Path Name
Content in hidej.txt
C:/Windows/notepad.exe
It cannot be written as C:/Windows/notepad.exe. In this way, mkisofs is used.
The file cannot be found. That's it.
This notepad.exe cannot be hidden.
For example, a boot disc is in the diskemu format. The Startup File is all in E:/BT/boot
Folder
The command is as follows:
Hide the loader. Bin and boot folder commands
Mkisofs-O Bt. iso-u-d-gbk4w-gbk4d-no-e-B
Loader. Bin-hide-Joliet E:/BT/boot-hide-Joliet
Loader. Bin E:/BT/boot/loader. Bin
The loader. Bin and boot folder commands are not hidden.
Mkisofs-O Bt. iso-u-d-gbk4w-gbk4d-no-e-B
Loader. Bin-hide-Joliet E:/BT/boot-hide-Joliet
Loader. Bin E:/BT/boot/loader. Bin
Haha. It is caused by the size sensitivity. The dominant role is to name the file when it is added to the definition.
File Name. Add E:/BT to hide
E:/BT/boot should be written
-When hide-Joliet E:/BT/boot is hidden, it mainly depends on E:/BT
The written case.
For exclude.txt
The case sensitivity problem is also solved as above! :)
Use "/" not use "/" to express the path Separator in list form "/"
It is the opposite of the DOS separator.
The preceding application parameters are as follows:
Create in the root directory of mkisofs. example. bat
List.txt exclude.txt hidej.txt four new files
The content of example. bat is as follows (enable this CD to support Chinese characters and be compatible with Unix/Linux
Format)
Mkisofs-O example. iso-V "The New Light Disk is good! "-U-d-r-d
-Gbk4d-gbk4w-Gr-path list.txt-hide-Joliet-l
Hidej.txt-exclude-l exclude.txt
The list.txt content is as follows:
Bootnt/= C:/boot. ini
Bootnt/= C:/ntdetect.com
Bootnt/= C:/ntldr
C:/Windows/notepad.exe
IE/= C:/program files/Internet Explorer
Registry Folder/Windows Registry/= C:/Windows/regedit.exe
The content of exclude.txt is as follows:
C:/program files/Internet Explorer/Mui
C:/program files/Internet Explorer/hmmapi. dll
The content of hidej.txt is as follows:
C:/program files/Internet Explorer/Connection Wizard
C:/program files/Internet Explorer/iw.e. exe
C:/boot. ini
You can try it by yourself. The possible problem is that the file name is case sensitive.
Question !.
Negligible Parameters
-V (-verbose) -------- detailed information is displayed during Command Execution
(Optional)
-Log-file log.txt
----Create a log file log.txt (optional)
-Copyright "Chen Hua copyright"-sets the file version information (optional)
-Debug --------------- displays the ISO process generated (optional)
-Quiet --------------- no progress prompt (optional) when generating the image)