Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mount 2 iso to 1 dir

0 views
Skip to first unread message

ksm

unread,
May 20, 2002, 11:28:34 PM5/20/02
to
i have copied redhat 2 CD ISO, i plan to install several PCs with 1
file server that have all the setup files. i can mount 1 ISO as to 1
directory, but i need the 2nd ISO to be mounted at the same directory
as well, so that all the files either from disk1 or disk2 can be found
in the same shared directory.

i can actually mount the ISO and copy its content to another
directory, but i wonder if there is other cleaner way.

David

unread,
May 20, 2002, 11:51:23 PM5/20/02
to


Here is an example. I used RH 7.2 enigma to do this.
make a directory to mount them to. I use "../os"
cd into directory holding the iso files.
Then mount both iso files to "../os"

mount -t iso9660 -o ro,loop=/dev/loop1 enigma-SRPMS-disc1.iso ../os
mount -t iso9660 -o ro,loop=/dev/loop2 enigma-SRPMS-disc2.iso ../os

--
Confucius: He who play in root, eventually kill tree.
Registered with the Linux Counter. http://counter.li.org


David

unread,
May 20, 2002, 11:54:09 PM5/20/02
to
David wrote:
>
> Here is an example. I used RH 7.2 enigma to do this.
> make a directory to mount them to. I use "../os"
> cd into directory holding the iso files.
> Then mount both iso files to "../os"
>
> mount -t iso9660 -o ro,loop=/dev/loop1 enigma-SRPMS-disc1.iso ../os
> mount -t iso9660 -o ro,loop=/dev/loop2 enigma-SRPMS-disc2.iso ../os
>

BTW to un-mount both images if you use the "os" directory to mount them
to then you need to run "umount os" twice.

Vilmos Soti

unread,
May 21, 2002, 1:58:04 AM5/21/02
to
ksmen...@yahoo.com (ksm) writes:

I solved this problem with softlinks. I mounted the discs as
/home/ftp/pub/linux/redhat/7.2/1 and .../7.2/2, and finally I
made a bunch of softlinks in /home/ftp/pub/x/ to the appropriate
files. Make sure to preserve the RedHat/RPMS and RedHat/base dirs.

Vilmos

Jason Roysdon

unread,
Jun 4, 2002, 6:44:54 PM6/4/02
to
David <thunde...@netscape.net> wrote in message news:<3CE9C43A...@netscape.net>...

> ksm wrote:
> > i have copied redhat 2 CD ISO, i plan to install several PCs with 1
> > file server that have all the setup files. i can mount 1 ISO as to 1
> > directory, but i need the 2nd ISO to be mounted at the same directory
> > as well, so that all the files either from disk1 or disk2 can be found
> > in the same shared directory.
> >
> > i can actually mount the ISO and copy its content to another
> > directory, but i wonder if there is other cleaner way.
>
>
> Here is an example. I used RH 7.2 enigma to do this.
> make a directory to mount them to. I use "../os"
> cd into directory holding the iso files.
> Then mount both iso files to "../os"
>
> mount -t iso9660 -o ro,loop=/dev/loop1 enigma-SRPMS-disc1.iso ../os
> mount -t iso9660 -o ro,loop=/dev/loop2 enigma-SRPMS-disc2.iso ../os

Doesn't appear to work on RH7.2 2.4.9-31 stock kernel. The only thing
available is the last mounted ISO.

David

unread,
Jun 4, 2002, 7:00:03 PM6/4/02
to

That's odd it works on my RH 7.2 system.

cd into directory holding the iso files.

make a directory to mount them to. mkdir ../os

mount -t iso9660 -o ro,loop=/dev/loop1 enigma-SRPMS-disc1.iso ../os
mount -t iso9660 -o ro,loop=/dev/loop2 enigma-SRPMS-disc2.iso ../os

You have to change the /dev/loopX and discX after mounting the first iso.

Jason Roysdon

unread,
Jun 4, 2002, 7:00:05 PM6/4/02
to
Vilmos Soti <vil...@vilmos.org> wrote in message news:<87r8k6v...@my.vilmos.lan>...

# This is ugly, but I'll give any awards for looks to the inspiration
# and help behind this crude hack, Joel Franusic.
#
# Assuming you're in ./os and ../iso/i386/ contains your ISO files,
# you can mount all the CDs in different dirs, and in this case
# RH7.3 has 3 CDs:

for cdno in 1 2 3 ; do mkdir i386-disc$cdno ; mount -t iso9660 -o
ro,loop ../iso/i386/valhalla-i386-disc$cdno.iso i386-disc$cdno ; done

# Create and enter the ./os/i386 directory

mkdir i386
cd i386

# Create all the dirs on each CD so we won't symlink to them.
# Then create symlinks to each file of each CD.

for dir in `find ../i386-disc1 -type d | cut -b 15-` ; do mkdir $dir ;
done

for sourcefile in `find ../i386-disc1 -type f` ; do linkfile=`echo
$sourcefile | cut -b 15-`; ln -s $sourcefile $linkfile ; done

# You'll get a few "mkdir: cannot create directory `RedHat':
# File exists" etc., but that's ok as the existed on the first
# CD, so no harm.
# Also a few "ln: `autorun': File exists" etc., for the same reason.

for dir in `find ../i386-disc2 -type d | cut -b 15-` ; do mkdir $dir ;
done

for sourcefile in `find ../i386-disc2 -type f` ; do linkfile=`echo
$sourcefile | cut -b 15-`; ln -s $sourcefile $linkfile ; done

# Same situation with duplicate dirs and files with these next
# two commands.

for dir in `find ../i386-disc3 -type d | cut -b 15-` ; do mkdir $dir ;
done

for sourcefile in `find ../i386-disc3 -type f` ; do linkfile=`echo
$sourcefile | cut -b 15-`; ln -s $sourcefile $linkfile ; done


Jason Roysdon, CCDP/CCNP:Security, MCSE, CNA, Network+, A+
Public email : jroy...@hotmail.com
Homepage : http://jason.roysdon.net/

PS: Don't use a subject like that looks like spam, as your message
will end up in my junk filter and never be read.

0 new messages