Child pages
  • Mounting and Unmounting ISO images
Skip to end of metadata
Go to start of metadata

6.7.1 Mounting and Unmounting ISO images

One can use lofiadm(1M) to mount ISO images by attaching them to a block device.

% pfexec lofiadm -a /path/to/foo.iso /dev/lofi/1

One can simply issue /dev/lofi and /dev/lofi/N will be automatically created!

When the above line is repeated for several ISO images, issue the lofiadm command to list which ISO images are attached to which block devices.

% pfexec lofiadm
Block Device File Options
/dev/lofi/1 /home/scarcry/foo.iso -
/dev/lofi/2 /home/scarcry/bar.iso -

Use the mount(1M) command to mount an image:

% pfexec mount -F hsfs -o ro /dev/lofi/1 /mnt

Check the mounted image by issuing ls(1) on the mount point.

% ls /mnt

To unmount and detach the image(s):

% pfexec umount /mnt
% pfexec lofiadm -d /dev/lofi/1

  • No labels