How to: Mount an ISO image under Linux

by nixcraft on March 29, 2004 · 51 comments

An ISO image is an archive file (disk image) of an optical disc using a conventional ISO (International Organization for Standardization) format. ISO image files typically have a file extension of .ISO. The name "ISO" is taken from the ISO 9660 file system used with CD-ROM media, but an ISO image can also contain UDF file system because UDF is backward-compatible to ISO 9660.

You can mount an ISO images via the loop device under Linux. It is possible to specify transfer functions (for encryption/decryption or other purposes) using loop device.

But, how do you mount an ISO image under Linux? You need to use mount command as follows:

Procedure to mount ISO images under Linux

1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

2) Create the directory i.e. mount point:
# mkdir -p /mnt/disk

3) Use mount command as follows to mount iso file called disk1.iso:
# mount -o loop disk1.iso /mnt/disk

4) Change directory to list files stored inside an ISO image:
# cd /mnt/disk
# ls -l

More about loop device

A loop device is a pseudo-device that makes a file accessible as a block device. Loop devices are often used for CD ISO images and floppy disc images. Mounting a file containing a filesystem via such a loop mount makes the files within that filesystem accessible. They appear in the mount point directory using above commands.

See also:

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 51 comments… read them below or add one }

1 Mills September 15, 2004

Cheers, worked like a charm :-)

Reply

2 Anonymous April 27, 2005

Quick comment:
You need the kernel module loop for it; people that get the error about it in mount should get the latest copy of the linux source and proceed to compile the correct module which is under block devices
Other than that it works ;)

Reply

3 sshawnn November 5, 2006

Just what i needed, mahalo!

Reply

4 Hashim January 10, 2007

Thanks! This was very very easy to find and follow. I’m new to linux and this is the reason I made the swicth, the help that everyone give make learning linux easy and fun. Thank you for your time, thank you!

Reply

5 ORB April 18, 2007

sweet! worked cleanly, no stupid paid software for windows needed to do such a simple task!

Reply

6 richard July 7, 2007

Looks like we cant mount it for RW. Bloody well then.

Reply

7 Gary August 16, 2010

You’d have to finalize the RW disc so that it becomes an iso image. You can still erase the disc later.

Reply

8 hkgo78 September 29, 2011

I think he means mounting the iso file for reading and writing.

Reply

9 Reggie July 19, 2007

This tip was a great help! I only need to read the iso for installations so thanks a heap!

Reply

10 kvz August 2, 2007
11 artiomix August 2, 2007

richard, to edit bootable ISO mount it as it’s described here, copy it’s contents to some directory, edit files you need and generate new ISO by command:

sudo mkisofs -o /tmp/new.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V “new iso name” .

or

read this

Reply

12 Raul Trujillo January 30, 2008

Works like a charm. It kept me from Burning a DVD for a computer that didn’t read DVDs. I did a Net Install of Linux over FTP. I copied the File to a Linux FTP Server, mounted the ISO and did an install. Sweet.

Reply

13 hedron February 4, 2008

But what if I don’t have root? Or am too lazy to su or sudo?

Reply

14 PICCORO April 30, 2008

the .img .iso and .nrg images can mounted directly, only change the options for loop and offest..

the other types (.b5i , .daa , .cdd , .cue , .bin , .xbo , .mdf , .cda , .pdi ) can mounting by the cdemu/cdemuserspace module for linux kernels, here all packages for debian users:

qgqlochekone.blogspot.com/2008/04/iso-linux-debian-venenux-tools.html

other method is coverting the image to native iso image and then mounting normaly..

in the McKAY blog are all convertion utilitys for al image types, including .daa (poweriso) and pdi (instancopy)

Reply

15 PICCORO April 30, 2008

also:

u dont need su or sudo for mounting, that is stupid..

only added user to cdrom and disk groups an mount groups, and now user can mounting without any su or sudo permissions..

McKAY’s isos tools and converters for VENENUX/debian

Reply

16 Guido Flohr May 2, 2008

@hedron: You need root access to mount any device, unless it is listed in /etc/fstab and has the option “user”. That also answer your question: Set up a filename convention for the iso image (/home/user/mountme.iso) and the directory where to mount it (/home/user/mountmehere), add an appropriate line to /etc/fstab, don’t forget the option to allow ordinary users to mount the pseudo device, and you’re done.

Reply

17 linuxuser May 9, 2008

SALAM
Thanks alot

Reply

18 Knusper May 15, 2008

Wonderfull! Works!

Reply

19 PICCORO June 3, 2008

root acces is not necesary, u must added u’r username to cdrom’s group, user’s group and disk’s group for mounting access command

the tool to manage virtual devices as iso images is CDemu compilation and has two brands, old and new..

old is called “cdemu” and only it for kernels 2.4, 2.6.8 and 2.6.17 to 2.6.20

new last is renamed to cdemu-userspace, and it for new recents kernels 2.6.22 and above..

for more info see cd convertion tools and McKAY debian iso tools

Reply

20 poysan June 19, 2008

Um, what if it comes back asking for a fs type? RH50ES states “you must specify the filesystem type”.

Reply

21 vivek June 19, 2008

iso9660 used for ISO images, try
mount -t iso9660 -o loop disk1.iso /mnt/disk

Reply

22 himadri June 27, 2008

hey vivek , great allround effort this .. I have feeds from your site and follow your site religiously ..

Reply

