A loop device allows any file to be mounted as a filesystem image. Not to be confused with a loopback interface in networking.

learn more… | top users | synonyms (1)

17
votes
2answers
2k views

What is a “loop device” when mounting?

I am doing a mounting of an iso file and looking at this tutorial. They use the command: $ mount -o loop disk1.iso /mnt/disk I'm trying to understand the use of -o loop. So I have two questions: ...
7
votes
2answers
690 views

Creating formatted partition from nothing

I need to create filesystem with just one partition from nothing (/dev/zero). I tried this sequence of commands: dd if=/dev/zero of=mountedImage.img bs=512 count=131072 fdisk mountedImage.img n ...
8
votes
2answers
7k views

When mounting, when should I use a loop device?

According to the following question: What is a "loop device" when mounting? A loop device is a file that acts as a block-based device. While I can understand that conceptually, how is this ...
2
votes
3answers
9k views

How to iterate through a comma-separated list and execute a command for each entry

I have been give a command which outputs a comma-separated list for autosys jobs in the variable $all_jobs: box=box-of-jobs;all_jobs=$(jobscout -box $box | egrep "^\w+" | tr '\n' ',' | sed s/.$//); ...
2
votes
1answer
203 views

mapping a split file to /dev/loop0

I have a iscsi disk 2TB large. I make backup of that disk every week. The backup script copies the image of the whole iscsi disk into a file on my NFS. Unfortunately, it does not copy the image in one ...
2
votes
2answers
1k views

slitaz 4.0 grub2 loopback concatenate multiple initrd images

I'm trying to get slitaz 4.0 ISO to boot using a grub2 loopback on a multiboot USB; insmod font if loadfont /boot/grub/unicode.pf2 ; then insmod gfxterm # insmod efi_gop # insmod efi_uga ...
6
votes
1answer
959 views

Mounting an old floppy image file (.ima format) - how hard can it be?

I'm trying to mount and access a floppy image file in the .ima format (raw dump to floppy, similar to .img) on ArchLinux. This file is part of a set of 30. It is not bootable, but rather a ...
3
votes
1answer
390 views

Virtual file made out of smaller ones (for mac-like sparse bundle solution)

I'd like to recreate a feature of Mac OS X called sparse bundles (disk images made out of smaller files, making them easy to backup after a small change). For that I'm looking for a way to ...
2
votes
2answers
138 views

Loop device with 4K sectors

Using the losetup command, you can turn a regular file into a pretend block device. You can then partition and format it like any other device. Is there some way to make Linux pretend that this ...