Mounting .iso images manually in Ubuntu (using the terminal)
Posted by Pramod on July 3, 2008
I have been trying to mount .iso images on my Ubuntu these last days, i looked over the internet and found many solutions, including some ready made scripts and even some applications which help mount iso images, an example is Gmount-iso. I really did not like the way it mounts since when i mount it i have to create a folder on the Desktop and mount it there itself. I looked for some scripts and i tried using them but i was still not able to mount them.
Finally while searching for another solution i ended up on this site which had both ways of mounting the iso image. One way was to use the Nautilus Script which i was really not satisfied and the second way was mounting it manually through the gnome terminal using the Kernel Loop Module.
First let’s see what the Kernel loop module does as it stated in the site:
Using the module loop it is possible to mount a filesystem file. squashfs is a “loop” with (de)compression (Compressed Loopback Device) and it is possible to mount a compressed filesystem like a block device and seamlessly decompress its data while accessing it.
So, firstly we need to load the loop module. Open the terminal and type in:
sudo modprobe loop
Root access is needed so you will be prompted for your root password.
A folder is then created in the /media/ directory (This folder is the mount point of the .iso image) using:
sudo mkdir /media/anyname
“anyname” can be replaced by any name of your choice.
Now we need to mount the .iso image file.
To make my task easy, i open Nautilus (the ubuntu file browser) and navigate to where the .iso file is found. I then Right-Click -> Copy then return to the terminal and type in:
sudo mount
and after a space i just press Ctrl+Shit+V or Simply Right-click on the terminal background and paste. The path and the filename will already be pasted thus:
sudo mount path_and_filename.iso
and further we type in the mount point of the .iso image in this case: /media/anyname/ followed by -t iso9660 loop where “iso9660″ specifies the type of image file being mounted. There on the whole the code will look like this:
sudo mount path_and_filename.iso /media/anyname/ -t iso9660 -o loop
The iso image is now mounted and accessible from the desktop in the form of a CD/DVD icon
Well after using our mounted .iso file we need to unmount it in order not to leave tasks incomplete (just a small discipline):
sudo umount /media/anyname
Then we simply delete the mount point that we created:
sudo rmdir /media/anyname
I found this a bit more practical even if we got a lot to type but it allows me to create a mount point of my choice without any problem and really flexible…
Well i really want to create an application which will help me implement this using a gnome gui… or maybe there is already one (definitely not Gmount-iso since it does not let me create any folder int the /media/ directory-premission denied)
Any suggestion and help are welcome.
This small implementation will help out a lot and save a lot of time and do some clean jobs.


viccks said
suggestion!!
lol servi windows with nero
#€|!0$ said
That’s too easy… Hmmm and nero + windows is commercial… And i am currently using Nero 8 on my windows XP, but i do not know why i am not being able to burn my DVD’s
In the end i had to choose K3B in Linux
Rite$h said
y dnt u use software like PowerISO or even Alcohol to mount iso files on WindowsXP? Ok these are commercial software, but u n i both knw how to get the full version without buying
But still learning new things in Linux as well is a +
so keep it up
#€|!0$ said
Well am trying out the Open Source Alternatives… and frankly am tired of trying to use full version commercial software freely… So i tried Linux OS and the Softwares associated to it are obviously Open Source…
Looking forward to more ideas
Saurav said
Good choice mate, the real power is in command line.
valter said
For win you can as well just use the stock supplied VirtualCD from MS – the (last:-) address i know is http://support.microsoft.com/kb/916902 – search for “Virtual CD”. well, not exactly stock, not advertized etc. but it works well.
Also, have a question – Ubuntu 8.04 (livecd) cannot see my second SATA i just installed (for it), nor can Suse 10.2; attempt to upgrade GParted in U 8.04 failed – it appears i have latest version, so i went for D/L very last (test phase) of GP, tried to mount – and hit problems – all i got is quick usage/help and no actual reason for failure. thoughts?
i most certainly am not Linux guru, so if anyone throws a straw, pls be specific. finally, shame or not, XP saw the 2nd SATA w/o problems – and i was expecting it to be the other way around (for the partition tools).
appeataridet said
Thanks for the post
#€|!0$ said
@valter: check out this link… maybe it might help you out…
There have been quite some problems concerning Ubuntu and SATA…
link:
http://plug-and-pray.blogspot.com/2008/06/ubuntu-804-live-cd-and-weird-sata-hdd.html
valter said
that surely did the trick
right now finishing the partition of 2nd SATA and onto install U804
thank you!
$3|v3n said
for all those ignorant dudes out there who are saying its soo easy to mount an iso image on windows, maybe you may change opinion after hearing me, if you.. well i don’t give a f*ck.
To download Nero or whatever .. around 15minutes [searching and downloading]
To download the crack … around 15minutes searching + 1 minute downloading
To Launch the gui nero stuff, waiting it to mount, extracting stuffs from [since as far as i remember you need to extract it, before using it, its not 'mounted' in general by the system [3 minutes]
total =15+15+1+3=34 Minutes
each time after that it is 3 minutes per usage [remember you need to extract before using]
Probably because Helios wanted to explain the whole mount process you guys found it hard and difficult [well that's why we *nix people tend to make all types of silly jokes on how morons you are [apart vicks] :p]
now, lemme count the time needed to mount an iso image on linux
selven@yourbox$ sudo mkdir /mnt/anyname
selven@yourbox$ sudo mount path_and_filename.iso /mnt/anyname/ -t iso9660 -o loop
what’s that 1 minute of typing for someone who is a slow typer???
ahh so now you will say, “heh genius, not everyone knows thousands of linux commands ”
answer: thanks, but heh, it takes less than 7 seconds to type
man mount
and less than 5 minutes to understand what you want to do :p
so if you were a new comer, you would have taken around 5 minutes 7 seconds, call it 10 minutes to mount that and start being productive immediately after…. while the moron windows user was downloading and searching for cracks :p
have a nice day s*ckers:p
+$3|v3n