[Sunhelp] Mounting up .ISO images as filesystems?

Bill Bradford mrbill at mrbill.net
Sun Aug 6 11:16:35 CDT 2000


On Sun, Aug 06, 2000 at 03:56:29PM +0200, Magnus Abrante wrote:
> Well, if you have a Solaris release before Sol 8 it might be a bit tricky,
> if you have a Sol 8 around you can do it by using lofiadm, loopback fs
> support was one of the new features included in Sol 8.

Bingo!  This is exactly what I was looking for.  

>From the lofiadm manpage:

EXAMPLES
     Example 1: Mounting an existing CD-ROM image

     You should ensure that Solaris understands the image  before
     creating  the CD. lofi allows you to mount the image and see
     if it works.

     This example mounts an existing CD-ROM image (sparc.iso), of
     the  Red  Hat 6.0 CD which was downloaded from the Internet.
     It was created with the mkisofs utility from the Internet.

     Use lofiadm to attach a block device to it:

     # lofiadm -a /home/mike_s/RH6.0/sparc.iso
     /dev/lofi/1

     lofiadm picks the device and prints the device name  to  the
     standard  output.  You  can run lofiadm again by issuing the
     following command:

     # lofiadm
     Block Device     File
     /dev/lofi/1      /home/mike_s/RH6.0/sparc.iso

     Or, you can give it one name and ask for the other, by issu-
     ing the following command:

     # lofiadm /dev/lofi/1
     /home/mike_s/RH6.0/sparc.iso

     Use the mount command to mount the image:

     # mount -F hsfs -o ro /dev/lofi/1 /mnt

     Check to ensure that Solaris understands the image:

     # df -k /mnt
     Filesystem            kbytes    used   avail capacity  Mounted on
     /dev/lofi/1           512418  512418       0   100%    /mnt

     # ls /mnt
     ./            RedHat/       doc/          ls-lR         rr_moved/
     ../           TRANS.TBL     dosutils/     ls-lR.gz      sbin@
     .buildlog     bin@          etc@          misc/         tmp/
     COPYING       boot/         images/       mnt/          usr@
     README        boot.cat*     kernels/      modules/
     RPM-PGP-KEY   dev@          lib@          proc/

     Solaris can mount  the  CD-ROM  image,  and  understand  the
     filenames.  The  image was created properly, and you can now
     create the CD-ROM with confidence.

     As a final step, unmount and detach the images:

     # umount /mnt

Bill

-- 
+-------------------\ /-----------------+
| Bill Bradford      |  www.sunhelp.org |
| mrbill at mrbill.net  |   www.decvax.org |
| Austin, Texas USA  |    www.pdp11.org |
+-------------------/ \-----------------+





More information about the SunHELP mailing list