How to mount an ISO image under Solaris
Mounting an ISO image on Solaris
As 'root' or a user with elevated priviledges perform the following:
- Assign a loopback device to the ISO image using
lofiadm
:lofiadm -a <path-to-iso-image>
For example:server# lofiadm -a /var/tmp/sol-10-u8-ga-x86-dvd.iso /dev/lofi/1
From the above output, we have the lookback device assigned to/dev/lofi/1
- Mount the ISO image (loopback device) as a read-only filesystem:
mount -F hsfs -o ro <loopback-device> <mountpoint>
For example, to mount/dev/lofi/1
under/mnt
:server# mount -F hsfs -o ro /dev/lofi/1 /mnt
Presenting ISO images to Guest zones
There is no direct way to mount an ISO image on a Solaris Zone. However, you can mount an ISO image onto the global zone using the above steps, and then present it to the guest zone using:
mount -F lofs <mountpoint> <path-to-zone-root>
For example:
global# mount -F lofs /mnt /zones/guestzone/root/mnt
where: /zones/guestzone/root
is the root of the Guest zone. The ISO image should now be visible under /mnt
on the Guest zone.
Mounting an ISO image on an already running Guest zone can be useful in scenarios where we need to install sofware from a DVD.Unmounting the ISO image
- To unmount the mounted ISO image:
umount <mountpoint>For example:# umount /mnt- Deassign the loopback device from the ISO image:
lofiadm -d <loopback-device>For Example:# lofiadm -d /dev/lofi/1