Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 (/dev/loop0)
/dev/loop2: [0005]:4482 (/dev/loop1)
/dev/loop3: [0005]:4486 (/dev/loop2)
/dev/loop4: [0005]:4490 (/dev/loop3)
/dev/loop5: [0005]:4494 (/dev/loop4)
/dev/loop6: [0005]:4498 (/dev/loop5)
/dev/loop7: [0005]:4502 (/dev/loop6)

What is the purpose of a loop device which refers to sda1? And what is the purpose of all the other loop devices referring to the previous one?

Is it safe for me to disconnect these loop devices so that I can use them? If so how do I do so? (Running losetup -d /dev/loop[0-7] gives loop device is busy.) If I cannot disconnect these, how do I create new loop devices that I can use for mounting ISO images?

p.s. I am running Debian "wheezy" v 7.1.0.

share|improve this question
    
Afaik there is a parameter for the loop device driver so you could use e.g. 16 devices. Check the source, Monad. –  ott-- Aug 1 '13 at 21:54
    
@ott Which source are you referring to? –  Code-Guru Aug 1 '13 at 23:47
    
loop device driver in the kernel source. –  ott-- Aug 2 '13 at 11:25

1 Answer 1

Take a look and see if there are any mounts using any of the above loopback devices. You can use the mount command to see this:

$ mount

If they are mounted, they you'll likely need to unmount (umount) them prior to getting losetup -d <loopdevice> to detaching them.

$ umount /dev/some/mount

As to if it's safe or not, that really depends on what these are being used for. I'd probably hold off till I had a better grasp of what these loop devices are for, before I started unmounting them. Just a guess but they might have something to do with an encrypted drive.

Therefore I'd create another one just to be safe.

making another loop device

Here are the steps:

$ sudo mknod -m640 /dev/loop8 b 7 8
  • -m640 define the permission of the device
  • /dev/loop8 define the name of the device
  • b for the creation of the special block device
  • 7 8 the number 7 AND 8 define the MAJOR AND the MINOR

Check if the loop is created:

$ ls -l /dev/loop8
brw-r----- 1 root root 7, 8 Oct 3 14:54 /dev/loop8

Now set ownership on the device:

$ sudo chown root:disk /dev/loop8

References

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.