LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2003, 02:58 AM   #1
nmoog
Member
 
Registered: Sep 2003
Location: Sydney
Distribution: Debian
Posts: 70

Rep: Reputation: 15
Important files after compiling the kernel


Hello, I was hoping someone could help with a couple of questions about compiling the kernel. I am following mainly two documents, the "The Linux Kernel HOWTO" and the "Low-Latency 2.4.x with ALSA HOWTO" as well as the documentation with the source. Basically the steps I am doing are:

make clean, make mrproper, make clean, make oldconfig,
make xconfig, make dep, make, make bzImage, make modules, make modules_install

Thats all good and I mostly understand whats going on. But next:
From the Kernel HOWTO:
Code:
    After bzImage is successful, copy the kernel image to /boot directory 
    otherwise the new kernel MAY NOT  boot. You must also copy the config file 
    to /boot area to reflect the kernel image:
    cp /usr/src/linux/arch/i386/boot/bzImage	/boot/bzImage.myker.26mar2001
    cp /usr/src/linux/.config	/boot/config-<your_kernelversion_date>
BUT! From the Low Latency HOWTO:
Code:
    rm -f /boot/System.map
    cp System.map /boot/System.map
    rm -f /boot/bzImage
    cp arch/i386/boot/bzImage /boot/bzImage-2.4.x
Which one is right? One overwrites the System.map file with a new file, and the other adds a new .config file to /boot. What do these steps achieve? Is one "more correct"? What should the bzImage file be called?

Then it says: "Your old kernel is still INTACT and SAFE at say /boot/vmlinuz-2.0.34-0.6"
The old kernel is called vmlinuz? not bzImage? I thought bzImage was the kernel.

I guess to summarise these questions : What are the important files that come out of compiling the kernel, and where should they go?!!

I really want to learn about the linux kernel, so any help or tips would be really appreciated.

Earle
 
Old 10-18-2003, 03:29 AM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Actually do both, copy /usr/src/linux/System.map to
/boot/System.map-<kernel version>
then make a symlink /boot/System.map pointing to it
copy /usr/src/linux/.config to
/boot/config-<kernel version>
then make a symlink /boot/config pointing to it
this way you still keep your old ones in case something goes wrong

the filename of the kernel bzImage doesnt really matter, you can use whatever name you want as long as you configure your bootloader to correctly load it, by convention its /boot/vmlinuz-<kernel version>

Last edited by Demonbane; 10-18-2003 at 03:30 AM.
 
Old 10-18-2003, 04:08 AM   #3
nmoog
Member
 
Registered: Sep 2003
Location: Sydney
Distribution: Debian
Posts: 70

Original Poster
Rep: Reputation: 15
Great! Thanks a lot for that. (I should have just shouted the question out the window though - Im also from Sydney)

How should I go about getting more information about how the kernel works? All of the documentation focuses on HOW to do things, but not WHY you do it. Which kind of makes it harder to understand how the whole system is working.

Any favourite resources?
 
Old 10-18-2003, 04:24 AM   #4
dos1
Member
 
Registered: May 2003
Location: Auckland, New Zealand
Posts: 49

Rep: Reputation: 15
Have you read the excellent (well, I found it excellent...maybe its Slackware specific) guide to kernel compilation in the Slackware forum HERE

EDIT:

GO THE ALL BLACKS!!!!
 
Old 10-18-2003, 04:26 AM   #5
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Nice to see fellow Aussies in here :-)
Well it depends on what kind of information you're looking for, but I suppose either way a good place to start is /usr/src/linux/Documentation/kernel-docs.txt which is included in your kernel source, it has a list of available online documentations on the subject.
 
Old 10-19-2003, 05:56 AM   #6
nmoog
Member
 
Registered: Sep 2003
Location: Sydney
Distribution: Debian
Posts: 70

Original Poster
Rep: Reputation: 15
Yeah, I have started to look at those docs - Its going to take a bit of reading!

I have another couple of questions I'll throw at you though:

The "The Linux Kernel HOWTO" and the "Low-Latency 2.4.x with ALSA HOWTO" both work in the /usr/src/linux/ directory, but the README.txt file in the source directory says "DO NOT USE THE /usr/src/linux AREA!". Which one is correct, and why?!

Also, when re-compiling the kernel I need to re-install the NVIDIA drivers - If I have two kernels, then only one of them seems to be able to use the drivers. Is this normal?

Thanks,

Earle
 
Old 10-19-2003, 07:50 AM   #7
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Basically I think it's just trying to say that don't work with your new kernel in /usr/src/linux directory, because the headers in /usr/src/linux directory has to match the current running kernel in order for some library headers to function properly. Therefore what you do is that you compile your new kernel, install it, reboot and give it a try, if it works then make a symlink /usr/src/linux pointing to where your actual sources are.
Yes it is normal, apparently the nvidia driver can only work with one kernel at a time, but maybe its possible to use it with multiple kernel(ie compile it with new source everytime), not exactly sure about it though.
 
  


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
most important gonfig files? Trio3b Linux - Newbie 3 09-29-2005 10:24 PM
Samba isn't working, need important files kidicarus Linux - Networking 7 06-16-2004 05:39 AM
Most important cfg files krajzega Slackware 3 02-03-2004 09:38 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM
Important Linux Files. JafferAB Linux - Newbie 3 09-24-2002 06:45 AM


All times are GMT -5. The time now is 06:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration