Tuesday, 24 June 2014

How to mount iso on LInux?

To mount iso image on your file system you should do next thing

server#mount -t iso9660 iso_file /mount_point -o loop

You will have only info that this is read-only file system!

In case that you do this a lot, this mounting of iso you can write simple script that will save you few seconds of your time! You may think that few seconds is nothing but i read once

"If you do some job more then twice, write a script for it"

My script look like this

server#cat mount_iso
echo $ISO
mount -t iso9660 $ISO /mnt/ -o loop

You should put this is your /usr/bin or /bin folder so that you can execute script from anywhere in the system!

How it works?

# mount_iso rhel-server-5.9-x86_64-dvd.iso
[root@plavi2 iso]# ls /mnt/
Cluster            README-te.html            RELEASE-NOTES-U9-en


No comments: