13 May

A Shell Scirpt to Mount ISO files

A Shell Scirpt to Mount ISO files – call it using the command moustiso.sh ImageFile.iso. You need a folder called /mnt/Image for this to work


#!/bin/sh
sudo mount -o loop "$*" /mnt/Image/

3 thoughts on “A Shell Scirpt to Mount ISO files

  1. you should take care of number of loop devices /dev/loop*. You can’t mount any ISO files if there isn’t any /dev/loopX left.

  2. Hi,
    You might also want to do the following

    1. Create a mount point as a failsafe before attempting to mount the iso into /mnt/Image.
    2. Unmount any image at the mount point

    regards,

Leave a Reply

Your email address will not be published. Required fields are marked *