Tuesday 12 June 2012

Mounting ISO images in *nix systems

Many times, while arguing Linux vs Windows many people brought forth the point that there's no software like Daemon Tools (in Windows) for creating Virtual CD/DVD ROMs in *nix. 

               The thing is that we don't actually need any kind of Virual CD/DVD emulation. It can be done natively. The only requirement is that the kernel of the system, should support loop devices. And don't worry, all latest kernel support it.


 WARNING: You need to be root or a sudoer to do this.

 Step 1: (Creating Mount Point)

          In any linux based system, you need a mount point to mount any Hard disk or Pen Drive or any loop devices, like this. Bluntly, its like a folder where you can access the contents of the device. Your hard disk will be mounted under /dev/sda1 or /dev/hda1. It differs from system to system.


          Conventionally, any mounting is done under the /mnt directory. so, we'll create a mount point there.

so, fire up your Terminal ;)


geekytux@fox ~ $ sudo mkdir /mnt/iso

  

 Step 2: (Mounting the Image)

         Now, the mount point is created. We'll mount our image in the mount point. Let's say the name our image file is Backup-Latest.iso We'll mount it by 

geekytux@fox ~ $ sudo mount -o loop Backup-Latest.iso


Now, our image is mounted and you can access the files inside the image by navigating through your terminal itself or by any file managers like Nautilus or Thunar on /mnt/iso

Step 3: (Unmounting the image)


       Ah, actually this step is not that compulsory. Your system will automatically unmount all mounts once you shutdown your PC. But, I've added this in case you want to unmount it on your own

geekytux@fox ~ $ sudo umount /mnt/iso



And also, you can create new mount points and mount multiple number of iso images at a time, unlike in Daemon Tools where the no. of Virtual Devices is limited. 

No comments:

Post a Comment