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-03-2012, 03:32 PM
|
#1
|
Member
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Rep:
|
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.
|
|
|
05-03-2012, 03:54 PM
|
#2
|
Member
Registered: Dec 2006
Distribution: Mepis and Fedora, also Mandrake and SuSE PC-BSD Mint Solaris 11 express
Posts: 385
Rep:
|
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.
|
05-03-2012, 06:41 PM
|
#3
|
Senior Member
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,792
|
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.
|
05-03-2012, 07:07 PM
|
#4
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
05-03-2012, 08:15 PM
|
#5
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
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.
|
|
|
05-03-2012, 09:53 PM
|
#6
|
Member
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Original Poster
Rep:
|
Quote:
Originally Posted by jschiwal
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.
|
|
|
05-04-2012, 09:14 AM
|
#7
|
Senior Member
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,792
|
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.
|
|
|
All times are GMT -5. The time now is 11:57 AM.
|
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
|
|