LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to mount iso image as a virtual drive (https://www.linuxquestions.org/questions/linux-software-2/how-to-mount-iso-image-as-a-virtual-drive-637056/)

ameyjah 04-22-2008 10:52 AM

How to mount iso image as a virtual drive
 
Hello, I can you please tell me how to mount and unmount any .ISO image as virtual drive. I was using DEMON tools in XP. But could not find any solution for Ubuntu Gusty.

pljvaldez 04-22-2008 11:03 AM

mount -o loop -t iso9660 file.iso /mnt/test (of course, change file.iso to the *.iso filename and /mnt/test to the directory you want to mount it to).

bigrigdriver 04-22-2008 11:10 AM

You could install qemu. To run an iso, issue a command like this:
qemu -boot d -m 512 -cdrom <isoname>.iso

where the switches tell qemu to treat the iso as though it were a cd, and how much RAM to assign to qemu.

kdrlx 04-22-2008 11:28 AM

qemu to mount iso file ?
 
Quote:

Originally Posted by bigrigdriver (Post 3129239)
You could install qemu. To run an iso, issue a command like this:
qemu -boot d -m 512 -cdrom <isoname>.iso

where the switches tell qemu to treat the iso as though it were a cd, and how much RAM to assign to qemu.

qemu to mount an iso? I cant understand. :?

ameyjah 04-22-2008 11:48 AM

Quote:

Originally Posted by pljvaldez (Post 3129231)
mount -o loop -t iso9660 file.iso /mnt/test (of course, change file.iso to the *.iso filename and /mnt/test to the directory you want to mount it to).

This works. Can you please tell me how did you construct that command. Thanks a lot

forrestt 04-22-2008 11:59 AM

The -o means use the following options. The -t means use the following filesystem type. The mount command generally follows the pattern "mount device location". The loop option means the device you are using is located on an already mounted filesystem and must be "looped back" somewhere else. The iso9660 filesystem type is the standard filesystem for cdrom's. Put that all together and you get the above command.

HTH

Forrest

vsurlan 07-08-2010 09:51 AM

Quote:

Originally Posted by ameyjah (Post 3129273)
This works. Can you please tell me how did you construct that command. Thanks a lot

It's the most basic mkisofs usage.
-o loop indicates that it uses a loopback device since there is no actual drive involved
-t iso9660 indicates an ISO file system
file.iso is the file to mount
/mnt/test is the location where the file should be mounted

Don't forget that the result of this command is always read only. If you want to modify the contents of an ISO image you will have to use mkisofs such as mentioned here: Mount an ISO image.


All times are GMT -5. The time now is 06:44 PM.