LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 02: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, 02:45 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Like this...

mkdir /mnt/iso
mount -o loop knoppix.iso /mnt/iso
 
Old 12-04-2006, 02: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, 02: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, 03:10 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
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, 03:11 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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, 03:15 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 03:15 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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, 03:16 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Boy, are you getting a lot of help!!! Lots of mounties out today....
 
Old 12-04-2006, 04: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



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 04:40 PM
help mounting and installing from an ISO file tom_from_van Linux - Newbie 6 07-23-2005 10:09 AM
Gentoo. Problems with the loop device when mounting an iso file Snerkel Linux - Software 4 11-26-2004 03:34 PM
Gentoo. Problems mounting an iso file Snerkel Linux - Distributions 2 11-26-2004 03:32 PM
iso mounting enis2002 Slackware 4 04-16-2002 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06: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
Open Source Consulting | Domain Registration