LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-30-2005, 08:13 AM   #1
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Rep: Reputation: 0
mounting .img files


Hi,

I am running SuSE 9.3 on my machine. Installed it through the cd-version. Now, I need some packcages which come only with dvd. I downloaded the .iso file and mounted it using the command

mount -o loop -t iso9660 suse93livedvd.iso /media/iso

This was done successfully. Then, I read the contents of the iso and found another image file - cloop.img . I want to mount this file and I had gone through a posting on linuxquestions.org explaining how to mount .img files. I tried using

mount -o loop file.img /mnt/somewhere

but it didn't work. The person who posted the solution (win32sux) said that the above command works only if it is not a compressed image.

Could anybody give me any pointers as to how could I mount/extract this image file.

Thanks in advace.

regards,

Harpreet
 
Old 05-30-2005, 10:23 AM   #2
spaniel
Member
 
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48

Rep: Reputation: 15
Try the following

Copy the file from the iso image to another place on your file system
rename it so that it has the .gz extension (Yes i know , this is not the most elegant way!!)

gunzip file.img.gz

mount -o loop file.img directory
 
Old 05-30-2005, 12:14 PM   #3
iamharpreet
LQ Newbie
 
Registered: May 2005
Location: Bangalore, India
Posts: 6

Original Poster
Rep: Reputation: 0
still not working

Hi,

I tried what u suggested. But I get the following error:

gunzip: cloop.img.gz: not in gzip format

Can you suggest something else ?

Thanks and regards,

Harpreet
 
Old 06-10-2005, 04:07 PM   #4
Boudewijn
Member
 
Registered: Nov 2003
Location: The Netherlands
Distribution: MDK: 10,10.1,10_amd64,9.2,9.1 . Debian: sarge,woody, Gentoo (X86 amd64 Sparc)
Posts: 219

Rep: Reputation: 30
Just mount it without gunzip
 
Old 06-10-2005, 05:27 PM   #5
Mr. New
Member
 
Registered: Oct 2004
Distribution: Kubuntu and Mac OS X
Posts: 80

Rep: Reputation: 15
does /mnt exist on your computer?
if not create it and try again
 
Old 06-11-2005, 05:04 AM   #6
spaniel
Member
 
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48

Rep: Reputation: 15
create mnt

Quote:
does /mnt exist on your computer?
Could you please explain to me what the purpose is of creating a directory called mnt in the root ?
You can just mount it on any directory u want!
 
Old 06-11-2005, 05:33 AM   #7
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
As (win32sux) stated this should mount your image
mount -o loop file.img /mnt/somewhere

However, I think the problem is that your trying to mount it from within /media/iso. Try moving your .img file to another temporary directory and then try mounting to /mnt/somewhere. Also make sure that /mnt/somewhere exists first.

md /mnt/somewhere

KC
 
Old 06-12-2005, 12:15 PM   #8
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
Read the man pages for 'mount' carefully. Once the first .iso is mounted, it should be possible to mount any part of it to another mount point with the command:

mount --bind olddir newdir

where oldir is the file within the .iso, and newdir is the directory to mount the file. Note that you *may* have to use the full path to the file in the mounted .iso, and the full path to the mount point.
 
Old 06-25-2005, 12:22 PM   #9
dj_prime
LQ Newbie
 
Registered: Oct 2004
Posts: 23

Rep: Reputation: 15
mount img file on xp pc

I have also got the same problem.

I get permission denied when I try to mount the img file that is on another pc across the network.

Can someone please tell me how you mount an img file that is not on the local machine without having to copy it over first. (coz copying it over first works)

Many thanks
 
Old 07-25-2005, 07:32 AM   #10
zaboy
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Spaniel is confusing GNU/Linux .img files, which are gzipped ext2 filesystems, with CD images created in Windows, which you cannot directly mount.
See http://linuxreviews.org/howtos/cdrecording/.
It links to an older version of ccd2iso, so you'll need to go to the sourcefourge page, and get version 0.2.
I had to edit the Makefile to use a newer version of automake on my system.

ACLOCAL = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run aclocal-1.6
AUTOCONF = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run autoconf
AUTOMAKE = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run automake-1.6
AUTOHEADER = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run autoheader
became
ACLOCAL = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run /usr/bin/aclocal-1.9
AUTOCONF = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run autoconf
AUTOMAKE = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run /usr/bin/automake-1.9
AUTOHEADER = ${SHELL} /data/dc/complete/linux/software/ccd2iso/missing --run autoheader

I successfully converted a Diablo 2 img file to iso.
 
Old 07-23-2010, 09:32 AM   #11
mingzhang
LQ Newbie
 
Registered: Jun 2010
Location: china
Posts: 6

Rep: Reputation: 0
Cool format the file.img

I have done it.
1. I used file.img to be my virutal floppy on Dos.
code: "format b:"
(b: is the file.img on my dos)
2. then "mkdir /mnt/floppy"
3. then "mount -t msdos -o loop file.img /mnt/flopppy"
 
Old 02-20-2011, 04:13 AM   #12
brunBjorn
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
Smile

I did it by creating /mnt/img. The I mounted the img file by using mount -o loop ...img /mnt/img
Works like a charm.
 
Old 01-05-2012, 06:15 AM   #13
privateren
LQ Newbie
 
Registered: May 2009
Posts: 10

Rep: Reputation: 0
impossible . You wont be able to mount an .img file like that
 
Old 01-05-2012, 06:48 AM   #14
amilo
Member
 
Registered: Oct 2011
Location: Nederland
Distribution: Debian, Centos, Ubuntu
Posts: 65

Rep: Reputation: Disabled
Quote:
You can just mount it on any directory u want!
Not any directory. It must be an empty one, otherwise you lose its previous data.
 
Old 07-07-2012, 12:59 PM   #15
jonwatson
Member
 
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by amilo View Post
Not any directory. It must be an empty one, otherwise you lose its previous data.
You do not 'lose' that data. It is simply unavailable while the other data is mounted there. Once you umount it, your data becomes available again.
 
  


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 a .img file? RoaCh Of DisCor Linux - Newbie 2 07-12-2005 03:49 PM
Mounting IMG file on suse 9.3 fireedo Linux - General 3 05-23-2005 04:05 AM
mounting a .img file... username-inuse Linux - Software 3 05-01-2005 03:46 PM
mounting a img file kudos Slackware 2 04-30-2003 03:54 PM
Mounting and unmount of lnx4win.img mauritzv Linux - Newbie 0 01-17-2002 12:23 AM


All times are GMT -5. The time now is 02:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration