LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2006, 03:43 PM   #1
Mikesoft
Member
 
Registered: Jun 2005
Location: England, Cheam
Distribution: Fedora Core 6
Posts: 96

Rep: Reputation: 15
Help mounting an iso file


How would I go about mounting an iso file in Linux?
 
Old 12-04-2006, 03:45 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Like this...

mkdir /mnt/iso
mount -o loop knoppix.iso /mnt/iso
 
Old 12-04-2006, 03:45 PM   #3
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
mount -o loop,ro -t iso9660 /path-to/image.iso <path-to-mount-point>
 
Old 12-04-2006, 03:51 PM   #4
Mikesoft
Member
 
Registered: Jun 2005
Location: England, Cheam
Distribution: Fedora Core 6
Posts: 96

Original Poster
Rep: Reputation: 15
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
 
Old 12-04-2006, 04:10 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
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
 
Old 12-04-2006, 04:11 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,277

Rep: Reputation: 126Reputation: 126
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.
 
Old 12-04-2006, 04:15 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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.
 
Old 12-04-2006, 04:15 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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
if the mount point does not already exist, you would have to create it with:
Code:
mkdir /mnt/Mikesiso
I have done this with full pathnames. Depending on where you are in the tree, you can use relative path names, but that is more confusing.

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.
 
Old 12-04-2006, 04:16 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Boy, are you getting a lot of help!!! Lots of mounties out today....
 
Old 12-04-2006, 05:10 PM   #10
Mikesoft
Member
 
Registered: Jun 2005
Location: England, Cheam
Distribution: Fedora Core 6
Posts: 96

Original Poster
Rep: Reputation: 15
wow thanks for all the help guys! Got it working
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting an ISO image from a CD different than mounting from HD? NoTiG Linux - Software 4 08-03-2005 05:40 PM
help mounting and installing from an ISO file tom_from_van Linux - Newbie 6 07-23-2005 11:09 AM
Gentoo. Problems with the loop device when mounting an iso file Snerkel Linux - Software 4 11-26-2004 04:34 PM
Gentoo. Problems mounting an iso file Snerkel Linux - Distributions 2 11-26-2004 04:32 PM
iso mounting enis2002 Slackware 4 04-16-2002 10:25 PM


All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration