LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 02-25-2010, 10:23 AM   #1
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 103

Rep: Reputation: 16
Building kernel, initrd fail and nvidia can't find source


So I'm building a custom kernel cuz I want the fbcondecor patch in my kernel. I use the same .config that 2.6.32 debian kernel package comes with. This kernel runs perfectly. I pass --initrd to make-kpkg when building the package but no initrd is built when I install it so I have to make it using "mkinitramfs -o /boot/initrd.img-2.6.33 2.6.33" to get it to boot. Now when I try to build the nvidia drivers it complains it can't find the source. I did build kernel_headers and installed them also the source is in /usr/src/linux. I also tried to specify the path by passing --kernel-source-path= to the nvidia script but no change. What is going on? I've done this fifty times before and never had any problems. Has there been some changes to how debian kernel packages are built?

EDIT: Just thought I'd add some info about the steps I took.

Code:
tar xjvf linux-2.6.33.tar.bz2
ln -s linux-2.6.33 linux
cd linux
patch -p1 < ../fbcondecor-0.9.6-2.6.33-rc7.patch
cp /boot/config-2.6.32-trunk-686 ./.config
make menuconfig
Loaded .config then I removed support for maxtorfb, tile blitting and some sirrusfb thing, nothing thats relevant to my system. Changed cpu from Pentium 4 to Core 2 and added framebuffer decor
support from my patch, exited and saved. Then:

Code:
make-kpkg clean
make-kpkg --initrd --revision=redplague.2 kernel_image kernel_headers module_image
cd ..
dpkg -i linux-*.deb
mkinitramfs -o /boot/initrd.img-2.6.33 2.6.33
update-grub2
EDIT2: I have now tried to build 2.6.32.8 in the same way with the same strange results, anyone have any thoughts as to what I'm doing wrong just throw it at me, I'm getting desperate and running out of ideas. I've checked all the kernel source symlinks and everything looks good.

Last edited by tripmix; 02-25-2010 at 02:23 PM.
 
Old 02-25-2010, 05:38 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,675

Rep: Reputation: 122Reputation: 122
I think you may have a typo in the first chunk of code:
Code:
cp /boot/config-2.6.32-trunk-686 ./.config
This tells me (and the shell) that it needs to copy /boot/config-2.6.32-trunk-686 into a file named .config in the working directory... That is ??/linux (the ?? indicate I have no clue where in the tree you really are) You may need to supply the full path to the .config file instead...

Do note that although I've build a fair number of kernels (all for installing the nVidia drivers) I never managed to get even one successfull build 'the Debian way' with make-kpkg.
 
Old 02-26-2010, 07:26 AM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,733
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
The version of the nvidia-driver in sid is not compatible with 2.6.33. But the actual nvidia driver installs just fine.
http://www.sidux.com/PNphpBB2-viewtopic-t-20034.html

System: Host craigevil Kernel 2.6.33-0.dmz.1-liquorix-686 i686 (32 bit) Distro Debian GNU/Linux squeeze/sid
CPU: Single core Intel Pentium 4 (UP) cache 1024 KB flags (sse3 nx lm) bmips 5585.88
Clock Speeds: (1) 2792.942 MHz (2) 2792.942 MHz
Graphics: Card nVidia G96 [GeForce 9400 GT] X.Org 1.7.5 Res: 1280x1024@50.0hz
GLX Renderer GeForce 9400 GT/PCI/SSE2 GLX Version 3.2.0 NVIDIA 195.36.03 Direct Rendering Yes
Audio: Card Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller driver HDA Intel BusID: 00:1b.0
Sound: Advanced Linux Sound Architecture Version 1.0.21
Network: Card Intel 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller driver e100 v: 3.5.24-k2-NAPI at port dcc0 BusID: 03:08.0
Disks: HDD Total Size: 160.0GB (19.7% used) 1: /dev/sda WDC_WD1600JS 160.0GB
Partition: ID:/ size: 103G used: 30G (30%) fs: ext3 ID:swap-1 size: 5.25GB used: 0.00GB (0%) fs: swap
Info: Processes 102 Uptime 30 min Memory 196.2/2016.4MB Runlevel 5 Client Shell inxi 1.4.6
 
Old 03-04-2010, 01:32 PM   #4
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 103

Original Poster
Rep: Reputation: 16
Still working on this. I'm on squeeze btw, not sid. I don't think it's relevant to my problem anyway as my install fails long before this. I'm pretty sure it's a linux source/headers problem. I've noticed that when I install the headers for the debian stock kernel I have to install two packages, linux-headers-2.6.32-trunk-686 and linux-headers-2.6.32-trunk-common. I also have no idea why it has the word "trunk" in it. Do anyone know what this might mean? Bit of a rush right now but I'll check back later.

