If you need to pull files from an ISO image file, is it unnecessary to first burn the image to a CD or DVD. By using the lofiadm command you can just mount the ISO and browse its contents.
The lofiadm command associates a file with a block device (you must provide an absolute path to the file). The device that becomes associated with the ISO is returned:
bleonard@opensolaris:~$ pfexec lofiadm -a ~/Desktop/sol-10-u5-ga-x86-dvd.iso
/dev/lofi/1
bleonard@opensolaris:~$
Running lofiadm with no parameters will list the associated devices:
bleonard@opensolaris:~$ lofiadm
Block Device File Options
/dev/lofi/1 /export/home/bleonard/Desktop/sol-10-u5-ga-x86-dvd.iso-
bleonard@opensolaris:~$
Now the device can be mounted:
bleonard@opensolaris:~$ pfexec mount -F hsfs /dev/lofi/1 /mnt
bleonard@opensolaris:~$ ls /mnt
boot Copyright installer JDS-THIRDPARTYLICENSEREADME License Solaris_10
bleonard@opensolaris:~$
The lofiadm and mount steps can be combined into one as follows:
pfexec mount -F hsfs `pfexec lofiadm -a ~/Desktop/sol-10-u5-ga-x86-dvd.iso` /mnt
When finished, use the following to unmount and detach the image:
pfexec umount /mnt
pfexec lofiadm -d /dev/lofi/1
