Skip to main content

How to mount ISO in solaris & resolve error (iso is not a multiple of 512)

Many software packages download are 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 Solaris file-system using the lofiadm and mount commands.

Given an ISO image in /export/temp/Compusoft.iso, a loopback file device (/dev/lofi/1) is created with the following command:
#lofiadm -a /export/temp/Compusoft.iso
Output
    /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 hsfs -o ro /dev/lofi/1 /mnt
These commands can be combined into a single command:
#mount -F hsfs -o ro `lofiadm -a /export/temp/Compusoft.iso` /mnt
Sometimes when you convert image from .nrg to .iso & converted image is not a multiple of 512 bytes. lofiadm refuses.

Unmount and detach the images

Use umount command to unmount image:
#umount /mnt
Now remove/free block device:
#lofiadm -d /dev/lofi/1
Error:
# lofiadm -a  /export/temp/Compusoft.iso  
lofiadm: size of  /export/temp/Compusoft.iso  is not a multiple of 512
Solution:
# cd /export/temp
# dd if=./Compusoft.iso of=./Compusoftnew.iso obs=512 conv=sync
# lofiadm -a  /export/temp/Compusoftnew.iso 
/dev/lofi/1
# mount -F hsfs -o ro /dev/lofi/1 /mnt

Comments

Popular posts from this blog

INSTALL CISCO VPN CLIENT ON WINDOWS 10 (32 & 64 BIT). FIX REASON 442

This article shows how correctly install Cisco VPN Client (32 & 64 bit) on Windows 10 (32 & 64 bit) using simple steps, overcome the ‘ This app can’t run on this PC ’ installation error , plus fix the Reason 442: Failed to enable Virtual Adapter error message . The article applies to New Windows 10 installations or Upgrades from earlier Windows versions and all versions before or after Windows 10 build 1511 .  To simplify the article, we’ve broken it into the following two sections: How to Install Cisco VPN client on Windows 10 (clean installation or upgrade from previous Windows), including Windows 10 build prior or after build 1511 . How to Fix Reason 442: Failed to enable Virtual Adapter on Windows 10 Figure 1. The Cisco VPN Client Reason 442: Failed to enable Virtual Adapter error on Windows 10 HOW TO INSTALL CISCO VPN CLIENT ON WINDOWS 10 (NEW INSTALLATIONS OR O/S UPGRADES) The instructions below are for new or clean Windows 10 inst...

How to create a Hirens Boot CD 15.2 USB Disk

Hiren’s BootCD (HBCD) is a bootable CD that contains a set of tools that can help users to fix their computer if their system fails to boot. More specifically, HBCD contains hardware diagnostic programs, partition tools, data recovery utilities, antivirus tools and many other tools to fix your computer problems.  I write this article because I use Hiren’s BootCD frequently to troubleshoot computer problems, specially when a computer doesn’t boot anymore due to a virus attack or due to a corrupted file system. In this article you will find instructions on how to put Hiren’s BootCD on a USB flash drive (stick) in order to troubleshoot computer problems in the future.

Internet Connection Sharing has been disabled by the Network Administrator. (Solved)

Problem: Logged in to computer with domain account has administrator privileges, and wanted to share my computer’s wifi to my mobile phone. When open the network sharing dialog, the dialog says: Internet Connection Sharing has been disabled by the Network Administrator.