23 Mike July 10, 2008

FYI, I have seen “disk1.iso: Permission denied” errors. This can be corrected by adding a ro flag.

mount -t iso9660 -o loop,ro disk1.iso /mnt/disk

Reply

24 Gn0m3r.X October 12, 2008

The right way of doing this is
$>modprobe loop
$>mount -t iso9660 -o loop disk1.iso /mnt/disk
Coz in the new kernels loop is compiled as a module

Reply

25 mian October 31, 2008

Dear ,

r u sure dat it’ll work.

mail me @ usama.comsys@gmail.com

I need support regarding ISO images of servers @ Freebsd6.2

Reply

26 Gn0m3r.X November 7, 2008

Sorry I forgot to mention that u need to ‘modprobe’ only if u get this error
mount: could not find any device /dev/loop#

Reply

27 Miladin December 18, 2008

Thanks, it worked perfectly :)

Reply

28 Jim February 12, 2009

Top of the google results! Thanks for the help.

Reply

29 Gary February 15, 2009

Hey all,

Wondering if you can help me on this one. I am pretty new to linux and playonlinux but i am having trouble with this iso file. I am using mandriva spring 2009 and i have KDE version 3.5. I am using wine version 1.1.4. I have downloaded rollercoaster tycoon 2 as an iso file and it won’t let me mount the file. I can create a directory but as soon as i go to mount the iso file i get the following message:

Can’t find rollercoastertycoon2.iso/mnt/iso in /etc/fstab or /etc/mtab.

This is probably something stupid that i am missing cause for some odd reason mandriva likes to go round the world for a shortcut. If anyone can help me on this it would be well appreciated cause i am a fast learner and once i am successful the first time i will beable to do this no problem time after time again.

Thanks for all the help i receive

Reply

30 LeiMai March 19, 2009

I tried
mount -t iso9660 -o loop disk1.iso /mnt/disk
but it doesn’t work for .mdf/.mdf files tells me is a wrong fs type or bad option. Is there another way to mount alcohol images in linux or will I just have to convert it?

Reply

31 andrae March 31, 2009

you’re the best :-))

Reply

32 sahil May 2, 2009

you may use acetoneiso for gui…..

Reply

33 kalyani May 14, 2009

thanks a lot……….its awesome!!

Reply

34 Dokjae June 20, 2009

Hi all. I am fairly new to linux, but I need create an ISO from files that are already on my hdd. I’ve searched and to no avail, i’ve not been able to find any info on making an ISO from files that aren’t on CD/DVD. Any help with this would be greatly appreciated. Thanks so much.

Reply

35 Vivek Gite June 21, 2009

Use mkisofs command. Create an ISO file that can be opened on both windows and Linux computer for /home/vivek directory.
mkisofs -v -o /tmp/test.iso -R /home/hosting-app
See the following:
http://www.cyberciti.biz/tips/how-do-i-write-cd-at-debain-linux-command-prompt.html

Reply

36 Dokjae June 21, 2009

Thanks Vivek. This got me thinking… Is it possible to “take a snapshot” of drive with the system installed and make a bootable CD with the image? Possibly it becoming a system recovery?

Reply

37 Vivek Gite June 21, 2009

Yes, you can create full recovery tape or dvd with help of dump and restore command.

Reply

38 yogesh July 18, 2009

i have an iso image of rhel 5.1 dvd pls let me know how to burn it to dvd on command line.

Reply

39 john August 6, 2009

works great assuming you watch your upper and lower case on the iso name, ha ha

thanks

Reply

40 Rico October 21, 2009

Very nice, and simple, how-to. Not much of a Linux guy and this was easy enough I was able to get it the first time I tried.

Any chance you could tell me how to unmount it now?

Reply

41 soul November 15, 2009

# mount -t iso9660 -o loop,ro /xx/xx.iso /mnt/iso
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so
flyby

Reply

42 Simply Laz November 17, 2009

Same as soul. Trying to mount Diablo 2 LoD disk. It may be the secureROM and etc securities on the image but I doubt it. Xubuntu Karamic (9.10) using XFCE Terminal 0.4.2. Driving me nuts. Next step gui f**k it : )

Reply

43 soul.. November 20, 2009

about my previous mesage and error i tryed many other issos, so i think i got bad iso(damaged or something…)

Reply

44 krow king January 3, 2010

if you want to unmount the iso file just type

# umount /mnt/disk
disk is the name of the folder you created.

you can then remove the directory

# rmdir /mnt/disk

Reply

45 Jay_Linux January 14, 2010

How to make a multi-distro bootable USB disk, using ISO images ?

Reply

46 vivek August 27, 2010

hai,

After extracting the .iso image, i cant able to change the permission of that extracted files.not even to change the ownership.Any help with this would be greatly appreciated. Thanks so much.

Reply

47 Marcelo March 22, 2011

Plz help, im 100% new to linux and i have no clue what im doing!! i tried to copy what the instructions says but it says there is no such directory… can anyone help me??

Reply

48 Harsh April 1, 2011

Exactly what i was looking for……Thanks

Reply

49 mischa July 1, 2011

Thank you, this really helps. Its fine to get a clear and easy instruction!

Reply

50 Bruno July 22, 2011

What if I want to mount an ISO file as the CD, like Daemon Tools, how can I do that?

Reply

51 Abhishek Kasina January 23, 2012

Thank you :)

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 11 + 2 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.




Next post: