LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-31-2003, 01:55 AM   #1
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Rep: Reputation: 15
: Kernel compiling guide for newbies Question


DaOne i have a question regarding "Kernel compiling guide for newbies howto"

First thanxs for the howto, it really works ! right now i have two kernel 2.4.20 (old) 2.4.21 (new) the new one i did with your howto.. now i want to experiment again with the 2.4.21 to be more clear i want to compile again. What happen if i do this with my /boot/vmlinuz + /boot/vmlinuz.old if i compile again, cause i want the old one not to be overwrites. I only want to compile the new one. Do i have to skip the make install & just copy this by hand to the directory ? what i don't want is the old vmlinuz to become vmlinuz.old because that's my 2.4.20 kernel.

thanks

sorry for the grammar....
 
Old 07-31-2003, 02:56 AM   #2
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
the .old will never be overwritten. you can manually copy
your new kernel to .old, (cp /boot/vlinuz /boot/vmlinuz.old)
to have that as your backup one, or just keep your 2.4.20 file
and compile a new kernel which will overwrite /boot/vmlinuz
but will leave vmlinuz.old alone so that you can always fall
back the .old one should your test-kernel fail.

Last edited by neenee; 07-31-2003 at 02:59 AM.
 
Old 07-31-2003, 04:30 AM   #3
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by neenee
the .old will never be overwritten. you can manually copy
your new kernel to .old, (cp /boot/vlinuz /boot/vmlinuz.old)
to have that as your backup one, or just keep your 2.4.20 file
and compile a new kernel which will overwrite /boot/vmlinuz
but will leave vmlinuz.old alone so that you can always fall
back the .old one should your test-kernel fail.

Ok that means if i use make install the /boot/vmlinuz.old will be untouch ? only the /boot/vmlinuz will be update ? with the new kernel..
 
Old 07-31-2003, 07:41 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
the .old will never be overwritten

Are you sure about that neenee? I think that if you use make install, the current kernel is ALWAYS renamed to .old. I learned this the hard way when I blew two compiles in a row and no longer had a working kernel. Personally, I've got a good kernel and System.map set aside with extensions other than .old (and with appropriate lilo entries) so that I never have to deal with that problem again.
 
Old 08-01-2003, 03:54 AM   #5
Anibal
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Slack/Ubuntu & OpenBSD (not a linux distro)
Posts: 56

Original Poster
Rep: Reputation: 15
Please more info about this..
 
Old 08-01-2003, 06:55 AM   #6
reclusivemonkey
Member
 
Registered: May 2003
Location: Halifax, WY, UK
Distribution: Slackware 9
Posts: 167

Rep: Reputation: 30
Very rough and ready kernel compile guide

1. Download your kernel source.

2. Unpack your kernel source in /usr/src. This will create a drawer with the kernel version number (i.e. linux-2.4.21).

3. Remove the link 'linux' in /usr/src with rm -i /usr/src/linux

4. Link your latest kernel source to 'linux' by typing 'ln -s /usr/src/linux-2.4.21 /usr/src/linux

5. Back up your modules if you are recompiling the same kernel version. cp /lib/modules/2.4.21 /lib/modules/2.4.21.old

6. make menuconfig and tweak away!

7. To time and compile your kernel (you do want to see how much faster it compiles when you've tweaked it don't you? ;-) use:

date >> kernel.timer; make dep; make clean; make bzImage; make modules; make modules_install; date >> kernel.timer

8. The new kernel (in /usr/src/linux/arch/i386/boot/bzImage) can then be copied to /boot with any name; try something like bzImage-new, just make sure you refer to that in your /etc/lilo.

9. Copy /usr/src/linux/System.map to /boot, again with a different name (i.e. System.map-new), then delete the link System.map (rm -i /boot/System.map) and link to the new one (ln -s /boot/System.map /boot/System.map-new).

10. Edit /etc/lilo.conf, run lilo, reboot and choose your new kernel for testing!

By using symbolic links, you can have a large number of System.map[version] files, just link to the one you want with a symbolic link. Same with the bzImage, once that is made in /usr/src/linux/arch/i386/boot, you can copy it to /boot with any name, and just refer to that in /etc/lilo.conf. The kernel source is totally seperate from /boot and /lib/modules; your system is running from these places, /usr/src/linux is just the area in which you compile your kernel. Hope I havn't confused you further!

OH BTW, my point about timing the kernel, in /usr/src/linux there will be a file called kernel.timer. Use 'cat kernel.timer' to get the time your kernel started compiling and finished compiling. If you do the eaxct same compile again after you load your new kernel, you can see how much faster the process is. Of course you don't need to copy the files again once you have recompiled. Just be satisfied on having speeded you machine up! A very rough and ready benchmark, but it works for me!

Good luck,

munkeh
 
Old 08-01-2003, 07:06 AM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Anibal,

Have a read through this thread. It describes my trouble with compiling a kernel and why I think if you use make install, any kernel with .old is overwritten.

And unless you have extremely limited disk space, maybe having a kernel named .somethingbesidesold isn't a bad idea. Just in case you know.
 
  


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
Newbie Guide To Compiling A Kernel! DrOzz Linux - General 318 08-20-2008 05:21 AM
I'm interested in compiling a 2.6.x kernel, is this is a decent guide? Erik_the_Red Linux - Newbie 7 08-14-2005 06:03 AM
Kernel compiling guide for newbies... DaOne Slackware 127 04-17-2005 04:20 AM
Acid Guide to compiling Kernel 2.6.10 on Slack 10.1 acidjuice Slackware 54 03-11-2005 05:16 PM
Hardware identification guide for newbies ?? massai Linux - Hardware 5 02-03-2004 08:15 AM

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

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