# The build-host kernel does not appear to have loo [RESOLVED]

## essdeeay

I'm trying to update my kernel using Genkernel, but get the following error:

```
sotus ~ # genkernel --bootsplash --no-install --no-clean --menuconfig all

* Gentoo Linux Genkernel; Version 3.4.6

* Running with options: --bootsplash --no-install --no-clean --menuconfig all

* Linux Kernel 2.6.19-gentoo-r5 for x86...

* The build-host kernel does not appear to have loop device support.

* Please load loop support before running genkernel!

* ERROR: Load loop support!
```

I understand (I think) that I need to enable loopback device support in the running kernel, but I don't know how to do it.  I tried 'modprobe loop' but that didn't work.

My system is:

```
Linux sotus 2.6.15-gentoo-r1 #4 SMP PREEMPT Fri Apr 21 11:36:05 GMT 2006 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
```

Can anyone offer any advice please?

Many thanks,

SteveLast edited by essdeeay on Fri Mar 30, 2007 11:43 am; edited 1 time in total

----------

## Voltago

In your kernel .config file, add

```
BLK_DEV_LOOP=m
```

or alternatively, use

```
make menuconfig
```

in your kernel source directory, and go to

```
Device Drivers -> Block Devices
```

and activate 'Loopback device support'. Build and install kernel and modules afterwards:

```
make

make install

make modules_install
```

----------

## essdeeay

Thanks Voltago!

Just to clarify, to I have to do that in my old (currently running) kernel config, and do I have to recompile the (currently running) kernel again, before trying to update?

Steve  :Smile: 

----------

## didymos

Does the loop module exist? modprobe should have done the trick if so.  If not, and you still have the source for the currently running kernel installed, then go to the directory with that source and do this:

```

make mrproper && make oldconfig && make menuconfig

```

You can skip the first two make commands as long as you haven't altered anything in that kernel's .config since you installed it.

Now go to "Device Drivers" -> "Block devices" and choose to build loopback device support as a module, then:

```

make modules && make modules_install

```

Now modprobe loop again, and run genkernel.  No reboot required if it's just a new module.

----------

## didymos

Son of a bitch.  I hate it when the forums don't update and I post the same thing someone did 5 minutes ago.

[edit]

Well, mostly the same. I'm declaring that mine is more comprehensive, and therefore not a waste of bandwidth or space.

----------

## essdeeay

No no, you inadvertently answered my next post - I followed your instructions, but modprobe still doesn't find loop (Module loop not found)

Steve  :Smile: 

----------

## didymos

Where did the kernel modules get installed to?

----------

## Voltago

Are you actually using the kernel you just compiled? If you are not sure, compare the name of the kernel source dir to the output of

```
uname -r
```

What does

```
find /lib/modules/`uname -r` -iname loop.ko 
```

tell you? Or perhaps loop support is compiled not as a module, but statically into the kernel?

```
dmesg | grep loop
```

----------

## essdeeay

I corrected the usr/src/linux symlink to point to the running kernel, and performed the procedure again, and this time it says it does install the loop device, but the new Genkernel still complains about it, and 'modprobe loop' still doesn't find the module.

The output of the make modules && make modules_install is:

```
  INSTALL drivers/acpi/ibm_acpi.ko

  INSTALL drivers/acpi/video.ko

  INSTALL drivers/base/firmware_class.ko

  INSTALL drivers/block/loop.ko     <----- It's here

  INSTALL drivers/net/dummy.ko

  INSTALL drivers/net/s2io.ko

  INSTALL drivers/net/skge.ko

  INSTALL drivers/net/sky2.ko

  INSTALL drivers/scsi/dpt_i2o.ko

  INSTALL drivers/usb/misc/cytherm.ko

  INSTALL lib/libcrc32c.ko
```

"find /lib/modules/`uname -r` -iname loop.ko" returns nothing though  :Sad: 

Steve

----------

## Voltago

 *essdeeay wrote:*   

> "find /lib/modules/`uname -r` -iname loop.ko" returns nothing though 

 

Strange. Are you sure you didn't misstype the command and are you sure you pointed /usr/src/linux to the sources of the kernel you are running right now?

----------

## essdeeay

Correction... I repeated the process after cleaning out a bit, and now the find command gives me this:

/lib/modules/2.6.15-gentoo-r1/kernel/drivers/block/loop.ko

----------

## Voltago

 *essdeeay wrote:*   

> Correction... I repeated the process after cleaning out a bit, and now the find command gives me this:
> 
> /lib/modules/2.6.15-gentoo-r1/kernel/drivers/block/loop.ko

 

And modprobe still doesn't work? Try to reboot then.

----------

## didymos

OK, I knew I should have checked bugzilla:

Genkernel didn't find "^loop:" in a long and truncated dmesg

Allegedly, this bug was fixed a number of revisions ago.

----------

## essdeeay

Ok, we're getting somewhere... but now I get this mid-way through the compile, and I can't find out why.

```
/var/tmp/genkernel/29905.20167.8278.26491/busybox-1.1.3+gentoo/libbb/procps.c:15:22: error: asm/page.h: No such file or directory

make[1]: *** [/var/tmp/genkernel/29905.20167.8278.26491/busybox-1.1.3+gentoo/libbb/procps.o] Error 1

make: *** [all] Error 2

* Gentoo Linux Genkernel; Version 3.4.6

* Running with options: --bootsplash --no-install --no-clean --menuconfig all
```

I've put the whole (or the busybox part) of the log here temporarily:

http://www.rowyerboat.com/busybox

Steve  :Smile: Last edited by essdeeay on Thu Mar 29, 2007 3:42 pm; edited 1 time in total

----------

## Voltago

Have you ever considered that learning how to configure a kernel by hand would be less work than using genkernel?

----------

## essdeeay

Yes, but doesn't that mean each time you update the kernel, you've got to go through it all again, knocking out all the hardware rubbish you don't need etc?

Steve  :Smile: 

----------

## Voltago

I'm using basically the same .config file since the days of 2.6.10, where I got my first centrino laptop. Each time I migrate to a new kernel, I copy the .config file to the source directory, and obsolete config entries are automatically removed when I run 'make menuconfig'. Sometimes you have to take care when major changes affect some basic kernel subsystem, like all that SATA stuff some time back, but normally it's just a matter of copying a file.

----------

## essdeeay

What about new functionality?

----------

## Voltago

 *essdeeay wrote:*   

> What about new functionality?

 

You want some new functionality, you activate it. Easy. How is that done with genkernel?

----------

## essdeeay

If I copy my .config file into the new source directory, and run 'make menuconfig', does it insert any new functionality options for me to choose, as well as deleting the obsolete options?

Steve  :Smile: 

----------

## Voltago

Exactly. Btw, a useful tip for the 'menuconfig' application: If you type '/' you can search the help texts for all kernel options for a given search term. This helps you to find the driver for a certain piece of hardware, e. g. type '/', then 'cinergy' to find drivers for Terratec DVB video adapters.

----------

## didymos

The asm/page.h error is specific to 2.6.20 kernel headers,  as that file no longer gets exported.  Here's the bug:

genkernel-3.4.7_pre3 fails while compiling busybox with 2.6.20

The same thing applies to genkernel-3.4.6, but the busybox it builds might be different.  Don't use genkernel, so I don't know.

----------

## essdeeay

I know we're moving away from the original question now, but that's only because the best solution dictated that.  So, I hand-rolled my own kernel, copied bzImage and a copy of the .config into place in /boot, and also edited /boot/grub/grub.conf.  I see that the other kernels in there use an initrd.

Is this a standard thing, or can I make one from the new kernel sources?[

In reply to Voltago's suggestions about letting make menuconfig update the .config, before configuring, I've just found some info in the Gentoo Linux Kernel Upgrade Guide (see section 10: http://www.gentoo.org/doc/en/kernel-upgrade.xml) which says:

 *Quote:*   

> It is sometimes possible to save time by re-using the configuration file from your old kernel when configuring the new one. Note that this is generally unsafe -- too many changes between every kernel release for this to be a reliable upgrade path.
> 
> The only situation where this is appropriate is when upgrading from one Gentoo kernel revision to another. For example, the changes made between gentoo-sources-2.6.9-r1 and gentoo-sources-2.6.9-r2 will be very small, so it is usually OK to use the following method. However, it is not appropriate to use it in the example used throughout this document: upgrading from 2.6.8 to 2.6.9. Too many changes between the official releases, and the method described below does not display enough context to the user, often resulting in the user running into problems because they disabled options that they really didn't want to. 

 

Any comments on the accuracy of that?

Thanks again,

Steve  :Smile: 

----------

## didymos

That applies more to "make oldconfig".  If you do a menuconfig, just scan through things to make sure things haven't changed.  If they have, it's usually pretty obvious what with the "NEW" everywhere.

----------

## essdeeay

Thank you to both Voltago and didymos... I've now configured the kernel by hand and all seems to be working smoothly.  The resolution in this thread is Don't use Genkernel

Steve  :Smile: 

----------

