Difference between revisions of "Iso"

From Noah.org
Jump to navigationJump to search
 
m
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
 +
[[Category:Drives_and_Filesystems]]
 +
 +
For mounting and working with hard disk images see [[http://www.noah.org/wiki/Disk_mounting#losetup_--_mount_individual_partitions_in_a_whole_disk_image]]. This includes using '''losetup''' to allow '''fdisk''' to work on image files instead of a real device.
  
 
== Working with ISO disk images ==
 
== Working with ISO disk images ==
 +
 +
Most of these notes are for Linux. I also have some notes at the end for Mac OSX. Note that `cdrecord` may actually be a link to `wodim` on Ubuntu which shouldn't matter.
 +
 +
=== copy a DVD or CD to iso file ===
 +
 +
<pre>
 +
dd if=/dev/dvd of=dvd.iso
 +
dd if=/dev/cdrom of=cd.iso
 +
</pre>
 +
 
=== create DVD iso image from files ===
 
=== create DVD iso image from files ===
 +
 
In this example, I make a DVD image from my SVN 'trunk' directory.
 
In this example, I make a DVD image from my SVN 'trunk' directory.
 +
 
<pre>
 
<pre>
 
mkisofs -r -J -allow-multidot -root=/trunk/ /home/noah/trunk/ > disk_image.iso
 
mkisofs -r -J -allow-multidot -root=/trunk/ /home/noah/trunk/ > disk_image.iso
 
</pre>
 
</pre>
 +
 +
=== create DVD iso image from VIDEO_TS directory ===
 +
 +
In this example the directory, "dvd_directory", should be a directory <em>above</em> where you would find VIDEO_TS and AUDIO_TS. Note that AUDIO_TS is not required. This will generate an ISO file that you can then burn to a disk.
 +
 +
<pre>
 +
mkisofs -dvd-video -o disk_image.iso dvd_directory
 +
</pre>
 +
 
=== mount CD or DVD iso disk image ===
 
=== mount CD or DVD iso disk image ===
 +
 
<pre>
 
<pre>
 
mkdir /media/loop
 
mkdir /media/loop
Line 14: Line 39:
  
 
=== Burn DVD iso image to DVD ===
 
=== Burn DVD iso image to DVD ===
 +
 
This assumes that /dev/dvd is a link to your DVD device.
 
This assumes that /dev/dvd is a link to your DVD device.
 +
 
<pre>
 
<pre>
 
growisofs -dvd-compat -Z /dev/dvd=disk_image.iso
 
growisofs -dvd-compat -Z /dev/dvd=disk_image.iso
 
</pre>
 
</pre>
  
=== How to mount .bin and .cue files on Linux ===
+
=== Burn CD iso image to CD ===
 +
 
 +
<pre>
 +
cdrecord -pad disk_image.iso
 +
</pre>
 +
 
 +
== How to mount .bin and .cue files on Linux ==
 +
 
 +
Note that mplayer can play videos from .bin files directly if they store VCD images.
 +
 
 
First install <code>bchunk</code>:
 
First install <code>bchunk</code>:
 +
 
<pre>
 
<pre>
 
sudo apt-get install bchunk
 
sudo apt-get install bchunk
Line 26: Line 63:
  
 
Run bchunk on the .bin and .cue files to convert to .iso:
 
Run bchunk on the .bin and .cue files to convert to .iso:
 +
 
<pre>
 
<pre>
 
bchunk disk_image.bin disk_image.cue new_disk_image
 
bchunk disk_image.bin disk_image.cue new_disk_image
Line 31: Line 69:
  
 
Then mount the .iso file:
 
Then mount the .iso file:
 +
 
<pre>
 
<pre>
 
mkdir /media/loop
 
mkdir /media/loop
mount -o loop -t iso9660 disk_image.iso /media/loop
+
mount -o loop -t iso9660 new_disk_image.iso /media/loop
 +
</pre>
 +
 
 +
=== VCD images generate two .iso files ===
 +
 
 +
If you get two .iso files after running bchunk then this means you are probably working with a VCD image. To handle these you can try cdemu (a linux kernel module). I have not tried this.
 +
 
 +
== Burn ISO under Mac OSX ==
 +
 
 +
From a Terminal shell run the following:
 +
 
 +
<pre>
 +
hdiutil burn image.iso
 
</pre>
 
</pre>

Latest revision as of 12:47, 23 February 2013


For mounting and working with hard disk images see [[1]]. This includes using losetup to allow fdisk to work on image files instead of a real device.

Working with ISO disk images

Most of these notes are for Linux. I also have some notes at the end for Mac OSX. Note that `cdrecord` may actually be a link to `wodim` on Ubuntu which shouldn't matter.

copy a DVD or CD to iso file

dd if=/dev/dvd of=dvd.iso
dd if=/dev/cdrom of=cd.iso

create DVD iso image from files

In this example, I make a DVD image from my SVN 'trunk' directory.

mkisofs -r -J -allow-multidot -root=/trunk/ /home/noah/trunk/ > disk_image.iso

create DVD iso image from VIDEO_TS directory

In this example the directory, "dvd_directory", should be a directory above where you would find VIDEO_TS and AUDIO_TS. Note that AUDIO_TS is not required. This will generate an ISO file that you can then burn to a disk.

mkisofs -dvd-video -o disk_image.iso dvd_directory

mount CD or DVD iso disk image

mkdir /media/loop
mount -o loop -t iso9660 disk_image.iso /media/loop

Burn DVD iso image to DVD

This assumes that /dev/dvd is a link to your DVD device.

growisofs -dvd-compat -Z /dev/dvd=disk_image.iso

Burn CD iso image to CD

cdrecord -pad disk_image.iso

How to mount .bin and .cue files on Linux

Note that mplayer can play videos from .bin files directly if they store VCD images.

First install bchunk:

sudo apt-get install bchunk

Run bchunk on the .bin and .cue files to convert to .iso:

bchunk disk_image.bin disk_image.cue new_disk_image

Then mount the .iso file:

mkdir /media/loop
mount -o loop -t iso9660 new_disk_image.iso /media/loop

VCD images generate two .iso files

If you get two .iso files after running bchunk then this means you are probably working with a VCD image. To handle these you can try cdemu (a linux kernel module). I have not tried this.

Burn ISO under Mac OSX

From a Terminal shell run the following:

hdiutil burn image.iso