# loop device manually configure Kernel

## jgaffney

Somehow I managed to take the loop device out of my Kernel, oops.

So now when I run genkernel I get this error.

```
* Linux Kernel 2.6.11-gentoo-r6 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!

* -- Grepping log... --

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

* Please load loop support before running genkernel!

* Gentoo Linux Genkernel; Version 3.3.6

* Running with options: all --menuconfig

* ERROR: Load loop support!

```

So I'm assuming I have to manually recompile my kernel with loop device support. The problem is I do not know how.

Could anyone give me instructions on how to do this or point me to a "How To"

Thank you.

----------

## NeddySeagoon

jgaffney,

Issue the command 

```
modprobe loop
```

and try genkernel again.

The loop module is probably not loaded.

----------

## jgaffney

This doesn't look good.

```
tbird-lnx ~ # modprobe loop

FATAL: Error inserting loop (/lib/modules/2.6.11-gentoo-r6/block/loop.ko): Unkno 

wn symbol in module, or unknown parameter (see dmesg)

```

```

tbird-lnx ~ # dmesg

loop: disagrees about version of symbol filemap_fdatawrite

loop: Unknown symbol filemap_fdatawrite

loop: disagrees about version of symbol blk_queue_ordered

loop: Unknown symbol blk_queue_ordered

loop: disagrees about version of symbol set_blocksize

loop: Unknown symbol set_blocksize

loop: disagrees about version of symbol blk_queue_max_segment_size

loop: Unknown symbol blk_queue_max_segment_size

loop: disagrees about version of symbol set_user_nice

loop: Unknown symbol set_user_nice

loop: disagrees about version of symbol add_disk

loop: Unknown symbol add_disk

loop: disagrees about version of symbol wake_up_process

loop: Unknown symbol wake_up_process

loop: disagrees about version of symbol put_disk

loop: Unknown symbol put_disk

loop: disagrees about version of symbol blk_queue_make_request

loop: Unknown symbol blk_queue_make_request

loop: disagrees about version of symbol sync_blockdev

loop: Unknown symbol sync_blockdev

loop: disagrees about version of symbol __free_pages

loop: Unknown symbol __free_pages

loop: disagrees about version of symbol blk_queue_bounce_limit

loop: Unknown symbol blk_queue_bounce_limit

loop: disagrees about version of symbol blk_queue_hardsect_size

loop: Unknown symbol blk_queue_hardsect_size

loop: disagrees about version of symbol bio_put

loop: Unknown symbol bio_put

loop: disagrees about version of symbol bio_endio

loop: Unknown symbol bio_endio

loop: disagrees about version of symbol contig_page_data

loop: Unknown symbol contig_page_data

loop: disagrees about version of symbol generic_make_request

loop: Unknown symbol generic_make_request

loop: disagrees about version of loop: disagrees about version of symbol del_gendisk

loop: Unknown symbol del_gendisk

loop: disagrees about version of symbol blk_alloc_queue

loop: Unknown symbol blk_alloc_queue

loop: disagrees about version of symbol blk_queue_max_phys_segments

loop: Unknown symbol blk_queue_max_phys_segments

loop: disagrees about version of symbol set_device_ro

loop: Unknown symbol set_device_ro

loop: disagrees about version of symbol __alloc_pages

loop: Unknown symbol __alloc_pages

loop: disagrees about version of symbol default_wake_function

loop: Unknown symbol default_wake_function

loop: disagrees about version of symbol invalidate_bdev

loop: Unknown symbol invalidate_bdev

loop: disagrees about version of symbol blk_queue_issue_flush_fn

loop: Unknown symbol blk_queue_issue_flush_fn

loop: disagrees about version of symbol blk_queue_max_sectors

loop: Unknown symbol blk_queue_max_sectors

loop: disagrees about version of symbol bdev_read_only

loop: Unknown symbol bdev_read_only

loop: disagrees about version of symbol page_address

loop: Unknown symbol page_address

loop: disagrees about version of symbol bio_alloc

loop: Unknown symbol bio_alloc

loop: disagrees about version of symbol blk_cleanup_queue

loop: Unknown symbol blk_cleanup_queue

loop: disagrees about version of symbol alloc_disk

loop: Unknown symbol alloc_disk

symbol blk_queue_max_hw_segments

loop: Unknown symbol blk_queue_max_hw_segments

loop: disagrees about version of symbol blk_queue_segment_boundary

loop: Unknown symbol blk_queue_segment_boundary
```

----------

## NeddySeagoon

jgaffney,

It looks like you have upgraded your kernel and failed in the install, thus you are running modules from your new kernel but still actually running the old kernel.

I guess you either did not mount /boot or copied the kernel file to the wrong filename in /boot.

The loop device driver is configured and built but does not match your kernel.

Run 

```
uname -a
```

does the date/time in the output correspond with the date and time of your last kernel build ?

----------

## jgaffney

Looks like my kernel is the same date.

```
tbird-lnx ~ # uname -a

Linux tbird-lnx 2.6.11-gentoo-r6 #1 Sat Sep 10 05:53:19 CDT 2005 i686 Intel(R) Pentium(R) M processor 1.86GHz GenuineIntel GNU/Linux

tbird-lnx ~ # 

```

