I have an ext4 filesystem image named linux-partition-image that I want to get data off of, and executing the command
mount ./linux-partition-image mountdir -o ro,loopas root results in the message mount: mountdir: mount failed: Operation not permitted. The same message shows up if I give the command a directory that doesn't exist, so the error must be happening before the mount operation itself.
1 Answer
I get that as well, and there is no need to reboot the machine to mount the image.
Simply issue
modprobe loop
and I can do mount -o loop afterwards.