LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-29-2004, 06:09 PM   #1
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Rep: Reputation: 30
General kernel question


I have the original Slack 10.0 2.4.26 kernel, and I am thinking of trying to compile it for my machine just to tweak it and learn about it. I have read about difficulties when going up to 2.6.x, so my question is this:
Would it make sense to get a kernel from kernel.org like 2.4.27 or 2.5.x and use that? Or should I just get the exact same kernel, 2.4.26, and compile that?

I'm mainly doing this to learn, and maybe get rid of some things that are being loaded/looked for that aren't needed.
 
Old 08-29-2004, 06:46 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
if you don't want to use 2.6, i would use 2.4.26. i could be wrong, but i think when it goes to odd numbers (2.3.x, 2.5.x) it's kind of a "beta" version, so it's better to stick with even numbered revisions, 2.2.x, 2.4.x, 2.6.x, etc. hth
 
Old 08-29-2004, 06:52 PM   #3
Alex_jacobson
Member
 
Registered: Jul 2003
Distribution: Slackware 10.1 on 2.4.29
Posts: 55

Rep: Reputation: 15
You're right, uneven versions like 2.1.x 2.3.x 2..x are development versions
 
Old 08-29-2004, 07:06 PM   #4
slyman
Member
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: FC3, Linux From Scratch, Knoppix
Posts: 99

Rep: Reputation: 15
Re: General kernel question

Quote:
Originally posted by linda
Would it make sense to get a kernel from kernel.org like 2.4.27
Yes, play with the latest 2.4 series kernel first. There won't be any messing around with header files etc.

Quote:
or 2.5.x and use that?
No. The way kernel version are done is that odd numbers are development/testing versions for even numbers. The 2.5 series of kernels were used for testing out what will be put into the 2.6 series etc

Quote:
Or should I just get the exact same kernel, 2.4.26, and compile that?
You could, but it is not a big step to go to 2.4.27, so you may as well upgrade while you are doing it.

The reason why evereyone says it is so hard to upgrade to 2.6.x (which it is not) for a lot of distributions is the glibc headers.

glibc is probably the most important part of 'linux' after the kernel (of course it depends on how you define what 'linux' is). Almost every binary on a linux system relies upon it.

You need to have some of the kernel headers that glibc was compiled against in /usr/include. The problem is that most distributions symlink these to the headers in the kernel source - which Linus says is a big no-no. This is not likely to cause any problems if the kernel is in the same series as the kernel that was used to build glibc, however, if it is of a different series it most likely will cause problems.

If you look at /usr/include/asm and /usr/include/linux, you will more than likely see that they are a symlink to /usr/src/linux/include/asm-i386 and /usr/src/linux/include/linux. If you want to compile a 2.6 kernel and you have these symlinks you must remove the symlinks and copy the header files to /usr/include:

Code:
# rm /usr/include/asm
# rm /usr/include/linux
# cp -R /usr/src/linux/include/asm-i368 /usr/include/asm
# cp -R /usr/src/linux/include/linux /usr/include/linux
(The above assumes you are on an intel or compatible machine i.e. not a mac or something.)

You should be able to compile a 2.6 kernel with no problems now - except that the configuration files are slightly different and 2.4 confg files don't get converted that well.

IMO, play around with compiling the 2.4 kernel and then upgrade....

It's all about learning...

EDIT: You also need to compile module-init-tools if you use a 2.6 kernel. It provides the means to load and unload modules etc.

Last edited by slyman; 08-29-2004 at 07:30 PM.
 
Old 08-29-2004, 07:54 PM   #5
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
Ok that's lots of useful info, thanks! I'm not going to do the 2.6 yet, not til I know a little more of what to expect.

One more question, all of the info i've read refers to Lilo, but I use Grub. I know how to play with Grub's config files, but is there anything special that might trip me up? What I am gathering is that I need a new entry to refer to the new kernel, and edit my entry for the kernel I'm using right now... Nothing else, right?
 
