Creating an ISO Image under Unix(-like)

Here are a couple of different commands for creating an ISO image:

[root@server /root]# mkisofs -RJ -o image.iso /burndirectory/
[root@server /root]# mkisofs -J -o image.iso /burndirectory

mkisofs -o image.iso -b images/boot.img -c boot.cat -R -J -T /my/file/tree

ex.

[root@jackie Selena]# mkisofs -V dni-tr069-v49 -J -joliet-long -r -o dni-tr069.iso dni-tr069/
[root@jackie Selena]# mount -o loop -t iso9660 dni-tr069.iso /mnt/isoimage


The options (-RJ) will preserve long filenames, casing and Rock Ridge extensions (long mixed-case filenames and symbolic links for *nix).

   -J  Generate Joliet directory records  in  addition  to
       regular iso9660 file names.  This is primarily use-
       ful when the discs are to be used on Windows-NT  or
       Windows-95  machines.    The  Joliet  filenames are
       specified in Unicode and each path component can be
       up to 64 Unicode characters long.

   -R  Generate  SUSP  and RR records using the Rock Ridge
       protocol to  further  describe  the  files  on  the
       iso9660 filesystem.

 

 

Install cdrtools on Mac OS X

※ Download source code and build/install it.

$ wget -c ftp://ftp.berlios.de/pub/cdrecord/cdrtools-3.00.tar.bz2

$ tar jxvf cdrtools-3.00.tar.bz2

$ cd cdrtools-3.00

$ make

$ sudo make install

$ echo "# Cdrtools" >> ~/.bash_profile

$ echo "export PATH=:${PATH}:/opt/schily/bin" >> ~/.bash_profile


※ Install cdrtools by macports

$ sudo port install cdrtools dvdrtools

Password:

--->  Computing dependencies for cdrtools

--->  Fetching cdrtools

--->  Attempting to fetch cdrtools-3.00.tar.bz2 from http://distfiles.macports.org/cdrtools

--->  Verifying checksum(s) for cdrtools

--->  Extracting cdrtools

--->  Configuring cdrtools

--->  Building cdrtools

--->  Staging cdrtools into destroot

--->  Installing cdrtools @3.00_1

--->  Activating cdrtools @3.00_1

--->  Cleaning cdrtools

Create a Windows bootable CD/DVD with mkisofs

To create a bootable Windows XP CD/DVD using your Mac, you need:
  1. mkisofs -- a Linux program to create ISO file systems. This hint covers the installation of mkisofs for another purpose.
  2. Your Windows boot.img file. It is the boot image from the original CD of Windows XP (2048 bytes).

Copy all files (boot.img, mkisofs, and all from the Windows CD) into one folder, then cd to that folder in Terminal. Once there, here is the correct command to create working bootable Windows CD:


$ ./mkisofs -b boot.img -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V WinXP -v -x .DS_Store -o ../WinXP.iso .



On a PC the command should be:

$ mkisofs -b boot.img -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V XPSP3 -v -o "c:\WinXP.iso" c:\xpsp3\

Note:

This assumes the following:
You have the boot.img (rename from Microsoft Corporation.img) in the same directory as your Windows CD directory you'll be using to create the ISO.

The name of this directory is c:\xpsp3

The output ISO file will be located at c:\winxp.iso

You can use a free utility called ISO Recorder by Alex Feinman (Please donate) to burn it to your CD. Install it and afterwards you right click on the ISO file and click "Copy Image To CD".

 

 

☆ Creating an ISO Image On FreeBSD

$ mkisofs -a -f -l -r -J -o ~/test.iso ~/test/

 $ vnconfig vn0 test.iso

$ mount -t cd9660 /dev/vn0 /mnt/iso

$ ls /mnt/iso

$ umount /mnt/iso

$ vnconfig -u vn0

$ burncd -e -v -s 6 -f /dev/acd1c data test.iso fixate

Note:It should be install big5fs  first before running above procedures, then we could create an image which is include the files with traditional-chines filename.


 

arrow
arrow
    全站熱搜

    Bluelove1968 發表在 痞客邦 留言(0) 人氣()