Help mounting an iso file
How would I go about mounting an iso file in Linux?
|
Like this...
mkdir /mnt/iso mount -o loop knoppix.iso /mnt/iso |
mount -o loop,ro -t iso9660 /path-to/image.iso <path-to-mount-point>
|
Thanks for that help but Im still confused! :P
My iso file is located at Mike/Desktop/ (iso here) How would I mount it? Sorry just dont understand what has been said above. Im a bit of a windows user :P |
You need to make a folder to put the iso contents into. That's why I made a folder called /mnt/iso .
mkdir /mnt/iso Then, the mount command put the iso contents into that folder... mount -o loop Mike/Desktop/(iso here) /mnt/iso |
Normally when you do a mount, it's "mount (options) device directory". Options begin with a hyphen ("-"). Device is usually something like "/dev/sda". And the directory is just a directory such as /movies that you've created with a mkdir command, such as "mkdir /movies".
Let's take the case of where the .iso file is on your desktop. In your case, "Mike" I believe, it would probably be "/home/Mike/somename.iso". Let's assume that it's a movie that you want to play, and create a directory to play all movies. I'm kinda sloppy about this by not subdirring out of "/mnt". So, I just made a movies directory by "mkdir /movies". So, where does that put us? Let's say that you ripped "Prisoner Of Azkaban".iso to your desktop. The embedded spaces are a nuisance, of course, but the mount command could be: "mount -o loop /home/Mike/"Prisoner Of Azkaban".iso /movies". You could also add the ",ro" (read only) as mentioned above. You could also add the "-t iso9660", as well. My system doesn't require either of those, so I don't usually bother. If you can see the file when you do a "ls"; i.e. if you're in the same directory as the file, you could shorten the command to: mount -o loop "Prisoner Of Azkaban".iso /movies Of course, "/movies" could be any directory on your system. Just be sure to understand that if you use a directory that has other files or directories under it, those will be unreachable until you unmount your iso file. Good luck. |
First you need some place to mount the iso file. If doesn't matter what you call this directory. Let's say it's called /mnt/iso. Then as root, "mkdir /mnt/iso" will create the directory.
Since the iso file is in /home/mike/desktop, cd there first to make the mount command shorter. "cd /home/mike/Desktop/". You haven't said what the name if the iso file is, so for the sake of example, let's suppose that it is example.iso. The type of filesystem that a CDROM uses is called "iso9660". Look in the "man mount" manpages for options and filesystems I haven't mentioned. You probably want to su to root before mounting the image unless you have sudo setup. # sudo mount -t iso9660 example.iso /mnt/iso/ -o ro,defaults,unhide,loop The filesystem type is given after the "-t". The image is given before the mount location. The options are given after the "-o". The magic is due to the loop option, which allows you to mount an image of a filesystem as if it were the filesystem itself. Because the iso9660 filesystem is readonly, you can only read from it. You can not access the iso contents in the /mnt/iso directory. |
Take a look at the man page for "mount"---ie do "man mount" in a terminal window.
To take apart the command, it is basically this: mount <with these options> <using this file system> <this file> <to this mount point> So, suppose you want to mount your file to /mnt/Mikes_iso The command previously given would look like this: Code:
mount -o loop,ro -t iso9660 /home/Mike/Desktop/<isofilename> /mnt/Mikesiso Code:
mkdir /mnt/Mikesiso I used the case of a mount point in /mnt, but it can be anywhere. Just don't use a directory with data in it, or it will be hidden (until you unmount) BTW: "mount" is really misleading--it goes back to the days of tape drives. "Connect" is far more descriptive of what is happening. |
Boy, are you getting a lot of help!!! Lots of mounties out today....;)
|
wow thanks for all the help guys! Got it working ;)
|
All times are GMT -5. The time now is 01:53 PM. |