Operating System - Linux
1827992 Members
2251 Online
109973 Solutions
New Discussion

Re: loop device -- plz help

 
SOLVED
Go to solution
Maaz
Valued Contributor

loop device -- plz help

Dear Gurus
what are the loop devices ?
why to use them ?
any good example ?

i didnt understand the following
#mount -o loop /mnt/c-drive
#mount -t iso9660 -o loop /iso/documents.iso /mnt/cd_image

Plz help
Regards
3 REPLIES 3
Ivan Ferreira
Honored Contributor
Solution

Re: loop device -- plz help

The loop device is a device driver that allows an image file to be mounted as though it were a normal block device

In the second example, you are mounting an ISO CD image, and the contents of the iso file will be available in /mnt/cd_image.

The first example seems incomplete.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: loop device -- plz help

mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024



>The loop device is a device driver that allows an image file to be mounted as >though it were a normal block device

from "man mount"
mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024

why to mount msdos filesystem as an image ?
Uwe Zessin
Honored Contributor

Re: loop device -- plz help

In this case:
"/tmp/fdimage"
the file "fdimage" is a block-wise copy of a floppy disk media.

Imagine you want to prepare a floppy disk for somebody. Instead of writing the data to real media and then send it via (slow) postal mail, you work with a 'virtual floppy' which is a file. Then you e-mail the file to him/her. (S)he can make a 1:1 copy the blocks of the file to a real floppy and use it right away.
.