# genkernel fails on loop support/ usbfs not mounting

## XhwMikey

Hello,

I have two questions:

First, I was munging with my kernel config using Genkernel --menuconfig, and I turned off loop support.  Now I can't use Genkernel --menuconfig again because it complains that loop support is not running.  So I compiled a kernel (my first non Genkernel and turned on loop support) and all is well there except for problem #2 which I'll get to later.  I still can't do a genkernel.  I tried to modprobe loop, but it fatals out with "module loop not found".  Is there a way I can get back to genkernel?  Do I have to boot from the cd and chroot?  Do I really need genkernel anyway (assuming I can solve problem #2)?  What am I giving up (autodetection? autoconfiguration?) by doing the "straight kernel"?

OK, problem #2:

  On boot of my non Genkernel setup, I see a message from mount that it failed to mount the usbfs.  Below are some relevant (I hope) snippets of logs.

# dmesg | grep -i usb

bash-2.05b# dmesg | grep -i usb

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI0 PS2K PS2M UAR2 UAR1 AC97 USB1 USB2 USB3 USB4 EHCI PWRB SLPB

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

# cat /etc/fstab

/dev/sda4               /               ext3            noatime                 0 0

/dev/sda2               /boot           ext2            noauto,noatime          1 1

/dev/sdb3               /home           ext3            noatime                 0 0

/dev/sda3               none            swap            sw                      0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro,user          0 0

#/dev/fd0               /mnt/floppy     auto            noauto                  0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

# Adding the following line to /etc/fstab should take care of this:

none                    /dev/shm        tmpfs           defaults                0 0

none                    /proc/bus/usb   usbfs           defaults                0 0

# rc-update show

           alsasound | boot

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

         crypto-loop |

               cupsd |      default

          domainname |      default

              esound |

                famd |

                 gpm |

              hdparm |

            hostname | boot

             hotplug |      default

             keymaps | boot

                lisa |

               local |      default nonetwork

          localmount | boot

             metalog |      default

             modules | boot

               mysql |

                 nas |

            net.eth0 |      default

              net.lo | boot

            netmount |      default

                nscd |

             numlock |

       pg_autovacuum |

             portmap |

          postgresql |

             reslisa |

           rmnologin | boot

              rsyncd |

               samba |

              serial | boot

               slapd |

                slpd |

              slurpd |

                sshd |

             urandom | boot

          vixie-cron |      default

                 xdm |      default

                 xfs |

My current kernel config vis-a-vis USB:

# cat .config | grep -i usb

CONFIG_VIDEO_CPIA_USB=m

# ALSA USB devices

# CONFIG_SND_USB_AUDIO is not set

# CONFIG_SND_USB_USX2Y is not set

# USB support

CONFIG_USB=y

# CONFIG_USB_DEBUG is not set

# Miscellaneous USB options

CONFIG_USB_DEVICEFS=y

CONFIG_USB_BANDWIDTH=y

# CONFIG_USB_DYNAMIC_MINORS is not set

# CONFIG_USB_SUSPEND is not set

# CONFIG_USB_OTG is not set

# USB Host Controller Drivers

CONFIG_USB_EHCI_HCD=m

CONFIG_USB_EHCI_SPLIT_ISO=y

CONFIG_USB_EHCI_ROOT_HUB_TT=y

CONFIG_USB_OHCI_HCD=m

CONFIG_USB_UHCI_HCD=m

# USB Device Class drivers

# CONFIG_USB_AUDIO is not set

# CONFIG_USB_BLUETOOTH_TTY is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_ACM is not set

CONFIG_USB_PRINTER=m

CONFIG_USB_STORAGE=m

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_RW_DETECT is not set

CONFIG_USB_STORAGE_DATAFAB=y

CONFIG_USB_STORAGE_FREECOM=y

CONFIG_USB_STORAGE_ISD200=y

CONFIG_USB_STORAGE_DPCM=y

CONFIG_USB_STORAGE_HP8200e=y

CONFIG_USB_STORAGE_SDDR09=y

CONFIG_USB_STORAGE_SDDR55=y

CONFIG_USB_STORAGE_JUMPSHOT=y

# USB Human Interface Devices (HID)

CONFIG_USB_HID=m

CONFIG_USB_HIDINPUT=y

CONFIG_USB_HIDDEV=y

# USB HID Boot Protocol drivers

# CONFIG_USB_KBD is not set

# CONFIG_USB_MOUSE is not set

# CONFIG_USB_AIPTEK is not set

# CONFIG_USB_WACOM is not set

# CONFIG_USB_KBTAB is not set

# CONFIG_USB_POWERMATE is not set

# CONFIG_USB_MTOUCH is not set

# CONFIG_USB_EGALAX is not set

When I try to manually mount the usbfs using the following mount command (not sure of correctness) I get:

# mount /proc/bus/usb

mount: none already mounted or /proc/bus/usb busy

mount: according to mtab, none is already mounted on /proc/bus/usb

Any ideas where I should start snooping around?  Thanks in advance for *ANY* help you could provide.

MikeyB

----------

## dhalsiim

1. You no longer have loop support in the kernel therefore genkernel fails. You can compile your kernel by hand (i.e manually) and get in loop support and then let genkernel take on from there. You already have done this but are getting usb problems. Well we're in kind of a loop here ourselves aren't we :p

All genkernel does is compile everything the kernel has to offer for you since it does not know about the specifics of the devices found in your computer. If you do the setting/compiling manually, you leave out all the extra stuff and only put in support for devices you actually have. Therefore you wouldn't require genkernel's autodetection (if there is such a thing..).

Yes you can use the LiveCD again and mount all your partitions just as you did during the install stage, and you will be able to use genkernel (since the kernel that comes on the LiveCD probably has loop support). Sooner or later you will want to be independent of genkernel and would want to compile your own kernel. Now is always the best time ^^. As for the usb problem, just type in "mount" at a command prompt and if usbfs shows up then it's started! Do you recall the exact error that you get? If you don't get any other errors, and everything works fine for you, then you don't need genkernel!!

Oh and by the way, after you configure a kernel it leaves a ".config" file with all the settings saved in. You can use genkernel's previously created .config file, without having to configure the kernel all over again yourself to eliminate any possibility of forgetting to install something important.

----------

## XhwMikey

dhalsiim,

Thanks for your reply.  I am now running my regular (not Genkernel) kernel.  Upon booting, I noticed the usbfs error message again, but when in my normal environment (kde) I did the "mount" command as you suggested.

----> The usbfs was mounted as it was supposed to be!! <----

Now I know why mount is complaining during the mounting of /etc/fstab entries because it is trying to mount an already mounted usbfs...Doh!

OK, so now I'm in learning mode:  

Why the difference between Genkernel generated kernels which require ( or at least tolerate ) mounting the usbfs in /etc/fstab, and non-Genkernel generated kernels which seem to mount this filesystem elsewhere?  Where/when is the usbfs mounted?  I suspect my understanding of the usbfs (and its mounting implications) is woefully lacking, so any info would be welcome!  Thanks again.

MikeyB

----------

## dhalsiim

XhwMikey,

If you check the start-up script in /etc/init.d/ called localmount, you'll find that it looks for whether or not you have a usb filesystem by checking /proc/filesystems. If it does, it then tries to mount it. Load the file, it's right in the beginning! I understand from this file that it will load the usb-filesystem automatically for 2.4 and 2.6 kernels. I don't see why would this not be the case with genkernel >_<; Perhaps someone else here could enlighten us both.. As for the the line for mounting usbfs in /etc/fstab. I remember from long ago (not very long?) that this line was mandatory for mounting it automatically at startup, but later on changed and got added in the startup scripts (It was even part of the install documentation). I guess you already would have removed that line from your /etc/fstab now (right? - yes right :]).

----------

## XhwMikey

dhalsiim,

Sure did, and now my boot up is clean and green - Thanks for the help!  Re-verified that usbfs is mounted and it is.  When I get back home (I'm at work currently) I'll look into the scripts for more info.  Thanks again.

I'm wondering, who should I contact to request an edit to the amd64 (and I presume other arch's) Gentoo handbook?  Should I enter a bug report?  I'm pretty new to this so sorry if this is too "noob" of a question...

MikeyB

----------

## dhalsiim

MikeyB,

Yes indeed you file a bug report. Here's what they have to say about filing bugs on the documentation website:

"If you find bugs in our documentation or have proposals, please use our Bugtracking System and fill in a bug report for "Docs-developer" or "Docs-user". These bug reports will then be handled by the Gentoo Documentation Project."

It's always going to be a "noob" question if not asked :].

Good day.

----------

