Mounting 2 ISO's to the same directory
Hi, I was wondering if it is possible to mount two ISO's to the same directory. For example I try this:
mount -o loop firstiso.iso mountpoint then mount -o loop second.iso mountpoint But when I mount the second ISO it seems to unmount the first (or at least the files from the first ISO are no longer there). I need all the files from both ISO's in the same directory. I hope this makes sense, any help is appreciated. Thanks |
Nope, you can't do that. When you mount the second, it overlays the first mount. If you were to unmount the second, the first would probably reappear.
You'll need to do one of a couple things: 1. Create a new image file that contains the files from both. You could do that by mounting each file separately, but copying their contents to a single, other directory. For instance: Code:
mount -o loop firstiso.iso /first_iso 2. Again, mount the iso files separately, but then do a symbolic link to the files from another directory. Basically the same thing as above, but using ln. |
Option number 1 isn't possible because I have very limited disk space, but the symbolic link idea works great, thanks!
|
Solved
This question was #3 in google today on the topic of mounting 2 ISO images to the same directory. Figured I'd answer it once I figured it out.
There are 4 tools at your disposal: The first is preferred because it only requires FUSE support and in Fedora/CentOS/RHEL it is already packaged by Fedora/EPEL. Whereas the rest require patching core parts of your distribution and probably isn't worth the effort for something this simple. So this assumes using fuse-unionfs. In RHEL/CentOS you can install the necessary software like so (Assuming you have the EPEL repository enabled). Code:
sudo yum -y install funionfs Mount the first iso into disc1, the second into disc 2. Code:
(sudo mount -o loop /path/to/image.iso /mnt/disc1) Code:
funionfs none /mnt/full -o dirs=/mnt/disc1=ro:/mnt/disc2=ro LJ Article introducing UnionFS. Also, this blog post was helpful. The man page explains why I used 'none' as the second parameter. HTH! |
All times are GMT -5. The time now is 02:06 AM. |