LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-20-2003, 10:45 PM   #1
purpleburple
Member
 
Registered: Jun 2002
Location: USA
Distribution: Slackware8.1
Posts: 332

Rep: Reputation: 30
few more questions about kernel compilation ...


Hello. I am attempting to compile a 2.4.20 kernel. I have a question about a few prerequisite things I should be doing. Here's my current state. I have the 2.4.18 kernel running that came with 8.1. I messed up something attempting to compile the new 2.4.20 kernel so I decided to start from scratch again with it. I 'rm -rf' the /lib/modules/2.4.20 directory then i rm -rf the untarred 2.4.20 kernel source directory that happens to reside in my home directory. So i untarred the 2.4.20 sources again and now have a fresh new source tree (directory) in my home directory of which I intend to do the new kernel compilation. Questions are >

Why do manuals say to do the 'ln -s linux-2.4.xx linux' command as I have'nt seemed to have to do it and some people don't include it in their instructions on kernel compiling?

One text explaining kernel compostion says the first time compiling new kernel do a 'make mrproper'. Is this required?


thanks you
 
Old 03-21-2003, 01:30 AM   #2
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
ln -s linux-2.4.xx linux
are expected to executed
in /usr/src
because other programs looks at /usr/src/linux
when needed
 
Old 03-21-2003, 02:20 AM   #3
sidey
Member
 
Registered: Mar 2003
Location: Essex UK
Distribution: rh 8.0 bsd 5.0 slack 9.0 rc2 crux
Posts: 147

Rep: Reputation: 15
make mrproper is not needed on the first compiliation, especially if you've rm'd everything, make mrproper just like "cleans" out all the object files from your last compliation,

the process you will most probably be doing is

make dep
make modules
make modules_install
make install

then should you decide to add a new piece of hardware and need kernel support then you would do

make mrproper

followed by the above sequence

but yes i'd also make sure all your sources are in /usr/src/linux
 
Old 03-21-2003, 02:26 AM   #4
purpleburple
Member
 
Registered: Jun 2002
Location: USA
Distribution: Slackware8.1
Posts: 332

Original Poster
Rep: Reputation: 30
in the README that comes with the sources it says not to put
the source in /usr/src/linux
 
Old 03-21-2003, 02:42 AM   #5
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Rather than a make install as the last step (ive never used it but im presuming that it installs the new image as /boot/vmlinuz) you might want to copy the neccessary files to /boot and make the initrd.img by hand. This way you can preserve the old kernel image and have a way back out.

So I would recommend as the last few steps:

cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20
cp /usr/src/System.map /boot/System.map-2.4.20
mkinitrd /boot/initrd-2.4.20.img 2.4.20

Next edit lilo.conf to add the new entry:

image=/boot/vmlinuz-2.4.20
label=2420
root=/dev/hde7
initrd=/boot/initrd-2.4.20.img
append="devfs=mount hdc=ide-scsi"
read-only

Thats my entry for 2.4.20 so you may not want the append line.
Next step:

RUN LILO !!!!

In caps with exclaimation marks because I forget sometimes

/sbin/lilo

If you dont get any errors from lilo try to boot the new kernel.




/usr/src/linux on my desktop machine is usually just a link to whatever source tree im currently playing with ... currently 2.5.65 and its a nice fast desktop kernel
 
Old 03-21-2003, 03:16 AM   #6
sidey
Member
 
Registered: Mar 2003
Location: Essex UK
Distribution: rh 8.0 bsd 5.0 slack 9.0 rc2 crux
Posts: 147

Rep: Reputation: 15
yeah make install does install vmlinuz to /boot/vmlinuz, i just tend to stick current kernel in /boot/backup (which is symlinked to a diff partition) then add that to lilo as a back up

Make install runs lilo for so you dont forget
 
Old 03-21-2003, 04:05 AM   #7
purpleburple
Member
 
Registered: Jun 2002
Location: USA
Distribution: Slackware8.1
Posts: 332

Original Poster
Rep: Reputation: 30
thanks guys ..
I am a little confused as to when I have multiple images in /boot
such as 'vmlinuz.old' 'vmlinuz.2.4.20' do each read their own System.map ? And is it important that the name of System.map correspond to the name of the image? such as > vmlinuz.2.4.20, System.map-2-4-20? Also I am confused about the symlinks as I really have never used them.




thanks

Last edited by purpleburple; 03-21-2003 at 04:07 AM.
 
Old 03-21-2003, 04:11 AM   #8
sidey
Member
 
Registered: Mar 2003
Location: Essex UK
Distribution: rh 8.0 bsd 5.0 slack 9.0 rc2 crux
Posts: 147

Rep: Reputation: 15
Yeah System.map and vmlinuz must match.

though vmlinuz.old means thats the old kernel thats been replaced.

as long as lilo.conf matches System.map-2.4.20 and vmlinuz-2.4.20, it will boot fine , providing you config'd it right
 
Old 03-21-2003, 04:19 AM   #9
purpleburple
Member
 
Registered: Jun 2002
Location: USA
Distribution: Slackware8.1
Posts: 332

Original Poster
Rep: Reputation: 30
thanks
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel compilation : to remove a kernel which files should be deleted b0nd Linux - Newbie 2 08-17-2005 11:35 AM
Kernel compilation problems, distorted video and kernel panic shamrock_uk Linux - Laptop and Netbook 5 08-12-2005 10:53 PM
does kernel-source installs with the compilation cum installtion of a new kernel? luqman Linux - General 18 03-04-2005 07:33 AM
More kernel compilation questions weng Linux - Newbie 1 02-11-2004 05:39 AM
a few kernel compilation questions lord_clarence Red Hat 8 10-17-2003 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:38 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