-rw-r--r--  1 root root  890262 Sep 10 05:53 System.map-genkernel-x86-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1033204 Sep 10 05:56 initramfs-genkernel-x86-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1879260 Sep 10 05:53 kernel-genkernel-x86-2.6.11-gentoo-r6

[/code]

I have to say I was attempting to get the 2.6.12 r10 kernel working, altough X would lock up after compiling it so I attempted to go back to 2.6.11r6 by pointing grub to it. I guess there is more to it than that?[/code]

----------

## NeddySeagoon

jgaffney,

Is thats the date you last compiled 2.6.11-gentoo-r6, thats OK.

What are the dates on the module files in /lib/module/`uname -r`/...

They should be Sep 10 05:53:19 too.

Pointing grub is the right thing to do unless you want to choose the kernel at boot. Browse http://62.3.120.141/Gentoo and look through /boot and /boot/grub.conf for some examples. Its a live Gentoo box displaying its innards on the web, or most of its innards anyway.

Please post the output of the following commands (mount your /boot first) :-

```
ls -l /boot

ls -l /usr/src

The content of your grub.conf
```

----------

## jgaffney

Looks like the modules in /lib/modules is not sep 10. I guess I messed something up with the newer kernel, just not sure what.

```
hbs-e4sdrhlcpje ~ # ls /lib/modules/ -l

total 1

drwxr-xr-x  9 root root 576 Sep 21 07:34 2.6.11-gentoo-r6

drwxr-xr-x  3 root root 424 Sep 15 04:43 2.6.12-gentoo-r10

drwxr-xr-x  3 root root 424 Jul 19 11:47 2.6.12-gentoo-r6

hbs-e4sdrhlcpje ~ # 

```

```
hbs-e4sdrhlcpje ~ # ls -l /boot/

total 13076

-rw-r--r--  1 root root  803430 Apr 27 13:59 System.map-2.6.11-gentoo-r6

-rw-r--r--  1 root root  890262 Sep 10 05:53 System.map-genkernel-x86-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1015918 Sep 15 09:34 System.map-genkernel-x86-2.6.12-gentoo-r10

lrwxrwxrwx  1 root root       1 Sep  8 15:00 boot -> .

drwxr-xr-x  2 root root     632 Jul 19 13:49 grub

-rw-r--r--  1 root root 1033204 Sep 10 05:56 initramfs-genkernel-x86-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1398256 Sep 15 09:38 initramfs-genkernel-x86-2.6.12-gentoo-r10

-rw-r--r--  1 root root 1643924 Apr 24 13:58 initrd-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1653462 Apr 27 13:59 kernel-2.6.11-gentoo-r6

-rw-r--r--  1 root root 1879260 Sep 10 05:53 kernel-genkernel-x86-2.6.11-gentoo-r6

-rw-r--r--  1 root root 3037501 Sep 15 09:34 kernel-genkernel-x86-2.6.12-gentoo-r10

hbs-e4sdrhlcpje ~ # 

```

```
hbs-e4sdrhlcpje ~ # ls -l /usr/src/

total 1

lrwxrwxrwx   1 root root  31 Sep 15 10:24 linux -> /usr/src/linux-2.6.11-gentoo-r6

drwxr-xr-x  19 root root 928 Sep 10 05:56 linux-2.6.11-gentoo-r6

drwxr-xr-x  18 root root 752 Sep 15 09:44 linux-2.6.12-gentoo-r10

hbs-e4sdrhlcpje ~ # 

```

```

hbs-e4sdrhlcpje ~ # cat /boot/grub/grub.conf

default 0

timeout 5

title=Gentoo Linux 

root (hd0,1)

kernel /kernel-genkernel-x86-2.6.11-gentoo-r6 root=/dev/hda5 vga=0x317 video=vesafb:mtrr,ywrap

#kernel /kernel-2.6.11-gentoo-r6 root=/dev/hda5 vga=0x317 video=vesafb:mtrr,ywrap

title=Winblows

root (hd0,0)

makeactive

chainloader +1

hbs-e4sdrhlcpje ~ # 

```

----------

## NeddySeagoon

jgaffney,

I guess you meed up here

```
 lrwxrwxrwx   1 root root  31 Sep 15 10:24 linux -> /usr/src/linux-2.6.11-gentoo-r6
```

Your /usr/src/linux symbolic link is dated for your new kernel but points to the old one.

If you did cd /usr/src/linux right at the strar of your kernel config ....

Do you have a file called /usr/src/linux-2.6.12-gentoo-r10/.config (use ls -a)?

If not, your new kernel has never been configured.

----------

## FuckingFreaky

Hi!

I've got the same problem than jgaffney. I do have a .config file in /usr/src/linux but still got the same error.

Also my grub.conf points to the right kernel version. I've compiled the same version few times so maybe it doesn't "have" the right image of it, I don't know.

I'm gonna try to do it manually, and see if I can fix the problem that way, but any advice is welcome!

Thx!

----------

## FuckingFreaky

Hey! I did it!

Here's what I did. I boot up with and "old" kernel and then execute genkernel again with the last version. All now goes fine. Just remind anyone with this problem they'll have to delete /etc/kernels/kernelconfigurationyouwanttocompile and pass "--mrproper" and "--clean" to genkernel. At least I had to and it fixed it.

Bye!

----------

