Important: this article is not released under a Creative Commons license and may not be copied or redistributed in any form. Please use our contact page to get in touch with us if you wish to reproduce the article.

Mounting bin and iso files in Linux


Nitin Venkatesh's Gravatar

Nitin Venkatesh
published Jan. 5, 2014, 12:01 a.m.


If you've encountered a .bin file and were wondering how to mount it on a Linux box, the iat tool is the answer you've been waiting for. (It's been around for a long time, but hey! You only look for something if you need it and that's why I am writing this post now :P )

Converting from .bin to .iso

The iat tool allows you to convert from .bin to .iso which you can then mount on your Linux box with ease. According to it's man page, iat allows for conversion from many CD-ROM image file formats, such as BIN,MDF,PDI,CDI,NRG and B5I to ISO-9660

To install iat on Ubuntu machines: (Other distro users may want to search their repos

sudo apt-get install iat

The syntax for using iat is extremely straight-forward:

iat source.bin target.iso

For example, if I were to convert an Ubuntu CD-ROM image from BIN to ISO-9660 (even though Ubuntu is nice enough to provide us with .iso files), I'd use:

iat ubuntu-12.04-desktop-i386.bin ubuntu-12.04-desktop-i386.iso

and the .iso file would be created in the same directory in a few seconds depending on the size of the source file.

Mounting .iso files (using the file browser)

You can mount the file using nautilus, the default file browser on your system as well. Just right-click on the file, and choose the option Open with Archive Mounter. Now you'll see the drive mounted in the sidebar. After using it, you can unmount it like you'd do with any other device, by clicking the Eject button.

screenshot right-click dialog

screenshot mounted disc

<hr/>

Mounting .iso files (the command-line way)

Step 1: Setup a mount point:

I usually have one directory in my /mnt to mount .iso files for temporary usage. So let's go ahead and create one. You'll need to use sudo to have permissions to create directories in /mnt and to mount the iso file.

nits@excalibur:~$ sudo mkdir -p /mnt/temp_disc
[sudo] password for nits:

Step 2: Mounting the iso at the mount point:

To mount an .iso file we use the loop option in mount. So, we do something like,

nits@excalibur:~$ sudo mount -o loop ubuntu-12.04-desktop-i386.iso /mnt/temp_disc
mount: warning: /mnt/temp_disc seems to be mounted read-only.

The .iso file is now mounted, but as a read-only. This is more than enough to copy files from the mounted drive for other usage.

nits@excalibur:~$ ls -la /mnt/temp_disc/
total 2490
dr-xr-xr-x 1 root root    2048 Apr 23  2012 .
drwxr-xr-x 7 root root    4096 Jan  5 11:17 ..
-r--r--r-- 1 root root     134 Apr 23  2012 autorun.inf
dr-xr-xr-x 1 root root    2048 Apr 23  2012 boot
dr-xr-xr-x 1 root root    2048 Apr 23  2012 casper
dr-xr-xr-x 1 root root    2048 Apr 23  2012 .disk
dr-xr-xr-x 1 root root    2048 Apr 23  2012 dists
dr-xr-xr-x 1 root root    2048 Apr 23  2012 install
dr-xr-xr-x 1 root root   18432 Apr 23  2012 isolinux
-r--r--r-- 1 root root    4237 Apr 23  2012 md5sum.txt
dr-xr-xr-x 1 root root    2048 Apr 23  2012 pics
dr-xr-xr-x 1 root root    2048 Apr 23  2012 pool
dr-xr-xr-x 1 root root    2048 Apr 23  2012 preseed
-r--r--r-- 1 root root     231 Apr 23  2012 README.diskdefines
lr-xr-xr-x 1 root root       1 Apr 23  2012 ubuntu -> .
-r--r--r-- 1 root root 2502608 Apr 19  2012 wubi.exe

Step 3: Unmount the mounted iso file:

nits@excalibur:~$ sudo umount /mnt/temp_disc/

Cross-posted from Nitin's blog