Linux : Using loop devices (eg : mounting an ISO file)
stephane
If you downloaded an ISO file and you want to mount it into your filesystem, you can proceed as follows :
spaghetti% sudo losetup /dev/loop0 cdrom.iso<br /> spaghetti% sudo mount /dev/loop0 /mnt<br /> spaghetti% ls /mnt<br /> Autorun.inf setup.exe setup.ico<br /> spaghetti%<br /> [...]<br /> spaghetti% sudo umount /mnt<br /> spaghetti% sudo losetup -d /dev/loop0
This will use the feature known as “loop devices”, which lets you use a file as a device, and subsequently mount it as it would be one.
You can of course mount an ISO using loop devices, but there is more to it. You could for example mount a ciphered file containing an EXT2 filesystem.
Check out the man page for more details.