On Solaris 8 and later versions, it is not necessary to create CD's for the downloaded ISO images. Instead of burning the image to a CD-ROM to access its contents, it is easy to mount the image directly into the file system with the help of
lofiadm and
mount commands
lofiadm administers lofi, the loopback file driver.
lofi allows a file to be associated with a block device. That file can then be accessed through the block device. This is useful when the file contains an image of some file system (such as a floppy or CD-ROM image), because the block device can then be used with the normal system utilities for mounting, checking or repairing filesystems
Govinda% unzip sol-10*.zip
Archive: sol-10-ccd-GA-x86-iso.zip
inflating: sol-10-ccd-GA-x86-iso.iso
Govinda% su
Password:
Given an ISO image in /export/home/techno/sol-10-ccd-GA-x86-iso.iso, a loopback file device (/dev/lofi/1) is created with the following command (note: pathname of the iso should be absolute, but not relative):
# lofiadm -a sol-10-ccd-GA-x86-iso.iso /dev/lofi/1
lofiadm: pathname is not an absolute path -- sol-10-ccd-GA-x86-iso.iso
# lofiadm -a /export/home/techno/sol-10-ccd-GA-x86-iso.iso /dev/lofi/1
The lofi device creates a block device version of the file:
# lofiadm
Block Device File
/dev/lofi/1 /export/home/techno/sol-10-ccd-GA-x86-iso.iso
And then mount the block device on /mnt with the following command:
# mount -F hsfs -o ro /dev/lofi/1 /mnt
Tip:
All the above commands can be combined into a single command as follows:
mount -F hsfs -o ro `lofiadm -a /export/home/techno/sol-10-ccd-GA-x86-iso.iso` /mnt
# ls /mnt
components installer README volstart
Once done using the files from CD image, unmount the lofi block device
# umount /mnt
Finally remove the association of loopback file device as follows:
# lofiadm -d /dev/lofi/1
# lofiadm
Block Device File
Resource:
Solaris man page of
lofiadm