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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-30-2005, 07:13 AM
|
#1
|
LQ Newbie
Registered: May 2005
Location: Bangalore, India
Posts: 6
Rep:
|
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
|
|
|
05-30-2005, 09:23 AM
|
#2
|
Member
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48
Rep:
|
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
|
|
|
05-30-2005, 11:14 AM
|
#3
|
LQ Newbie
Registered: May 2005
Location: Bangalore, India
Posts: 6
Original Poster
Rep:
|
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
|
|
|
06-10-2005, 03:07 PM
|
#4
|
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:
|
Just mount it without gunzip 
|
|
|
06-10-2005, 04:27 PM
|
#5
|
Member
Registered: Oct 2004
Distribution: Kubuntu and Mac OS X
Posts: 80
Rep:
|
does /mnt exist on your computer?
if not create it and try again
|
|
|
06-11-2005, 04:04 AM
|
#6
|
Member
Registered: Mar 2005
Location: Netherlands
Distribution: Fedora Core 5 x86_64
Posts: 48
Rep:
|
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!
|
|
|
06-11-2005, 04:33 AM
|
#7
|
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468
Rep:
|
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
|
|
|
06-12-2005, 11:15 AM
|
#8
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
06-25-2005, 11:22 AM
|
#9
|
LQ Newbie
Registered: Oct 2004
Posts: 23
Rep:
|
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
|
|
|
07-25-2005, 06:32 AM
|
#10
|
LQ Newbie
Registered: Jul 2005
Posts: 1
Rep:
|
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.
|
|
|
07-23-2010, 08:32 AM
|
#11
|
LQ Newbie
Registered: Jun 2010
Location: china
Posts: 6
Rep:
|
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"
|
|
|
02-20-2011, 03:13 AM
|
#12
|
LQ Newbie
Registered: Feb 2011
Posts: 1
Rep:
|
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.
|
|
|
01-05-2012, 05:15 AM
|
#13
|
LQ Newbie
Registered: May 2009
Posts: 10
Rep:
|
impossible . You wont be able to mount an .img file like that
|
|
|
01-05-2012, 05:48 AM
|
#14
|
Member
Registered: Oct 2011
Location: Nederland
Distribution: Debian, Centos, Ubuntu
Posts: 81
Rep: 
|
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.
|
|
|
07-07-2012, 11:59 AM
|
#15
|
Member
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170
Rep:
|
Quote:
Originally Posted by amilo
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.
|
|
|
All times are GMT -5. The time now is 04:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|