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
2 votes
1 answer
2k views

I have a system that generates embedded Linux systems. The system outputs three files: a tarball containing rootfs excluding the kernel modules a tarball containing the kernel modules uImage The ...
TheAG's user avatar
  • 335
3 votes
1 answer
942 views

I'm running kpartx from within a python script as part of a custom OS build I'm trying to do. I'm using python sh module to run bash commands. sh.kpartx("-as", image) is how I attach my image. Then ...
Shady Programmer's user avatar
3 votes
0 answers
4k views

I have a script that I use to mount diskimages that are LVM images. it does: x=`losetup -f` #create a loop device echo $x > loopdev #echo that device to a file for later use losetup $x ...
Kevin Martin's user avatar
0 votes
1 answer
386 views

I am getting messages such as: kernel: Buffer I/O error on dev sdb1, logical block 107390598, async page read In actuality, the USB HDD sdb has been removed: lsblk also shows no mention of sdb. I ...
Tom Hale's user avatar
  • 33.4k
4 votes
2 answers
25k views

I have a disk image file I'm trying to mount locally using a loop device. Using parted I can see the image has two partitions, however, I'm not able to mount the first partition and losetup thinks the ...
dangeroushobo's user avatar
7 votes
2 answers
5k views

I'm using unshare to perform things like bind mounts local to a certain process without requiring root access, e.g.: unshare -mr bash mount --bind a b (Yes, this seems kinda dumb; in my actual use ...
kirbyfan64sos's user avatar
3 votes
2 answers
3k views

I'm using debootstrap to create a rootfs for a device that I want to then write to an image file. To calculate the size needed from my rootfs, I do the following: local SIZE_NEEDED=$(du -sb $...
thom_nic's user avatar
  • 577
1 vote
0 answers
1k views

The goal is to test the out of disk space condition. Creating an image: dd if=/dev/zero of=test bs=1024 count=10000 Mountpoint: mkdir mountpoint Mounting fails: guestmount -a test -m/dev/sda ...
Velkan's user avatar
  • 581
2 votes
1 answer
1k views

I created a virtual file system as follows: dd if=/dev/zero of=/home/tmpfs/fs.img bs=4096 count=600000 mke2fs -F -t ext4 -q /home/tmpfs/fs.img mount -o loop=/dev/loop6 /home/tmpfs/fs.img /home/test ...
Moritz Becker's user avatar
18 votes
4 answers
29k views

I am trying to mount root and boot partition of Raspbian image: mount -v -o offset="70254592" -t ext4 /mnt/X/raspbian-jessie.img /tmp/raspbian mount -v -o offset="4194304" -t vfat /mnt/X/raspbian-...
Grzegorz Wierzowiecki's user avatar
5 votes
2 answers
8k views

I was reading Trouble with understanding the concept of mounting and came across this explanation: By using mount -t iso9660 /dev/cdrom /media/cdrom, you tell the system: "take this very long string ...
Shrikant Giridhar's user avatar
2 votes
1 answer
6k views

in an attempt to access a truecrypt container, I stumbled about the prerequisite of setting up a loop device... ncoghlan suggested in an earlier answer When you run it as root, losetup -f will ...
ingli's user avatar
  • 2,039
8 votes
1 answer
5k views

Is there a CPU/RAM overhead associated with using loop-mounted images versus using a physical partition under Linux?
hayavuk's user avatar
  • 191
64 votes
6 answers
112k views

I've read that with qemu-nbd and the network block device kernel module, I can mount a qcow2 image. I haven't seen any tutorials on mounting a qcow2 via a loop device. Is it possible? If not, why? I ...
onlyanegg's user avatar
  • 1,205
2 votes
1 answer
3k views

I have several KVM raw files that are read only (about 100gb). I am adding these raw files as loopback devices. I then create a snap file to allow the VM to have read/write access to its disk. This ...
pacmanwa's user avatar
  • 409
3 votes
0 answers
2k views

I have this crazy idea, and want to know the pitfalls of such an approach (or whether it can even work with no deadlocks.. etc). The goal is to create an automatically expanding and contracting ...
CMCDragonkai's user avatar
1 vote
0 answers
98 views

I've got a raw binary file and I need to access it (read-only) as a block device, for compatibility reasons. I mount this file through losetup eg. losetup /dev/loop0 file.bin. The block device is only ...
Jan Hadáček's user avatar
2 votes
0 answers
684 views

I have a secondary HDD that worked fine in Ubuntu 13.04. I had mounted in to /media/user/<some UUID>/. I could read and write files without problem. My Ubuntu installation was on a primary SSD. ...
enthusiasticgeek's user avatar
2 votes
1 answer
5k views

I want to create a loop device myself, I want it to have a special name, say /dev/loop-test-0. I want it to be up after I reboot the machine. I though that I can use mknod for this, but this doesn't ...
e271p314's user avatar
  • 359
1 vote
2 answers
4k views

Can users mount any of the following image files as read-only using a loopback device? If it is possible then can anyone give me examples?
jp4075's user avatar
  • 11
1 vote
1 answer
2k views

I'm having trouble with this piece of code: 22 for filename in "$( ls "$1" | grep ".*\.flac$" )"; do 23 file_path="$1${filename}" 24 ffmpeg -i "${file_path}" -f ...
zvukva's user avatar
  • 13
3 votes
3 answers
681 views

I'm thinking about designing a system for a project using some single-board computer (RaspberryPi, CubieTruck etc) that runs Linux. My main requirement is keeping the complexity of the booted SD card ...
Nitz's user avatar
  • 143
1 vote
0 answers
945 views

I have a USB (ext4) drive connected and it's registered in /etc/fstab. It mounts at /media/Backup fine. I want to mount a specific directory on that drive using a bind / loopback mount (this is ...
juliushibert's user avatar
9 votes
2 answers
27k views

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 /dev/...
Tejendra's user avatar
  • 201
1 vote
3 answers
916 views

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 ...
MathematicalOrchid's user avatar