I’ve created a script to make mounting image files created by dd easier. It will mount an img file onto a directory via the loopback mechanism supported by linux, so your kernel must have loopback support for this script to work.
It also makes use of the mount, fdisk, and file commands so they must be installed also.
This is just the first version, it will tell you if something is mounted when you run the script on the file, and if it is mounted attempt to unmount it.
The script will also need to be run as root or with sudo as mounting from the command line needs to be done with superuser permissions.
The script can be downloaded here
Run it with the command ./imgmgt.sh
Any feedback, feel free to leave a comment 🙂
Update 1/7/2012 – Just updated this to fix up something I did wrong, so anyone who’s already grabbed this, please get it again from the link above. Thanks !