Skip to main content

Questions tagged [loop-device]

A loop device allows any file to be mounted as a filesystem image. Not to be confused with a loopback interface in networking. Don't use this tag for questions regarding "for-loops" (use the "for" tag instead).

Filter by
Sorted by
Tagged with
12 votes
1 answer
881 views

Apparently, ntfs.mkfs counts one byte less when checking if the block device is large enough; or I have made some kind of mistake. After creating a partition of 2048 512-byte sectors (exactly 1MiB ...
Fivos Theophylactou's user avatar
2 votes
1 answer
270 views

There's a number of posts about losetup -d /dev/loop0 not removing a lookback device, even though it returned a successful return code. I believe the root cause of those posts is that the block device ...
Huckle's user avatar
  • 1,097
2 votes
1 answer
129 views

I’m trying to include the beginning of a disk block device (the GPT area) read-only in a device-mapper linear mapping. This block device also contains my root filesystem, as such the partition housing ...
2C7GHz's user avatar
  • 21
0 votes
0 answers
26 views

how to check how many loop-devices in a linux system are possible to use? i need this in a script, are not more than X possible, than end the script with some message...
user447274's user avatar
0 votes
1 answer
69 views

For joining in Linux files/devices in linear mode together i have this script dm-joinlinear.sh from join files/devices in linear mode together in a linux system , thanks telcoM #!/bin/sh usage() { ...
user447274's user avatar
7 votes
0 answers
368 views

As far as I understand, a loop device is a regular file that acts as a block device. It's used for various things like isolation in snap packages and installing ISOs over an existing filesystem. But ...
raul's user avatar
  • 71
3 votes
1 answer
103 views

When I create a 400MB file called /tmp/foo, then call losetup -f /tmp/foo, this creates a loop device /dev/loop15. If I then partition the loopdevice and format it to contain ext4,ntfs, and fat32 ...
mo FEAR's user avatar
  • 157
0 votes
0 answers
238 views

I created a loop device with $ truncate -s 20G test.img $ losetup -fP ./test.img $ losetup -a /dev/loop0: [0032]:4051 (/tmp/test/test.img) lsblk is able to see it just fine $ test]# lsblk NAME ...
wasp256's user avatar
  • 209
5 votes
1 answer
744 views

I'm trying to figure out a clean and safe way to use loop devices inside of a build script. To the best of my knowledge loop devices are required if you want to (GPT) partition and (FAT32, EXT3) ...
Philip Couling's user avatar
1 vote
1 answer
192 views

I created a backup of my LUKS-encrypted Ubuntu installation's entire boot drive as a squashfs file. The backup was performed by using Streaming Compression into a pseudo file, resulting in a ...
localhost's user avatar
  • 327
0 votes
1 answer
511 views

I am trying to make a virtual disk with two partitions. First a 100M FAT (type 0xC) and second a 2G Linux partition (type 83). I have a process that does this correctly with a real USB device. But I ...
Ryan Buton's user avatar
0 votes
1 answer
248 views

I am trying to create a disk image file with an EXT2 partition, however the partition is not found and entire loop device is seen as free/unpartitioned space. My computer can read Ext2 formatted disks,...
PerkyElixir22's user avatar
5 votes
1 answer
11k views

I have a loop device which shows up when I do losetup --all that I have been unable to remove. So, I basically got myself into this issue because a created a raw image of a microSD card and then I ...
AeroMaxx's user avatar
  • 227
0 votes
2 answers
1k views

I created an ext4-filesystem on a loop device with all necessary files to boot with, e.g.: /bin /boot /dev /lib /mnt /etc ... Now I want to boot from the loop device as an image (let's say ...
User100700's user avatar
0 votes
1 answer
1k views

I run an iSCSI disk on a Linux server (RHEL7). The disk has a normal ext4 partition containing a loop device called disk01.img, which is mapped to a virtual disk with a Windows NTFS file system. All ...
roelvdh's user avatar
0 votes
1 answer
412 views

In various tutorials I see the following command: mount -o ro,loop,offset=123 harddrive.img /mnt/loop but from reading the documentation I can't understand what are loop devices. Why would harddrive....
Fractale's user avatar
  • 123
4 votes
1 answer
6k views

For example, I would like to setup mydata.img to /dev/loop5, I would expect using the command below. However it gives the error losetp: unexpected arguments. losetup --show -Pvf /dev/loop5 mydata.img ...
midnite's user avatar
  • 613
1 vote
0 answers
23 views

I need to create a bootable disk image on a remote computer but keep getting errors trying to mount partitions created on the .img file I have tried many different utilities but the basic steps I am ...
wadesalazar's user avatar
3 votes
2 answers
2k views

/dev/sda5 is mounted at / and it's my filesystem piotr@thinkpad:~$ sudo mkdir /home/mpoint piotr@thinkpad:~$ sudo mount /dev/sda5 /home/mpoint so now I can do: piotr@thinkpad:~$ cd /home/mpoint/home/...
pjk's user avatar
  • 323
1 vote
1 answer
3k views

I have the following picture: $ sudo lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT loop0 squashfs /snap/code/58 loop1 ...
Dims's user avatar
  • 3,465
0 votes
0 answers
53 views

I've googled this extensively and can't quite come up with an answer. Overview I created two image files of a filesystem I'm actively using (/) and it sometimes is ok, and othertimes is not. What I do ...
tgm1024--Monica was mistreated's user avatar
2 votes
0 answers
763 views

The data being displayed on a loop device mount is incorrect when the data in the underlying file is changed. Example: $ mkdir drv $ dd if=/dev/zero of=data.ext4 bs=1M count=10 $ mkfs.ext4 data.ext4 $ ...
Michael Mullin's user avatar
2 votes
1 answer
6k views

I tried the process from this post resize partition on an image file. I didn't succeed in understanding why it goes wrong in my case. I produced a 8GB image using dd. The image contains two partitions....
sugarman's user avatar
  • 313
2 votes
1 answer
2k views

I am trying to set up a virtual drive from a file. This file will then be written to a flash device (not relevant). Because creating and manipulating the virtual drive will be in a script, I need to ...
Sean Walton's user avatar
0 votes
1 answer
605 views

the pocket beagle, using debian9.9, shows up as a mass storage device on my windows machine. I have found the backing file (i'll call it a drive) used by the mass storage device. I would like to mount ...
bat's user avatar
  • 148