5

sudo modprobe loop max_loop=255 does not return an error, but lsmod | grep "loop" returns nothing. Likewise find /lib/modules/$(uname -r) -name "loop.ko" doesn't print any paths to the screen.

I'd think that this was because it was missing, but if I use modprobe to load a nonsense name, then I get an error that it doesn't exist.

So, where is the kernel module loop? Does it exist at all?

rubo77
  • 34,024
  • 52
  • 172
  • 299
Melab
  • 1,708

2 Answers2

1

It's likely compiled into the kernel, rather than being available as a separate loadable module: for example, on my 14.04 system

~$ grep 'loop' /lib/modules/`uname -r`/modules.builtin
kernel/drivers/block/loop.ko

See this StackOverflow discussion: Linux Loadable modules and built-in modules.

steeldriver
  • 142,475
1

loop must be compiled into the kernel and not built as a ko module.

That is why it does not appear in lsmod.

You can change max_loop as a boot parameter.

The parameter is called max_loop=255. You can set it in /etc/default/grub in line GRUB_CMDLINE_LINUX_DEFAULT.

Then run sudo update-grub.

Pilot6
  • 92,041