EDIT: It's later. I've now also noticed that many of the sources I install from the deb repo belong to the group src, it might have always been like that but I never noticed before. Also the kernel source tar ended up in this group when I downloaded it to /usr/src using lynx. I'm gonna try using a different build directory next time and see if that changes anything. I'll let you know how it goes.

Last edited by tripmix; 03-05-2010 at 08:06 AM.
 
Old 03-13-2010, 01:13 PM   #5
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 103

Original Poster
Rep: Reputation: 16
Trying a different way of building now.
apt-get source linux-2.6
apt-get build-dep linux-2.6
cd linux-2.6-2.6.32
rm debian/patches/series/3-extra
cp ../my.custom.config debian/config/config
bash debian/bin/test-patches -f 686 -s none -j 4 ../fbcondecor-0.9.6-2.6.33-rc7.patch

this builds 2 debs linux-image-2.6.32-3-686_2.6.32-9a~test_i386.deb and linux-headers-2.6.32-3-686_2.6.32-9a~test_i386.deb, however when trying to install the headers deb it complains it depends on linux-headers-2.6.32-3-common. So anyone know how I can build this package? Can't find any docs on this anywhere.
 
Old 03-13-2010, 04:15 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Code:
make-kpkg clean
make-kpkg --initrd --revision=redplague.2 kernel_image kernel_headers module_image
cd ..
dpkg -i linux-*.deb
mkinitramfs -o /boot/initrd.img-2.6.33 2.6.33
update-grub2
You don't need a lot of this. Unless you're going to remove your kernel source tree after installing the kernel, you don't need "kernel_headers". And, in general you don't need "module_image". When you install the kernel with "dpkg -i" the modules will be put in /lib/modules where they belong without that option.

Here is my kernel make script. Omit the concurrency if you have a single CPU. Note the "fakeroot" package, which needs to be installed so that you don't have to compile as the root userid. Unless you have something borked badly, dpkg will automatically update initramfs and grub.
Code:
#!/bin/sh
export CONCURRENCY_LEVEL=4
make-kpkg clean
fakeroot make-kpkg --append_to_version -k8 --revision=0.1 --initrd kernel_image
After that, use "dpkg -i" to install the kernel.

A couple of other comments. I would use the following command to copy your config. Note that those are backquotes. Cut and paste is probably a good idea if you don't know what a backquote is.
Code:
cp /boot/config-`uname -r`     .config
Also, it's best to run "make oldconfig" before running "make menuconfig" or "make xconfig". New versions of the kernel often come with new options, and "make oldconfig" is probably the easiest way to get those options into your .config. You will have to answer a number of questions. Sometimes it's just easier to hold the enter key down and accept all the defaults and then go back with "make xconfig" and tweak it up the way you want it.
 
Old 03-14-2010, 09:38 AM   #7
tripmix
Member
 
Registered: Nov 2004
Location: Norway
Distribution: Debian mostly
Posts: 103

Original Poster
Rep: Reputation: 16
Building the headers because I thought it would help, nvidia installer won't accept my source. Need module image for lirc and aes. And what do you mean broken badly? That's exactly what happens, dpkg does not make a initrd image hence the mkinitramfs -o /boot/initrd.img-2.6.33 2.6.33 and update-grub2. Otherwise I end up with a kernel panic. The new way I tried makes a proper deb that runs the make initrd and update grub stuff though. Can't say I really see the point with the uname -r trick either, pressing tab is just much faster cuz I don't know what `backquotes` are.

Edit: oh, and I found this http://www.mail-archive.com/debian-k.../msg40630.html that says I need to build binary-arch_i386 to get the headers-common package, whatever that means...

Last edited by tripmix; 03-14-2010 at 09:44 AM.
 
Old 03-14-2010, 01:23 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
I can't think of anything else to help. You seem to have issues that just don't make any sense unless perhaps it's because you're on squeeze and they've just walked away from the standards on that release. And that doesn't make sense, either.

Quote:
Can't say I really see the point with the uname -r trick either, pressing tab is just much faster cuz I don't know what `backquotes` are.
If you have multiple kernels it's easier to use the backquote. That's the key right above the tab key. Incidentally, a pair of backquotes means literally "execute this and give me the result".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FC12 kernel source PAE, building proprietary nvidia wikopl Linux - Software 5 02-10-2010 10:11 PM
Building an initrd - how to find correct module name? Yalla-One Slackware 7 06-13-2009 03:28 PM
Building nvidia-kernel-source error log jonasan Linux - Software 1 05-28-2006 09:52 PM
nvidia *.run cannot find kernel source ceg4048 Fedora 5 09-20-2005 02:39 AM
Nvidia Driver can't find kernel source Forezt Fedora 9 04-20-2004 07:35 PM


All times are GMT -5. The time now is 05:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration