Difference between revisions of "ISO Images"

From TheBestLinux.com
Jump to navigation Jump to search
Line 2: Line 2:
 
ISO Image Command Line Examples
 
ISO Image Command Line Examples
 
</h3>
 
</h3>
 +
 +
'''Create ISO Image From Any Disk or File Structure'''
 +
* If it is a disk you are copying to an ISO image, first un-mount it, using the umount command:
 +
(Only one of the below commands are required, depending on your system and how it automatically mounts disks)
 +
<pre style="color:blue">
 +
umount /mnt/cdrom
 +
 +
OR
 +
 +
umount /mnt/sdd
 +
 +
OR
 +
 +
umount /mnt/sr0
 +
 +
OR
 +
 +
umount /run/media/username/disk_name
 +
 +
</pre>
 +
 +
* Use the dd command to create an exact image of the disk or file system:
 +
(Again, use the correct mounting point for your particular Linux system)
 +
<pre style="color:blue">
 +
dd if=/dev/sr0 of=ISO_Image_File_Name.iso
 +
</pre>
 +
 +
* A really nice way of creating an ISO image using the dd command along with some other command line arguments,
 +
to create a nice ncurses based status indicator while it creates the image, allowing you to monitor the progress of ISO image creation:
 +
<pre style="color:blue">
 +
(pv -n /dev/sr0 | dd of=MP3s_G_through_J-3.iso bs=2048 conv=notrunc,noerror) 2>&1 | dialog --gauge "Creating ISO Image...  Please stand by..." 10 70 0
 +
</pre>
 +
 +
 
'''Create ISO Image from Mounted CD or DVD:'''
 
'''Create ISO Image from Mounted CD or DVD:'''
 
* In the example below:
 
* In the example below:

Revision as of 19:55, 2 July 2015

ISO Image Command Line Examples

Create ISO Image From Any Disk or File Structure

  • If it is a disk you are copying to an ISO image, first un-mount it, using the umount command:

(Only one of the below commands are required, depending on your system and how it automatically mounts disks)

umount /mnt/cdrom

OR

umount /mnt/sdd

OR

umount /mnt/sr0

OR 

umount /run/media/username/disk_name

  • Use the dd command to create an exact image of the disk or file system:

(Again, use the correct mounting point for your particular Linux system)

dd if=/dev/sr0 of=ISO_Image_File_Name.iso
  • A really nice way of creating an ISO image using the dd command along with some other command line arguments,

to create a nice ncurses based status indicator while it creates the image, allowing you to monitor the progress of ISO image creation:

(pv -n /dev/sr0 | dd of=MP3s_G_through_J-3.iso bs=2048 conv=notrunc,noerror) 2>&1 | dialog --gauge "Creating ISO Image...  Please stand by..." 10 70 0


Create ISO Image from Mounted CD or DVD:

  • In the example below:
    • Replace "IMAGE_NAME.ISO" with what you want to name the ISO image file.
    • Replace "/run/media/dir_disk_mounted_on/" with the entire path that the disk is mounted on.
    • This exact same command can also be used to create an ISO image containing any mounted directory tree.
    • Switches used in below example: -v = verbose output, -J and -R = Juliet & RockRidge extensions included for Windows compatibility.
genisoimage -o IMAGE_NAME.ISO -v -J -R /run/media/dir_disk_mounted_on/