Monter une image ISO sous Solaris

From Deimos.fr / Bloc Notes Informatique
Jump to: navigation, search

1 Introduction

Many software packages can be downloaded in the form of an ISO image. Rather than burning the image to a CD-ROM to access its contents, it is easy to mount the image directly into the filesystem using the lofiadm and mount commands.

2 Usage

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

Command lofiadm
lofiadm -a /export/temp/software.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:

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

These commands can be combined into a single command:

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

3 Ressources

http://www.tech-recipes.com/rx/218/mount-an-iso-image-on-a-solaris-filesystem-with-lofiadm/