Friday 3 April 2009

mount: could not find any free loop device

Just tried to mount a bunch of .iso images I'd made from backup cds so I could hunt for a missing photograph without needing to continually swap cds. I ran out of loop devices, that is I got this error:

mount: could not find any free loop device

Here's how I fixed it thanks to this article.

Creating extra loop device entries

Also make sure you have enough devices available. You can
check how many you have by doing:

ls -d /dev/loop*

An easy way to create more, is by doing:

for i in $(seq 0 255); do
mknod -m0660 /dev/loop$i b 7 $i
chown root.disk /dev/loop$i
done

You can have up to 256 loop devices mounted.

No comments: