LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 12-30-2006, 06:16 AM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Rep: Reputation: 36
kernel 2.6.18 hotplug/udev?


I'm trying to compile a 2.6.18 kernel from what was originally a sarge distribution. I have a really slow modem, so dist-upgrade won't work. I downloaded the linux-image-2.6.18-3-486 package from the debian site, and am now attempting to upgrade to testing enough packages so that I can compile the kernel.

Just to install the kernel sources you need some things that seem to have problems with other packages. For initramfs-tools (which I think you need to build the initrd) you need new versions of udev, which needs libc6 (and some other things) and conflicts with hotplug. Testing has a new version of hotplug, but even after installing it, udev seems to have a conflict with it.

Is there a way around the hotplug/udev problem? Is the whole thing a bad idea?

Last edited by radiodee1; 12-30-2006 at 06:18 AM.
 
Old 12-30-2006, 09:44 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
When you are using a distribution that has a lot of development work put into it then you should use the software management tools of that distro in order to manage the software on the system. Although you didn't say this I suspect that you downloaded a vanilla kernel from a mirror of kernel.org. I believe that when you do this you are ignoring the fact that the distro developers have made a lot of value added changes to the system. You cannot reasonably expect a plain vanilla kernel to install easily. As you noted, there are numerous dependencies. The Debian developers will have worked out all of those problems and will have created solutions to those problems when they create software packages for their specific distribution.

I just looked at the Debian package list. It appears that the Sarge version of Debian uses the 2.6.8 kernel. There may have been many changes in kernel features and requirements between that version and the 2.6.18 version. Even if you get the kernel to install you don't know what incompatibilities will lie undiscovered, potentially creating a hidden security vulnerability.

The Debian web site indicates that the 2.6.18 kernel is available via the APT package tools in the testing version of Debian. You should try to install the 2.6.18 version of the kernel using this method. Edit your /etc/apt.sources.list file to include the Debian testing repository. Ensure that you include all three subrepositories; main, contrib, and non-free. Then perform an apt-cache update. Then perform an apt-cache search kernel to see what the exact name of the Debian testing kernel is called. Then perform an apt-get install kernel<whatever-it-is-called>. I think you would do apt-get install kernel-image-2.6-686 for an Intel CPU based machine.

In order to add an APT source for the testing version of Debian you go to this page:

http://www.debian.org/mirror/list-full

Find your country in the list at the bottom of the page and click on it. Find an appropriate mirror. Go to that mirror to ensure that you know the directory structure that you need to use for the sources.list file. Then add that to the /etc/apt/sources.list file. Then perform the apt-cache update. Then perform the apt-cache search. Then perform the apt-get install kernel-image-2.6-686 or whatever kernel that you need.

For example if you wanted to use the debian.org web site for your APT repository then you would add this line to the /etc/apt/sources.list file.
Code:
deb http://ftp.us.debian.org/debian/dists/testing main contrib non-free
I'm pretty sure that the above line is correct. I don't have a running Debian system in front of me right now to check.

I believe that you will have a much more enjoyable experience if you use the software package management tools included in any distro. The distro developers put a lot of work into creating software packages in order to prevent exactly the kinds of problems that you have been having.

Good luck.

Last edited by stress_junkie; 12-30-2006 at 09:47 AM.
 
Old 12-30-2006, 10:05 AM   #3
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Original Poster
Rep: Reputation: 36
Thank you. I will try to do it the debian way. The package is called "linux-source-2.6.18" I think, and it's in testing, like you said. I think I was trying to install the wrong file. Something called "linux-image" wouldn't work. Also... Do I need a line like:

Code:
deb-src http://http.us.debian.org/debian/ testing main contrib non-free
Maybe the best way for me is to download the deb file from the internet site.

Last edited by radiodee1; 12-30-2006 at 10:07 AM.
 
Old 12-30-2006, 11:08 AM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
I'm not sure about deb-src. I've never seen that in a sources.list file but that may just be my ignorance showing. I mean, I know that it is a valid parameter but I've never seen it enabled in an active sources.list file. (There's always more to learn.)

I expect that you will, as you say, want the kernel sources and the kernel headers and any other kernel related packages that are available. On the other hand the APT software resolves those dependencies automatically. You may be able to just do an apt-get install kernel-2.6.18 and have all of the other tasks automatically done for you. That's one of the really nice things about the APT software management tools.

Last edited by stress_junkie; 12-30-2006 at 11:15 AM.
 
Old 12-30-2006, 05:22 PM   #5
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Original Poster
Rep: Reputation: 36
well I gave it a first try. I downloaded the sources, ran menuconfig and "make-kpkg". It ran for about 40 minutes and then I got this:

Quote:
...
make[1]: Leaving directory `/usr/src/linux-source-2.6.18'
COLUMNS=150 dpkg -l 'gcc*' perl dpkg 'libc6*' binutils ldso make dpkg-dev |\
awk '$1 ~ /[hi]i/ { printf("%s-%s\n", $2, $3) }' > debian/buildinfo
awk: relocation error: awk: symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
make: *** [stamp-build] Error 127
I've got some kind of problem with locales. Could this be from that? I've also got a hunch I had synaptic open during the process. Could that have done it? Finally I wonder weather it's a problem with initrd programs.

The last command I executed was this:

Code:
fakeroot make-kpkg --append_to_version -20061230 --initrd --revision=rev.01 kernel_image
I think that's right. Any help would be apreciated...
 
Old 12-30-2006, 06:09 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
No no no no no no no no no!!!

No!!!

Install the kernel binaries. Once you get it to boot the 2.6.18 kernel THEN you can recompile it.
 
Old 12-30-2006, 10:04 PM   #7
JackieBrown
Member
 
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
So install linux-image-2.6.18-3-686 (or something like that.) Than run a make oldconfig after booting into the kernel.
 
Old 12-31-2006, 07:43 AM   #8
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Original Poster
Rep: Reputation: 36
I'm reading this document, specifically part 7.1.1

http://www.debian.org/doc/manuals/re...kernel.en.html

I'm a noob. Explain to me why I need to install "linux-image-2.6.18" first. The document I'm looking at doesn't say that... Is it a debian only thing?

I did notice the thread starter at the top of the debian page on this forum that says to use a "linux-image" file. I suppose I should follow that..."Guide to 2.6 kernel upgrade/recompile". I'm still curious to know why.

Last edited by radiodee1; 12-31-2006 at 07:49 AM.
 
Old 12-31-2006, 08:11 AM   #9
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
You want to compile the 2.6.18 kernel while you are running the same version of the kernel. That way the running system has all of the same features and ways of doing things as the kernel that you are compiling. The kernel code for the current running system is the same as the kernel code for the kernel that you are building. Most importantly, the system libraries and the version of the gcc compiler for the running system are the same as is required by the kernel that you are compiling. That means that everything that the kernel compile process requires is in its default location. That is the principal reason for compiling the 2.6.18 kernel while you are running the 2.6.18 kernel.

Also your new kernel will require a system map and an initrd. If you compile your new kernel while running the same version that you are compiling then your boot process can use the same system map and initrd files that already exist in the correct location and that are known to work.

When I was younger I was also interested in the details behind the process. That slowed my progress learning any computer system. I strongly advise that you first learn the process by rote and then later learn the theory. I can appreciate your approach but I think that you would be well served to just get it done and figure out why it worked later.

That HOWTO manual at debian.org is old. Unfortunately stale documentation can lead you down unproductive avenues. I am guessing that the Debian web administrator doesn't consider that particular procedure to be out of date because it descrbes how to upgrade to the current default kernel in the stable Debian release. That is kernel 2.4. However it may or may not accurately describe performing an upgrade to the v2.6 kernel in Debian. The v2.6 Linux kernel is vastly different from the v2.4 kernel. Presumably most of those differences are good, which is the only reason that anyone would want to upgrade.

If I were doing what you want to do then I would use the Synaptic GUI front end to the APT tools and tell it to install the new kernel. You want the binaries, source, and headers at a minimum. The APT utilities should resolve any unselected dependencies and install the new prebuilt default binary kernel in a way that it will boot for you with no further action required by you. That is what I would do. Once that is working then you can recompile the kernel.

This page may be more helpful to you.
http://www.debian.org/releases/etch/i386/release-notes/
It contains instructions for upgrading to the testing release of Debian. Doing a full system upgrade may, in the end, be a good choice. Be aware that the release notes warn that the testing version of Debian does not enjoy the benefit of having security updates applied in a timely manner. This will be true of the kernel package as well as the entire version so if you install the 2.6.18 kernel on your Sarge distribution your kernel will still have to wait longer than may be desireable for security updates.

Last edited by stress_junkie; 12-31-2006 at 08:35 AM.
 
Old 12-31-2006, 02:29 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
"I'm reading this document, specifically part 7.1.1
http://www.debian.org/doc/manuals/re...kernel.en.html"

Keep reading it. It continues to work for me at 2.6.19.1. However, like you, I kept having little things not be quite right with the system after installing later kernels from sarge/2.6.8. Most notably, hald didn't work anymore. I think I finally pointed sources.list to testing and did an update/upgrade (not a dist-upgrade) and those niggling little things were all magically fixed. Like someone else mentioned, the support programs have to be kept up-to-date as the kernel moves forward with changes. If you're going to play with kernel versions (and it's loads of fun) be sure your data is backed up as well as preferably on a separate disk from your OS.

As a side note, I've tried 2.6.20.(rc1 and rc2) with poor success. They work, but they've changed something in the workqueueing interface and it breaks the versions of madwifi that I downloaded. I'm sure that much more has been changed that I didn't run into.
 
Old 01-01-2007, 08:25 PM   #11
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
FYI, I tried to install Debian Etch (testing) today. I used both the so called network installation ISO disk and the normal ISO installation disk. Both failed. Both had the same problem. The installer complained that several dozen of the packages were corrupt. I don't know if this will be fixed in the near future. It may just affect the snapshot that I downloaded. Anyway, a full install of Debian Etch wasn't as option for me.

Last edited by stress_junkie; 01-01-2007 at 08:27 PM.
 
Old 01-01-2007, 10:23 PM   #12
JackieBrown
Member
 
Registered: Dec 2004
Location: San Antonio, TX
Distribution: Debian-AMD64 Sid
Posts: 481

Rep: Reputation: 31
I installed the business card image. It grabs almost every file from the servers. It ensure an up-to-date sid from the get go.
 
Old 01-01-2007, 10:52 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Strange, that. I had to use the businesscard image, as well. I installed to my "main" machine this weekend, with no obvious problems.
 
Old 01-02-2007, 11:40 AM   #14
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by JackieBrown
I installed the business card image. It grabs almost every file from the servers. It ensure an up-to-date sid from the get go.
Yes the business card installation ISO is definitely the way to go. I just installed Debian Etch using this ISO boot installer with no errors. I've just started an installation on a second machine.

Of course the reason that I mentioned it in this thread is due to the advise that I and others gave to the original poster to install the Debian Etch kernel over the network from the Debian testing repository. This proves that the network installation should work.
 
Old 01-02-2007, 12:11 PM   #15
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Original Poster
Rep: Reputation: 36
Well, I've got dialup, so I'm going to try to get a hold of a set of etch disks... I think that's the only way to upgrade for me. I'm going to post a question on how to use jigdo, so, thank you for your great advice. Hopefully I'll get those disks and try out all this stuff. Thanks again.
 
  


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
Udev or hotplug on slack11 Old_Fogie Slackware 8 11-09-2006 10:06 AM
udev / usb / hotplug rigelan Slackware 4 07-28-2006 03:56 PM
udev, hotplug and kernel hussam Linux - General 2 02-18-2006 11:01 PM
udev+hotplug+2.6.6=questions shilo Slackware 4 05-31-2004 08:43 PM
[kernel 2.6.5] hotplug/udev and compact flash rapazp Linux - Laptop and Netbook 0 04-12-2004 03:03 PM


All times are GMT -5. The time now is 04:47 AM.

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