LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   OK, time to build my first kernel but... (https://www.linuxquestions.org/questions/debian-26/ok-time-to-build-my-first-kernel-but-514453/)

aquaboot 12-28-2006 08:23 PM

OK, time to build my first kernel but...
 
Hello,

I'm gonna try my hand at building my first kernel. I'm running sarge with kernel ver.: 2.4.27-3-386

I'd like to build up to 2.6.19.1 (latest stable build on kernel.org)

I'm using the instructions in Carla Schroeder's Linux Cookbook from O'Reilly. I've downloaded from the kernel.org 2.6.19.1 link and get the following download:

patch-2.6.19.1.bz2

This is confusing me. Is this the kernel source or a set of patches? Forgive me if I'm not thinking about this correctly- I'm new.

Also, she advises me to use menuconfig but apt doesn't find it. Which repository can I find this in? My sources.list is appended to the end of this post.

Thanks in advance,

ab

#/etc/apt/sources.list

#deb file:///cdrom/ sarge main

deb http://mirrors.kernel.org/debian/ unstable main
deb-src http://mirrors.kernel.org/debian/ unstable main

#mplayer,acroread.various packages
# deb ftp://ftp.nerim.net/debian-marillat/ stable main
#deb ftp://ftp.nerim.net/debian-marillat/ testing main
deb ftp://ftp.nerim.net/debian-marillat/ unstable main

# Unstable
deb http://http.us.debian.org/debian/ unstable main contrib non-free

# Unstable Sources
deb-src http://http.us.debian.org/debian/ unstable main contrib non-free

deb http://linux.csua.berkeley.edu/debian/ testing main
deb-src http://linux.csua.berkeley.edu/debian/ testing main

deb http://mirrors.engr.arizona.edu/debian/ testing main

stress_junkie 12-28-2006 08:47 PM

Making your first kernel build is a big step. Changing from kernel 2.4.x to 2.6.x is a very big step. You would do well to practice by building a new copy of your current version. The steps here include making a backup of your current kernel image, initrd, system map, and other boot files. Then you put your new build into the boot directory. Then you edit your lilo.conf or your /boot/grub/menu.lst file to add a boot menu entry to boot your backup kernel or your newly built kernel. Since your new kernel is the same version as your old kernel then it will probably work as well as the original kernel image worked, unless you made a lot of changes to your kernel configuration using make menuconfig.

So, practice on a safe kernel build before you try to install the 2.6 kernel.

-----

Generic instructions from a book are not as accurate as using distro specific documentation. The Linux Cookbook may or may not have the correct instructions for your distro.

-----

If you want to upgrade the kernel you would be well advised to use the latest kernel from your distro specific repositories before you try to install a generic kernel from kernel.org.

-----

I just checked kenel.org. I can see what you mean about the patch file. If you just click on the link that says that it is the latest kernel source kit you will just get that patch file, as you noted. However, if you go to the top of the same page and click on the HTTP link it will take you to a kernel.org repository. There you will see the real kernel kits.

http://www.kernel.org/pub/linux/kernel/v2.6/

-----

menuconfig is a parameter to pass to the make utility; it is not a utility in and of itself. You invoke menconfig as follows:
Code:

cd /usr/src/linux<kernel.version>
make menuconfig

You can also use xconfig or gconfig instead of menuconfig. I prefer menuconfig but other people are loyal to xconfig. Naturally you have to be running X to successfully use the xconfig parameter to the make utility.

-----

I hope that I've been helpful. :)

Quakeboy02 12-28-2006 08:52 PM

Here is my suggestion on how to proceed by getting a new complete kernel.

Get your new kernel from here:
http://www.kernel.org/pub/linux/kern...6.19.1.tar.bz2

Create some directory for the file and move it there; perhaps into /usr/src which should already exist.
Go to that directory.
unzip it using: bunzip2 linux-2.6.19.1.tar.bz2
untar it using: tar xvf linux-2.6.19.1.tar

Go into the new directory with: cd linux-2.6.19.1

Open a browser and follow the instructions here in section 7.1.1:
http://www.debian.org/doc/manuals/re...kernel.en.html

aquaboot 12-28-2006 08:57 PM

Excellent. I am very grateful to both of you for your time, thoughtfulness and good advice. I'll start slowly (baby steps) as you suggest and rebuild the same kernel version. Have a good evening.

Cheers,

ab

aquaboot 12-29-2006 12:42 PM

One last thing... I'm going to work with the debian patched kernel instead of a vanilla kernel for now. How do I find the latest kernel in the debian repositories? Hmm... just looked at the apt-get man page for a way to list all available kernels but didn't find an option.

-ab

Quakeboy02 12-29-2006 02:13 PM

"How do I find the latest kernel in the debian repositories?"

You click on the link in my first post.

aquaboot 12-29-2006 02:55 PM

:twocents: :tisk: ;)

stress_junkie 12-29-2006 03:17 PM

I don't have a Debian box siting in front of me right now but I think this will do the trick.
Code:

apt-cache search kernel

Quakeboy02 12-29-2006 03:26 PM

"How do I find the latest kernel in the debian repositories?"

Ah, I missed the "Debian" repositories bit.:newbie:

aquaboot 12-29-2006 04:03 PM

:tisk:

Careful quakeboy. You're beginning to sound like Emerson in the thread, "Getting kernel source" (12/25). I believe you were finger-wagging him a bit for his condescending tone.

-ab

ps- thanks stress junkie for the post and helpful tip. :-)

Quakeboy02 12-29-2006 05:21 PM

Are you always like this? Is there an ignore button in this forum? You asked for help. You got suggestions. You then went on to criticise the people trying to help you.

aquaboot 12-29-2006 05:45 PM

Deep breath...
relax...
cool your boots, man.

Your help is sincerely appreciated and I really don't mind the newbie nudge. I just couldn't resist pointing out the irony in the situation. Especially after your little flame war with Emerson. Remember?
You were quite adamant about drawing attention to what you considered to be his condescending tone? :D

Now, on to more important issues.

-ab

Quakeboy02 12-29-2006 05:51 PM

"Your help is sincerely appreciated and I really don't mind the newbie nudge."

You got that as a reward for all your finger-wagging. I didn't notice that you had said "debian repositories".

aquaboot 12-29-2006 05:56 PM

Ah, I understand now. Sorry about the misunderstanding and the elbow in the ribs.

Have a good evening,

ab


All times are GMT -5. The time now is 05:36 AM.