PDA

View Full Version : Which kernel source for Debian ???



DLloyd
2007-10-18, 13:49
Hello,

I'm attempting to build my own Kernel for my Debian SlimServer box. Using the latest kernel source from kernel.org (2.6.23.1) resulted in a non-working system.

Which kernel source should I be using ???

Any advice would be greatly appreciated. Thanks !

bhaagensen
2007-10-18, 14:57
Hi,


Hello,

I'm attempting to build my own Kernel for my Debian SlimServer box. Using the latest kernel source from kernel.org (2.6.23.1) resulted in a non-working system.

Which kernel source should I be using ???

Any advice would be greatly appreciated. Thanks !

The naughty answer is that all kernels in the 2.6 series are backwards compatible :) I think it would be easier to help if you provided some more info. E.g.

-What version of Debian are you running?
-What errors are you getting?
-What steps did you exactly take when you compiled the kernel?
-Why can you not use the distro kernel?
-Did you get any errors while compiling the kernel?
-What do you mean by "non-working"?
-Can you boot into single user mode? How far does the boot process get?
-Anything useful in /var/log/*

Perhaps patching the distro kernel could be an option? Maybe compiling a kernel module could suffice?

Apoligies if I'm stating the obvious, but although it can be done quick'n dirty with a bit of luck, compiling kernels can be a quite elaborate process, and contrary to many other parts of the system the kernel really really needs to work, so there is little room for errors. The distros often patch the kernels also, just take a look at something like '/usr/share/doc/linux-image*/changelog.gz'.

Anyway, give some info, and perhaps a solution can be found.

Bjørn

Robin Bowes
2007-10-18, 15:57
bhaagensen wrote:
> Hi,
>
> DLloyd;236164 Wrote:
>> Hello,
>>
>> I'm attempting to build my own Kernel for my Debian SlimServer box.
>> Using the latest kernel source from kernel.org (2.6.23.1) resulted in a
>> non-working system.

> The naughty answer is that all kernels in the 2.6 series are backwards
> compatible :)

A more pertinent answer would be "Why are you building a kernel" ?

See my other reply in this forum.

R.

bhaagensen
2007-10-18, 17:04
A more pertinent answer would be "Why are you building a kernel" ?

See my other reply in this forum.

R.

Yes exactly, "-why can you not use the distro-kernel" :)

Robin Bowes
2007-10-19, 00:06
bhaagensen wrote:
> Robin Bowes;236205 Wrote:
>> A more pertinent answer would be "Why are you building a kernel" ?
>>
>> See my other reply in this forum.
>>
>
> Yes exactly, "-why can you not use the distro-kernel" :)
>

Can you tell I stopped reading your post halfway through? :)

R.

servies
2007-10-19, 00:25
There are a few reasons why you would want to build your own kernel:

1) Optimize it specifically for your CPU.
2) Trim it down to only fit your hardware (less modules cq hardware support)
3) You have written some modules of your own.
4) You want to live on the bleeding edge or help testing new features...

I have always build my own kernel for reasons 1 and 2. On my server I don't need usb, audio, serial & parallel port, floppydrive, (FAT(32) filesystem) support, so I didn't build the modules for those parts, this saves some kernel memory, the hardware is still there but unused...
My kernel is specifically optimized for a Pentium III Coppermine) and therefore only runs on a Pentium III and above. (Makes the kernel possibly a bit smaller and faster just for my CPU type.

I don't know the changes the Debian team has made to the plain vanilla kernel, but you have to be sure you pick the right options during configuration, otherwise it possibly won't work at all...
Maybe you should start with a 'make allmodconfig' and after that change some items in 'make menuconfig' you're really sure about. That should be the safest way to build your own kernel...
For the rest: see the post of bhaagensen

Robin Bowes
2007-10-19, 02:10
servies wrote:
> There are a few reasons why you would want to build your own kernel:
>
> 1) Optimize it specifically for your CPU.
> 2) Trim it down to only fit your hardware (less modules cq hardware
> support)
> 3) You have written some modules of your own.
> 4) You want to live on the bleeding edge or help testing new
> features...

servies,

I understand the reasons why it might be desirable to build one's own
kernel. Been there, done that, got the t-shirt.

However, the OP is new to linux and his primary objective is to have a
platform on which to run slimserver (unless I've missed something).
Building a kernel is something that, for most people, is just not
necessary these days. Life's just too short.

R.

servies
2007-10-19, 03:03
servies,

I understand the reasons why it might be desirable to build one's own kernel. Been there, done that, got the t-shirt.

However, the OP is new to linux and his primary objective is to have a platform on which to run slimserver (unless I've missed something).
Building a kernel is something that, for most people, is just not
necessary these days. Life's just too short.

R.
He's new to building a kernel, but I nowhere see that he's new to Linux. But there probably is a huge correlation between these two...
And if he wants to compile a 'personalized' kernel why should I try to convince him not to?

slimpy
2007-10-19, 03:42
He is new to linux, see this thread http://forums.slimdevices.com/showthread.php?t=38519

My only experience (so far) with Linux is that I can spell it
I've been running linux for a couple of years now but only once had the urge to build my own kernel. I even managed to compile a working kernel, but the performance was only marginally better so I went back to the stock kernel of my distribution. It is so much easier to use your distro's update mechanism when new kernel patches are applied vs. keeping track of kernel patches, getting the source and recompiling.

-s.

DLloyd
2007-10-19, 17:17
Well, I'm holding off (at least for now) on building a new kernel.

Yesterday I configured the NIC, installed/configured Samba, and copied all of my WAVE and CUE files over.

This morning I installed/configured SlimServer, and then ran BastilleInteractive to harden the box.

The only gotchas I ran into were that you can't specify MTU size in /etc/network/interfaces when using DHCP. (I added 'pre-up /sbin/ifconfig $IFACE mtu 9014' instead, which worked fine). Also, initially I did not add 'deb http://debian.slimdevices.com stable main' to the /etc/apt/sources.list, even though it *CLEARLY* tells you to do so at the top of the DebianPackage page on this site..... :-)

So, I now have a working Linux SlimServer - thanks for all the help !

Everything seems to check out fine. The Slimserver Version info is:

SlimServer Version: 6.5.4 - 12568 - Debian - EN - iso-8859-1
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
MySQL Version: 5.0.32-Debian_7etch1

I ran xfs_fsr against the volume where the rips are located, and it took seconds, so presumably no fragmantation. (I loathe having my precious WAVE files fragmented !!!).

Well, I must say IMHO Debian is great ! I love apt, and (shock, horror) there are file systems other than NTFS !

I also think that the music sounds better on Linux, or maybe it was the cryogenically treated SATA cables I used ;-)

servies
2007-10-21, 05:39
He is new to linux, see this thread http://forums.slimdevices.com/showthread.php?t=38519

I've been running linux for a couple of years now but only once had the urge to build my own kernel. I even managed to compile a working kernel, but the performance was only marginally better so I went back to the stock kernel of my distribution. It is so much easier to use your distro's update mechanism when new kernel patches are applied vs. keeping track of kernel patches, getting the source and recompiling.

-s.
Well, you can't expect me to read every single thread on this forum to get to know another user's experience...
For the rest I can only agree with you. The kernels of the distributions always work and I certainly wouldn't recommend compiling your own kernel to a Linux novice...
I've been running Linux for about 13 years now. In the beginning there was no other way to get new kernels... you had to build them yourself, and I never changed my behaviour, not even when I switched from a really ancient Slackware to Red Hat/Fedora...

tingtong5
2007-10-21, 06:49
Hello,

I'm attempting to build my own Kernel for my Debian SlimServer box. Using the latest kernel source from kernel.org (2.6.23.1) resulted in a non-working system.

Which kernel source should I be using ???

Any advice would be greatly appreciated. Thanks !
I am actually running a self compiled kernel of this version :P

What is the exact problem here?

DLloyd
2007-10-21, 19:47
Well, I have the SlimServer setup the way I want it, and all is working well. So I'd like to a) build my own kernel, and then b) install the latest e1000 driver from Intel.

My goal ? To have a kernel customized specifically for the box, and hopefully eek out more performance and speed up the boot time. (I see the box as an 'appliance'. In other word, it will sit in the corner running SlimServer and not be messed with too often).

So disabling Kernel Hacking and support for hardware I will never use, and building the file systems statically seem like good things to do, along with setting the Timer Frequency to 1000Hz (but hey, I'm new to Linux so all suggestions welcomed !).

The instructions I followed on my previous attempts are:

http://www.howtoforge.com/kernel_compilation_debian_etch

The kernel source itself was the latest from Kernel.com, but I have no burning desire to use the latest and greatest source from here. The most recent Debian kernel source would be fine, and that's the way I'm tempted to go this time around.

pfarrell
2007-10-21, 19:55
DLloyd wrote:
> My goal ? To have a kernel customized specifically for the box, and
> hopefully eek out more performance and speed up the boot time. (I see
> the box as an 'appliance'. In other word, it will sit in the corner
> running SlimServer and not be messed with too often).

I'm not sure I'm understanding you. I use my debian box exactly as an
appliance. I never touch it. But I use the standard distro, kernel on up.

Unless your box is seriously under powered, why bother?

Of course, as an educational experiment, go for it.

servies
2007-10-22, 00:04
Well, I have the SlimServer setup the way I want it, and all is working well. So I'd like to a) build my own kernel, and then b) install the latest e1000 driver from Intel.

My goal ? To have a kernel customized specifically for the box, and hopefully eek out more performance and speed up the boot time. (I see the box as an 'appliance'. In other word, it will sit in the corner running SlimServer and not be messed with too often).

Don't expect to much of that 'performance boost'. Probably you wouldn't even notice it untill you do some performance tests.. Improved boottime you'll never notice, because there's a lot more being done during booting than loading the kernel...


So disabling Kernel Hacking and support for hardware I will never use, and building the file systems statically seem like good things to do, along with setting the Timer Frequency to 1000Hz (but hey, I'm new to Linux so all suggestions welcomed !).

I'm not sure why you would set the timer frequency to 1 kHz if you're not using it as a desktop...

reverber
2007-10-22, 09:14
What was the error you were getting when trying to boot?
Were you building a modular kernel?
IIRC, you cannot compile some things, like the filesystem type your root partition is on or the device support for your root partition (i.e., IDE) as modules, or the system won't boot.

Cody

tingtong5
2007-10-24, 06:57
Since the default kernel is already completely modularized (most drivers compiled as modules) you won't gain anything in compiling a new kernel.

edit: of course with the exeception of some drivers needed at boot time

servies
2007-10-24, 07:51
Since the default kernel is already completely modularized (most drivers compiled as modules) you won't gain anything in compiling a new kernel.
Probably, to be able to boot on every system, SCSI and IDE are both not modular.
Furthermore, everything you disable also can't give any problems.
For an instance: on my server I did not build any modules for soundcards, serial ports, parallel ports and usb devices. The hardware is there but I don't want to enable or use it, same counts for floppydrive.
The question if the gains considering speed or efficiency are noticeable still remains. I've never tested it...

ehjones
2007-10-28, 02:35
For me, a benefit of sticking with the standard distro kernels is that the security updates are easy. I use my slimserver as an 'appliance' too, but it's networked and is connected to the internet (albeit behind NAT) so regular updates are crucial.

Anyway, isn't it possible to use the kernel source from debian and configure that to your own needs, rather than having to download the source from kernel.org?

servies
2007-10-28, 05:35
For me, a benefit of sticking with the standard distro kernels is that the security updates are easy. I use my slimserver as an 'appliance' too, but it's networked and is connected to the internet (albeit behind NAT) so regular updates are crucial.

Anyway, isn't it possible to use the kernel source from debian and configure that to your own needs, rather than having to download the source from kernel.org?
Regarding point 1: I don't know how it's with Debian but with Fedora I have to reboot myself to start using the new kernel. IMHO this is the correct way to handle new kernel installs. I don't know the relative speed of debian kernel updates compared to ftp.kernel.org but I suspect ftp.kernel.org to be faster. But generally speaking I don't think it makes a big difference.

Regarding point 2: If the source is on your system, you should be able to build a 'personalized' kernel.