Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Wednesday, October 22, 2008

Mount an ISO image on a Solaris filesystem with lofiadm

Given an ISO image in /export/temp/software_cd.iso, a loopback file device (/dev/lofi/1) is created with the following command:

lofiadm -a /export/temp/software_cd.iso /dev/lofi/1

The lofi device creates a block device version of a file. This block device can be mounted to /mnt with the following command:

mount -F lofs -o ro /dev/lofi/1 /mnt

These commands can be combined into a single command:

mount -F hsfs -o ro `lofiadm -a /export/temp/software_cd.iso` /mnt

No comments: