THE LOOP DEVICE One further possible type is a mount via the loop device. For example, the command mount /tmp/disk.img /mnt -t vfat -o loop=/dev/loop will set up the loop device /dev/loop3 to correspond to the file /tmp/disk.img, and then mount this device on /mnt. If no explicit loop device is mentioned (but just an option `-o loop' is given), then mount will try to find some unused loop device and use that, for example mount /tmp/disk.img /mnt -o loop The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid, for example: mount /tmp/disk.img /mnt mount -t ext3 /tmp/disk.img /mnt This type of mount knows about four options, namely loop, offset, sizelimit and encryption, that are really options to losetup(8). If the mount requires a passphrase, you will be prompted for one unless you specify a file descriptor to read from instead with the --pass-fd option. (These options can be used in addition to those specific to the filesystem type.) |