Craig's Linux Notes: Gentoo 2004.0 Upgrade (2.6 kernel)

Last modified: 01/01/2007

I upgraded to the 2.6 kernel to use a video capture card I purchased. I ran into a few problems during the upgrade, detailed here.

Contents

Which package?
Further preparation
LVM
Network
CD drives
X
devfs versus udev
Sound
Printer
Scanner
i2c & lm-sensors
svgalib
ati-drivers
xfree-drm
Coexistence with 2.4.x

Which package?

At the time of this writing, Gentoo packages the 2.6 kernel in the development-sources package. emerge it and then follow the Rebuilding kernel 2.6 instructions.

Further preparation

I failed to read all of the documentation and when I booted to 2.6 was unable to access any of my LVM partitions. I also made it so I couldn't access my partitions from 2.4, either. I eventually got myself out of this jam by getting a hold of a Gentoo 2004.0 Universal LiveCD. You would do well to get your hands on one of these before modifying your system further.

LVM

If you use LVM, you should read Gentoo's LVM2 page. Specifically,

if you want to be able to boot to your 2.4 kernels (recommended):

and for 2.6 kernels:

Also see my LVM page.

Network

Doesn't work. Problem with PPPoE. "modprobe -v ppp" fails. "modprobe -v ppp_generic" reports that the modules is already in the kernel, despite that I configured it to be a module. The other ppp modules won't load. Solution: compile all the PPP modules into the kernel. Don't compile in PPPoE!

CD drives

Received a bunch of warnings on start-up. It was because I had a file in "/etc/modules.d" that contained 'options ide-cd ignore="hdc hdd"'. It was for SCSI emulation. I removed the file, re-ran modules-update, and my CD drives were accessible.

X-CD-Roast can see my drives as ATAPI only, but warns me to expect bad performance.

X

After resolving the trouble I caused myself by not reading the documentation, I booted to 2.6 and X would not start. It complained that it could not open "/dev/mouse".  The problem was that I forgot to enable automatic mounting of devfs at boot in the kernel configuration. Solution: in the kernal configuration, set CONFIG_DEVFS_MOUNT=y and recompile. Wait! See devfs versus udev below.

Actually, the devfs guy recommends against using "/dev/mouse" in "/etc/X11/XF86Config", and instead recommends "/dev/psaux" (or whatever your mouse is). Reason being that "/dev/mouse" is vague.

devfs versus udev

devfs is out. udev is the replacement. See the Gentoo udev guide and Decibel's udev Primer. Configured kernel as per Decibel's suggestions, disabling devfs completely, and emerging udev-024-r1.

/sbin/rc is Gentoo's start-up script. It handles initializing udev, disabling udev if devfs is in use, mounting /proc and /dev/shm. (So why are they in /etc/fstab? In that file, they are marked "critical", so I am leaving them alone.)

Udev's configuration files are in /etc/udev. The one the does most of the work is /etc/udev/udev.rules.

As foretold by Decibel, /dev/ppp was missing. I got ppp working by running:

mknod /dev/ppp c 108 0

What else? My fax-modem broke. I needed to create this link:

ln -s /dev/ttyS4 /dev/modem

Maybe I could put a special rule in udev.rules for this, but it seems excessive. (To find the modem port, search /var/log/messages for ttySn.)

Also: access to IEEE-1394 devices broke because udev does not support them yet. Restore the devices with:

mkdir /dev/video1394
mknod -m 666 /dev/video1394/0 c 171 16
mknod -m 666 /dev/raw1394 c 171 0

The /dev/ieee1394 subdirectory has vanished, also, but I currently don't need it.

Sound

I compiled ALSA into the kernel as a module. Didn't need to recompile user utilities. It works.

With 2.6.6, Alsa cannot save/restore mixer settings on reboot. Try reinstalling alsa-lib and alsa-utils.

Printer

USB printer is missing. It does not appear with "lsusb".... turns out that the EHCI kernel module was blocking communication. Verified use of UHCI with "lspci -v" and checking the "prog-if" values. Once I removed this module from the build, I could see my printer on the USB.

udev has configured "/dev/lp0" for me. I added the following to "/etc/udev/udev.rules" to automatically create /dev/usb/lp0 and /dev/printers/0:

