LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-03-2012, 03:32 PM   #1
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
When mounting cd-image files the ISO unpacks and iso-inates it self


I am mounting .ISOs with: mount -o loop image-file.iso /mnt/mntdir as well as using gmount-iso gui (uses same operation though I think)... The problem is that it is usable the first time I mount, But after I unmount I notice linux has unpacked the iso in /mntdir ... So then I have 30 files instead of 1. I can't seem to remount the /mntdir when it's not iso anymore. -(ERROR: Cannot mount /mntdir; location is not empty)-

So far my solution is to delete /mntdir and recreate then remount every time I need to. My questions are:

What is causing it to take the iso apart? (My assumption is that when it is mounted linux needs to access all the files individually so it extracts them out in /mntdir to use as needed)

Is there any program to mount/use/unmount without leaving behind a full /mntdir?

and lastly; Could I devise a script to create /mntdir, mount, leave mounted for (X) amount of time, unmount, and then delete /mntdir? ... I have amazingly low scipt skill :P ... I just want to know if that's possible. I will be searching google, but any other resources or tips on a how to write it out neatly (IE with as little clutter as possible) would be graciously accepted.

I've got:
Fujitsu Lifebook - Zorin 5/Ubuntu 10.04 (Anything newer has been confusing my computer) - If you need more info, I'll be happy to give it.
 
Old 05-03-2012, 03:54 PM   #2
mdlinuxwolf
Member
 
Registered: Dec 2006
Distribution: Mepis and Fedora, also Mandrake and SuSE PC-BSD Mint Solaris 11 express
Posts: 378

Rep: Reputation: 41
Typically, if you open an ISO image, K3b will start so you can burn it to a bootable disc. Many times ISOs are used for making live or full install operating systems. Obviously, you want to do a checksum and check that all files are there, hence the auto mount. There is no reason NOT to do this.
 
1 members found this post helpful.
Old 05-03-2012, 06:41 PM   #3
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,552

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
K3b is not a part of a normal Ubuntu installation; I seriously doubt that K3b is in any way related to this problem.

That being said, I've never seen the problem the OP describes. It's certainly possible to loop-mount an iso file on top of an occupied directory; I do it all the time. In fact, I just did it to verify that it works as expected:
Code:
~/Desktop$ sudo mount -o loop Fedora-17.TC2-i686-Live-LXDE.iso RawhideFixups/
~/Desktop$ dir RawhideFixups/
total 30
dr-xr-xr-x.  5 root root  2048 Apr 27 21:44 .
drwxrwxr-x. 13 a    a     4096 May  3 18:26 ..
dr-xr-xr-x.  3 root root  2048 Apr 27 21:44 EFI
-r--r--r--.  1 root root 18092 Apr 27 21:44 GPL
dr-xr-xr-x.  2 root root  2048 Apr 27 21:44 isolinux
dr-xr-xr-x.  2 root root  2048 Apr 27 21:45 LiveOS
~/Desktop$ sudo umount /dev/loop0
~/Desktop$ dir RawhideFixups/
total 116
drwxrwxr-x.  3 a a  4096 Apr 22 20:48 .
drwxrwxr-x. 13 a a  4096 May  3 18:26 ..
-rw-rw-r--.  1 a a 25217 Feb 28 12:21 fedora-release-17-0.9.noarch.rpm
-rw-rw-r--.  1 a a 10357 Feb 28 12:21 fedora-release-rawhide-17-0.9.noarch.rpm
drwxrwxr-x.  2 a a  4096 Dec 24 07:51 NewRawhide
-rw-rw-r--.  1 a a 13569 Apr 22 20:48 rpmfusion-free-release-branched.noarch.rpm
-rw-rw-r--.  1 a a 15221 Nov 17 05:07 rpmfusion-free-release-rawhide.noarch.rpm
-rw-rw-r--.  1 a a 13685 Apr 22 20:48 rpmfusion-nonfree-release-branched.noarch.rpm
-rw-rw-r--.  1 a a 15341 Nov 17 05:08 rpmfusion-nonfree-release-rawhide.noarch.rpm
The closest thing I can think of to the situation as described is attempting to unmount /mnt/mntdir while something (say a bash shell) is still using it. In that situation, it won't unmount.
 
1 members found this post helpful.
Old 05-03-2012, 07:07 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
How exactly did you mount it. You may have used a fuse based program and need to run "fusermount -u /mnt/mntdir".

You may also have a situation where k3b or a desktop device manager is using fuse to mount the disc image.
 
Old 05-03-2012, 08:15 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,357

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
I am thinking out loud here.

I thought the point and use of a mount iso to a loop was to avoid an actual copy from disk. The unmount ought to make the files in the directory go away.
 
Old 05-03-2012, 09:53 PM   #6
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jschiwal View Post
How exactly did you mount it. You may have used a fuse based program and need to run "fusermount -u /mnt/mntdir".

You may also have a situation where k3b or a desktop device manager is using fuse to mount the disc image.

I am mounting with a program (now) called GMOUNT-ISO, In the first field you put the image that you want to mount, and in the second the dir to mount at. Then just hit 'mount' and it does it. I am pretty sure it's just using mount -o loop but it could be fuse (which I don't recall ever hearing about) or even with some other function I don't know lol

Jefro:
Quote:
The unmount ought to make the files in the directory go away.
I thought that same thing which is why I am wondering why the files & /mntdir remain after unmounting. I'd really just like to have the one dir and not have to always be making and deleting over and over.


RockDoctor:
Quote:
It's certainly possible to loop-mount an iso file on top of an occupied directory; I do it all the time. In fact, I just did it to verify that it works as expected: ... ... ...The closest thing I can think of to the situation as described is attempting to unmount /mnt/mntdir while something (say a bash shell) is still using it. In that situation, it won't unmount.
I've tried to mount the same directory a few times and still get that error that 'location is not empty.' ... it's possible that there is some element of the iso still running during the unmount. I will check and post back.


EDIT:
So I mounted, and immediately unmounted and /mntdir was empty (By immediate I mean within 5-10 seconds) Then I tried waiting about 30 or so before unmounting and it stays full that way. After 30 seconds it was mounted, but I didn't start it. so I am pretty sure there wasn't anything running on unmount.

Last edited by Hevithan; 05-03-2012 at 10:03 PM.
 
Old 05-04-2012, 09:14 AM   #7
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,552

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Looking at the Gmount-iso code, it looks like it's just doing a simple
Code:
mount -o loop -t iso9660 <iso-filename>
. Fedora doesn't use gksudo, so I didn't really get to try out the code.

Is your setup such that you have some application auto-running upon mounting an iso? That could explain the problem. Best bet might be to look at your file manager's confuguration.
 
  


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 devinmcelheran Linux - Newbie 1 04-12-2009 08:56 PM
mounting ISO image satimis Linux From Scratch 12 10-22-2005 07:15 PM
Mounting iso image batev Slackware 11 10-20-2005 09:24 AM
mounting image files (iso, bins, etc) minm Linux - Newbie 1 09-08-2004 01:14 PM
mounting ISO from an image true_atlantis Linux - Newbie 2 01-20-2004 10:29 AM


All times are GMT -5. The time now is 06:40 AM.

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