Tagged Questions

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)

0
votes
0answers
20 views

passing variable through file created by cat EOF with for loop [on hold]

Good afternoon: dd is a sequence of days of a month within for loop. I want to create 23 versions of this file to be printed in the directory specified on the cat command line. I will use the ...
3
votes
1answer
43 views

Mount an ISO virtually using /dev/sr0 device

I'm doing a study about how CD-ROM can be mounted virtually and all I could find out was mounting using loop devices. mount -o loop disk1.iso /mount-point This is fairly easy. I understand that ...
1
vote
1answer
31 views

Can't losetup anything on armhf NAS

I'm pretty new to linux and chrooted my NAS with armhf architecture and tried looping device: losetup -f losetup: Could not find any loop device. Maybe this kernel does not know about the loop ...
0
votes
3answers
66 views

How does cfdisk fix my disk image?

I'm working on a huge complex application. You connect a disk, press a button, and it partitions and formats the disk, mounts it, and copies some files onto it. To test this application, we have a ...
3
votes
0answers
19 views

Provide loop device functionality for a regular file under a unique name

I want to add a few image files with file systems to a LVM volume group. If I make them available as loop devices changes are pretty high that one day the script gets corrupted due to an increasing ...
3
votes
2answers
64 views

Source path of loop-device

Out of curiosity, I would like to know is there any way to find out the source of mounted partition ? e.g. Output of df -h is : /dev/loop1 3M 3M 0 100% /media/loop From this output, I know a ...
2
votes
1answer
133 views

How to find alternative superblocks in ext3 file system of partition-less qcow2?

I have an interesting case, where e2fsck refuses to recognize the file system inside a qcow2 image file. Using testdisk I am able to see the partition, so some markers would be left. The reason this ...
0
votes
0answers
97 views

How to mount multiple iSCSI images too loop

I have to mount iscsi images to loop. Yesterday someone with a similar problem asked that already. The difference is, my iscsi image is splitted into 5 parts. ls -la insgesamt 4718592004 -rw-rw-rw- ...
2
votes
1answer
162 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 ...
1
vote
1answer
203 views

Problem creating raw disk image and mounting it in rescue mode to QEMU

I am trying to create booting system from raw disk image. This is what I do: $ dd if=/dev/zero of=system2.img bs=1M count=6000 6000+0 records in 6000+0 records out 6291456000 bytes (6.3 GB) copied, ...
1
vote
3answers
388 views

how to pipe the output of cut to the foreach command?

I have the cut command I want that grabs the first word in each line of a file. I then want to put each word from the cut command into a foreach. I then want to do a grep command inside the body of ...
1
vote
1answer
250 views

Mount image user-readable with udisks2

Loop devices, i.e. for mounting raw disk images, can be managed without root privileges using udisks. For testing purposes, an image can be created and formatted like so: dd if=/dev/urandom ...
0
votes
0answers
116 views

different loopback mounted volumes exported through NFS are seen as 1 by the client

I have a rather peculiar problem. I'm running 3.2.0-58-generic #88-Ubuntu (Ubuntu 12.04) and I have mouonted the following loopback devices: cat /proc/mounts | grep loop /dev/loop0 ...
2
votes
1answer
375 views

unetbootin: cannot mount squashfs on loop device

Im having a bit of fun with unetbootin with linux mint 16 setup in it. However when I try run the default menu item I get an error that ends with this: can not mount /dev/loop0 ...
2
votes
1answer
112 views

File containing ext filesystem

Let's suppose I create a file, map it to /dev/loop0, and create a LUKS partition inside dd if=/dev/zero of=myfile bs=1M count=1000 losetup /dev/loop0 myfile cryptsetup -c aes-cbc-essiv:sha256 -s 256 ...
6
votes
1answer
811 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 ...
11
votes
2answers
974 views

How to setup a growable loopback device?

I know I can create and use a loopback device like this: # Create the file truncate disk.img --size 2G # Create a filesystem mkfs.ext4 disk.img # Mount to use mount disk.img /mnt # Clean up umount ...
1
vote
2answers
182 views

How is the loopback device traffic allowed?

How can I allow the traffic to be sent on the loopback device (lo)? What is the iptables command for it?
1
vote
1answer
221 views

How to achieve `losetup -a` behaviour with busybox?