BUS="usb", KERNEL="lp[0-9]*", NAME="printers/%n", SYMLINK="usb/lp%n"

It was helpful to enable logging in "/etc/udev/udev.conf". Also helpful was the "ink" utility.

Now the printer works.

Just to check, cleaned out the kernel directory and rebuilt everything again with EHCI. And everything worked great. I suspect the initial malfunction was due to user error (using a 2.4 configuration file with 2.6).

Scanner

My scanner is recognized on the USB bus (shown with "lsusb"), but udev does not recognized it. This is because the "scanner" kernel module is not loaded. Because it is no longer part of the kernel. What now?

Step 1: "sane-find-scanner" locates the scanner:

found USB scanner (vendor=0x04b8 [EPSON], product=0x011e [EPSON Scanner]) at libusb:003:002

Step 2: "scanimage -L" fails. Solution: emerge latest sane-backends and compile with "usb" USE flag. emerge latest libusb to 0.1.8. Configure /etc/sane.d/epson.conf: the only non-comment line should be:

usb

Now "scanimage -L" finds the scanner, but misclassifies it as an "Epson GT-8300". This is actually correct. According to the SANE Epson back-end maintainer's FAQ, this is an alternate model designation.

Step 3: Preview scanning with xsane fails. Xsane failed to actuate the scanner's head and displayed garbage. The problem was that sane was reading from the default scan source which is now a video capture card (tuned to The Static Channel). Solution: Add either "epson" or "epson:libusb" to the xsane command line.

Step 4: xsane only works for root. Gotta fix this. I need a hotplug script (not udev -- that's only when there is a kernel device driver module). The hotplug perms fix is detailed on Karl's SANE Epson Backend - libusb page. I edited /etc/hotplug/usb.usermap as described and added the epson_scanner script (the USB device is /proc/bus/usb/xxx/yyy).

i2c & lm-sensors

I currently have lm-sensors 2.8.1.

See LM-Sensors 2.6 Kernel and LM-Sensors Supported Devices. My sensor is supported on the I2C bus (I think) but not ISA (OK with me). Drivers:

Mostly follow directions in this thread. They don't apply exactly because the lm-sensors package is no longer needed for x86:

  1. emerge -C i2c gkrellm-sensors lm-sensors (this will break sensors in 2.4 kernels).
  2. Configure and compile kernel modules for i2c and sensors. Include i2c-isa.
  3. Reboot.
  4. modprobe -v i2c-isa -- works.
  5. modprobe -v w83781d -- works. Note: In 2.6.6 kernel, driver is w83627hf
  6. Append to /etc/modules.autoload/kernel-2.6:
    i2c-i801
    i2c-isa
    w83781d    Note: In 2.6.6 kernel, driver is w83627hf
  7. rc-update del lm_sensors and then remove:
    /etc/init.d/lm_sensors
    /etc/conf.d/lm_sensors
    /etc/sensors.conf
  8. List /sys/bus/i2c/devices. Should see two device directories. One is TV capture card, and the other are sensors. List each device directory. Once should be filled with sensor-ish stuff. If not, kernel modules need tuning.
  9. gkrellm: may need recompiling. Maybe not.
  10. Restart gkrellm. Open configuration with F1 and check Sensors section. It should now see the sensors.
Does gkrellm forget the settings if the sensors move to a different device ID? Maybe I should be using udev here.

svgalib

At one time, I thought this package had to be re-emerged after each kernel build. However, it does not add or modify any kernel drivers. It is used by mplayer. Keep it in my system and ignore it.

ati-drivers

Installs kernel modules. Does it work with 2.6?

Hold on here. I have a Radeon 7000 (Radeon VE). It's not supported by this package. My system is running fine without it and I don't need it. Removing...

xfree-drm

Installs kernel modules. Does it work with 2.6?

The 2.6.4 kernel provides Radeon DRM, and I'm using it.

glxinfo says I have direct rendering.

Coexistence with 2.4.x

Changes for 2.6 mean that some features will be missing if I boot to 2.4:
Copyright © 2004 Craig Lawson
Index no-thank-you-spam-i-am@i-hate-spam.spam.spam Document made with Nvu