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
  • 31,573
  • 49
  • 159
  • 281
Melab
  • 1,668
  • 5
  • 21
  • 25

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
  • 131,985
  • 21
  • 239
  • 326
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
  • 88,764
  • 91
  • 205
  • 313
  • I rebooted and added `loop.max_loop=255` to the kernel command line. `cat /sys/module/loop/parameters/max_loop` currently returns `255`, but `xen-create-image` is still telling me to execute `modprobe loop max_loop=255`. – Melab Aug 28 '15 at 17:31
  • This is another question. – Pilot6 Aug 28 '15 at 17:34