# Kernel 2.6.31-r10 panics but -r6 doesn't [SOLVED]

## blytte

I tried to upgrade the kernel, since I needed a new module anyway (uvcvideo).

I made the changes needed and copied the .config file from the -r6 version into the -r10 folder. Unfortunately I am therefore not able to show the old .config file (stupid me).

Everything compiled well (as usual) and I booted the new kernel.

Sometime after the system services (udev, alsasound, etc.) starts to load the kernel panics, more precisely intelfb_drm. I cannot take a picture of the screen, but I can write down anything still on the screen if you think it might help.

EDIT:

.config:

```

They capped the post! Is there anyway to embed the .config without posting its full contents?

```

emerge --info:

```

Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686)

=================================================================

System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Atom-TM-_CPU_N280_@_1.66GHz-with-gentoo-1.12.13

Timestamp of tree: Mon, 22 Feb 2010 23:15:01 +0000

app-shells/bash:     4.0_p35

dev-java/java-config: 2.1.10

dev-lang/python:     2.5.4-r3, 2.6.4

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.18-r3

sys-devel/gcc:       4.3.4

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=prescott -mtune=generic -mfpmath=sse -msahf -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=prescott -mtune=generic -mfpmath=sse -msahf -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests candy distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://gentoo.kollegie.dk http://mirror.uni-c.dk/pub/gentoo/ ftp://ftp.klid.dk/gentoo/ "

LDFLAGS="-Wl,-O1"

LINGUAS="da en_GB en"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage/layman/enlightenment /usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cli consolekit cracklib crypt cups cxx dbus dri dts dvdr eds emboss encode evo fam firefox flac fortran gdbm gif glitz gpm gtk hal iconv java jpeg jpeg2k kde kpathsea laptop latex ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss oss4 pam pcre pdf perl png ppds pppd python qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 sse3 ssl ssse3 startup-notification subversion svg sysfs tcpd thunar tiff truetype udev usb vim-syntax vorbis win32codecs x264 x86 xcb xcomposite xine xinerama xml xorg xulrunner xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse synaptics keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="da en_GB en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel v4l" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

Last edited by blytte on Sun Feb 28, 2010 11:37 pm; edited 1 time in total

----------

## mjf55

you need to use a site like pastebin.com to post long files like config to and then link to it in your post.

so, how did you make the new kernel.  Did you use make oldconfig or simply copy the config file to the new folder?

I use this guide http://www.gentoo.org/doc/en/kernel-upgrade.xml and see section 10 .

Provide step by step of what you did.

----------

## blytte

Fair enough. I figured I could just reuse the .config file since it was the same kernel version. So I just copied it. I then ran make and make modules_install. Then I copied the bzImage to /boot and inserted the necessary lines in grub.conf. I have no fancy compilers or anything. All kernels are compiled with gcc 4.3.4. The grub.conf lines are all the same very simple lines:

```

root (hd0,0)

kernel /boot/kernel-2.6.31-gentoo-r10 root=/dev/sda8 i915.modeset=1

```

Anyway, I thought it might be the .config file, so I recompiled the 2.6.31-r6 version again, and now it fails too. Of course I saved the old one that worked, so there's no problem. But how can a .config file ruin the kernel? This error appeared using the newly compiled kernel:

```

 * Starting Hardware Abstraction Layer daemon...

[26.778540] BUG: unable to handle kernel _

```

Why would HAL cause this? And not in the kernel compiled before?

The messages from r10 were several screens long.

The config is here http://apache.pastebin.com/8NYU3LXD

----------

## mjf55

So I think that we should start simple, then add the module you need.  It may take a little more time, but what the h....

To answer your question first, the gentoo-sources-2.6.31-r10 is an unstable kernel for the x86.  You had to set an keyword (~x86) in portage.keywords or in the make file to use unstable ebuilds.  Being unstable, there is a good possibility that there are bugs in it.  Not sure, but possible.

Going back, let make sure that the original sources and config file still work.  Again, following the previous documentation link.

in /usr/src make sure the symlink is linux -> linux-2.6.31-gentoo-r6

If you use eselect, you can do eselect kernel list; then eselect kernel set x where x is the number shown for linux-2.6.31-gentoo-r6

cd /usr/src/linux-3.6.31-gentoo-r6

Using your original config file in /usr/src/linux-3.6.31-gentoo-r6; do make && make modules_install, cp arch/x86/boot/bzImage   /boot/kernel-2.6.31-gentoo-r6

run module-rebuild

Reboot and you should work as before.

now lets go to the unstable -r10 version

using eselect or ln -s , set the symlink to /usr/src/linux-3.6.31-gentoo-r10

cp .config from the -r6 folder to the -r10 folder (cp /usr/src/linux-3.6.31-gentoo-r6/.config /usr/src/linux-3.6.31-gentoo-r1/)

make oldconfig  answer all prompts ( if in doubt, just use the default by hitting enter ) 

make && make modules_install.  cp arch/x86/boot/bzImage   /boot/kernel-2.6.31-gentoo-r10

update your /boot/grub/menu.lst to ADD the selection for the new kernel 

run module-rebuild

reboot

If you boot ok now, continue to add the config changes you want and re-build.  you no longer need to use make oldconfig, just make menuconfig.

Otherwise, the -r10 kernel is causing a problem.

Remember to follow the documentation, as I may have typo'd something here.

Good Luck, let us know what happens

----------

## Jaglover

After replacing your kernel you need to rebuild everything that relies on kernel sources. I do not use HAL myself, but I suspect it is one of those, too.

emerge -av1 $(qdepends -CNQ virtual/linux-sources)

----------

## d2_racing

Did you double check the 2  .config with the diff command ?

----------

## curmudgeon

 *mjf55 wrote:*   

> To answer your question first, the gentoo-sources-2.6.31-r10 is an unstable kernel for the x86.  You had to set an keyword (~x86) in portage.keywords or in the make file to use unstable ebuilds.  Being unstable, there is a good possibility that there are bugs in it.  Not sure, but possible.

 

/usr/portage/sys-kernel/gentoo-sources/ChangeLog

```

22 Feb 2010; Christian Faulhammer <fauli@gentoo.org>

gentoo-sources-2.6.31-r10.ebuild:

stable x86, bug 305733

```

----------

## cach0rr0

 *blytte wrote:*   

> 
> 
> I made the changes needed and copied the .config file from the -r6 version into the -r10 folder. Unfortunately I am therefore not able to show the old .config file (stupid me).
> 
> 

 

OT: if your kernel image supports it, so long as you still have that old kernel sitting around, you can still extract a .config from it

```

cd /usr/src/linux

./scripts/extract-ikconfig /path/to/old/kernel

```

----------

## blytte

Problem solved.

Here is how I did:

I extracted the previous and clean .config from /proc and copied it to the new kernel directory (2.6.31-r10). I was very fortunate that this option was on, and I am keeping it on from now on.

I then ran make oldconfig and all that, checking that things looked okay.

I compiled and installed the kernel, and it is now working correctly.

Apparently it was indeed my sloppy .config practice that caused the problem.

So thank you for all your help.

----------

## d2_racing

Nice  :Razz: 

----------