Old 08-30-2004, 09:33 PM   #6
slyman
Member
 
Registered: Jun 2004
Location: Sydney, Australia
Distribution: FC3, Linux From Scratch, Knoppix
Posts: 99

Rep: Reputation: 15
Pretty much.

Below is my, very simple, menu.lst from my grub directory.

Code:
default=0
timeout=5

title Sinix 1.0 hda5
kernel (hd0,4)/boot/bzImage root=/dev/hda5

title Windoze XP
root (hd0,0)
makeactive
chainloader +1

title Linux From Scratch (2.6.7) hda2
kernel (hd0,1)/boot/bzImage root=/dev/hda2
Sinix is my own Linux From Scratch based distribution which is on hda5 - it is also the default option
Win XP is on hda1
hda2 has the LFS used for testing before creating Sinix.

What you would probably do is have something like:

Code:
default=0
timeout=5

title Current Kernel on hda2
kernel (hd0,1)/boot/bzImage root=/dev/hda2

title New Kernel on hda2
kernel (hd0,1)/boot/bzImage-new root=/dev/hda2

title Windoze XP
root (hd0,0)
makeactive
chainloader +1
Your new kernel would be called bzImage-new and your old kernel would be just bzImage - of course you can call it what you like. Most people use bzImage-x.x.xx where the x's are the kernel version.

Hope this helps.
 
Old 08-31-2004, 09:22 PM   #7
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
Yes, that's what i was hoping, that it would be just something like that.

Wish me luck!
 
Old 09-01-2004, 06:53 PM   #8
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
I'm getting there...

Here is the last of my output: Looks a little ominous!
Root device is (3, 5)
Boot sector 512 bytes.
Setup is 4653 bytes.
System is 1346 kB
warning: kernel is too big for standalone boot from floppy
make[1]: Leaving directory `/usr/src/linux-2.4.27/arch/i386/boot'

Is that bad?
 
Old 09-02-2004, 07:19 AM   #9
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
It just means you won't be able to make a 1440k boot floppy. I think 'makebootdisk' will do it though, since it makes a 1680k floppy.
Sounds like you could go slimmer, though. Turn off or compile as module anything you don't need for booting or mounting root.
2.4.27 mainly is the release of SATA support.
BTW 2.4.27 and other such-named kernels are not experimental. It's the SECOND digit that indicates development, like 2.5, and hopefully soon 2.7!
I'm waiting for 2.6 to get to 2.6.20 or so before I bother with that much.
 
Old 09-02-2004, 12:21 PM   #10
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I comment what slyman say about upgrading headers or glibc...

No need at all to do that in slackware, in fact it was one of the first distribution compatible with 2.6 kernel out of the box (slackware 9.1).
 
Old 09-02-2004, 01:12 PM   #11
WMD
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware, Debian
Posts: 484

Rep: Reputation: 30
Quote:
Originally posted by linda
I'm getting there...

Here is the last of my output: Looks a little ominous!
Root device is (3, 5)
Boot sector 512 bytes.
Setup is 4653 bytes.
System is 1346 kB
warning: kernel is too big for standalone boot from floppy
make[1]: Leaving directory `/usr/src/linux-2.4.27/arch/i386/boot'

Is that bad?
Not at all. That's an ok size. If you want it smaller, you can turn off math emulation and save 66k right there. But otherwise, you can continue normally with that.
 
  


Reply



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
general question about the difference in kernel 2.4.x and 2.6.x salviadud Slackware 1 04-19-2005 12:06 AM
A general question about kernel headers: failure_man Slackware 4 02-27-2005 11:37 AM
Kernel Compiling general question DeadlyMuffin Slackware 2 03-05-2004 11:23 PM
General Kernel Question init Linux - General 5 02-17-2004 05:52 PM
*N*X general ^M question 5amYan Linux - General 1 06-14-2002 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:51 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration