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,212
Melab
  • 1,704

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
  • 143,099
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,169
  • 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