busybox (at least version 1.7, which I'm bound to use) to not provide the losetup -a switch to obtain a list of currently used loop devices plus the associated filename. Is there any way to obtain ...
2
votes
2answers
133 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 ...
3
votes
2answers
2k views

How to add more /dev/loop* devices on Fedora 19

How to add more /dev/loop* devices on Fedora 19? I do: # uname -r 3.11.2-201.fc19.x86_64 # lsmod |grep loop # ls /dev/loop* /dev/loop0 /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 ...
4
votes
4answers
390 views

How can I partition a volume in a regular file without loop?

I'm trying to play around with OS development, and I started with a boot loader, where phase 0 loads phase 1 from a file (specified by inode) on an ext4 partition (specified by first LBA). Of course, ...
2
votes
2answers
836 views

busybox initramfs loop mount

I'm trying to loop mount my root filesystem (a loop file) within a busybox initramfs. I try to run the command: mount /rootfs.raw /root ... which works on my Ubuntu laptop, however, I simply get ...
6
votes
2answers
580 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 ...
2
votes
2answers
173 views

Loop Mounting in Parallel

I am doing a project in which I need to mount 100+ loop devices and merge it into AUFS mountpoint As an observation, for sequentially mounting 90 loop devices, it takes 25 seconds. I am looking for ...
1
vote
0answers
61 views

Max file size for create_compressed_fs tool

Somebody knows what the maximum size of file could be processed by create_compressed_fs tool or used by /dev/cloop device? I suspect that it could be the root of the issue. I created "ISO" (UDF) ...
1
vote
0answers
204 views

Will there be any security problem to permit non-root user set up a loopback devices?

if the user has full access to the image file (iso or disk image), will there be any security problem to permit him set up a loopback device backed by this file ? % ls -al /dev/loop* ...
1
vote
1answer
6k views

mount: could not find any free loop device

When I try to mount an ISO image with mount -o loop I get mount: could not find any free loop device Running losetup -a shows /dev/loop0: [0005]:2464 (/dev/sda1) /dev/loop1: [0005]:3439 ...
-1
votes
4answers
422 views

Ending Process Infinite Loop Input Redirection

Edit: I realized that the program I was trying to run had an infinite loop after scanning all my input. Then just prints out infinitely so it'll never read the EOF. It'll read the last input then go ...
1
vote
3answers
368 views

Why does this work: “cp image.bin /dev/mapper/loop0p1”?

Why does this work? cp image.bin /dev/mapper/loop0p1 image.bin is a partition image. I have tried it and works, but why? Shouldn't a dd be used?
3
votes
2answers
468 views

How to add a ms-dos partition table to a loop device?

I recently made a dd from a disk partition. I want to use it as a disk in a virtual machine. I can't because the disk has no partition table. Can I had a partition table to a loop device? how? ...
6
votes
1answer
716 views

GNU/Linux: overlay block device / stackable block device

GNU/Linux has union mount that overlays dirs. So you can mount a writeable dir on top of a read-only dir. When the writeable dir is unmounted the read-only dir is untouched. I am looking for the same ...
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
8k 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
2answers
457 views

Second loopback network interface (for netem)

I would like to add a second loopback network device on Linux, so that I have lo and (e.g.) lo2. This is so that I can use netem to simulate a throttled network over lo2 without compromising my ...
2
votes
3answers
675 views

Ensure that loopback root and host are unmounted on shutdown

I'm trying to setup a Linux system that runs from an LVM-formatted image file. After some tinkering with the initramfs and boot options I managed to make it up and running by mounting the host file ...
3
votes
1answer
384 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 ...
3
votes
1answer
1k views

How do I setup more then 10 loopback device?

From this answer the solution is to modprobe loop max_loop=64 Which makes me allowed to use 64 loopback devices then mknod -m 660 /dev/loop8 b 7 8 To create the devices. I did this for 8, 9, 10 ...
2
votes
1answer
48 views

Grub change loopback amount?

I'm having an issue with loopback. It looks like there is only 8. I did a search and apparently the problem is grub by default only has 8 loopback (devices?). If i look in /dev/ i see loop 0-7 so that ...
3
votes
1answer
57 views

How to make sure a loopfile is only mounted once?

When mounting a filesystem image via mount -o loop, is there any mechanism to prevent the same file to be mounted a second time?
4
votes
2answers
563 views

loop-device: is this a Linux entity or a lower-level one?

Here's an Ubuntu How-to about booting from ISO-image on flash. http://ubuntuforums.org/showthread.php?t=1288604 What I don't get is creation of loop-device in GRUB2 prior to booting a kernel: ...
2
votes
2answers
3k views

How is the loopback network interface implemented?

The loopback network interface "is a virtual network device implemented entirely in software," according to another question on Unix.SE. But how is this implementation actually accomplished, and how ...
3
votes
2answers
1k views

creating a device image for a network location

I have a dedicated ubuntu server with hetzner.de. hetzner also provides a seperate backup space accessible via samba/ftp/sftp/scp. In their support document about backups, the following line is ...
5
votes
5answers
3k views

How can I mount partitons in a full disk image (i.e. image with partition table) with fuse?

It's a bit indirect, but it's possible mount a partition with a disk image using mount or losetup's "offset" parameter. I'm looking to be able to use fuse to do the same thing in user space Use ...
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 ...
1
vote
0answers
616 views

Debian VPS, no loop devices present, modprobe fails

After acquiring a new virtual Debian squeeze I ran into a problem regarding loop devices. My plan was to set up an encrypted FS in a regular file and mount it. Unfortunately I can't do that since ...
7
votes
3answers
2k views

Mounting multiple img files as single loop device

Is there a way to take a disk img file that is broken up into parts and mount it as a single loop device?
3
votes
2answers
623 views

How to remove length limit from losetup -a

I am using losetup -a to see my loop devices, but it has a length limit (which is 62 characters). So I can't know for sure which loop device I really want. Ex: [root@r7byach]# losetup -a ...
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: ...
3
votes
2answers
3k views

Finding the offset for ext4 partition

I've created an image of my hd with dd, but grub was installed on it, and I'm trying to figure out how to mount the image file, but mount doesn't recognise it as an ext4 partition because of the grub ...