LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 03-08-2004, 08:47 PM   #1
Campy19
LQ Newbie
 
Registered: Nov 2003
Posts: 27

Rep: Reputation: Disabled
Kernel Compilation - Being Safe


Ok,

Could someone give me the run down on compiling a 2.6.3 kernel under Mandrake 9.2. I just want a basic list of the steps and what they mean....BUT I want to know how to compile the kernel and install it so that if it doesn't work, I can then boot using my old kernel. How do I name the Kernel to, or when do I??

Thanks,
Chris
 
Old 03-08-2004, 09:43 PM   #2
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
First, make a boot floppy and make sure it works. That is, actually boot from it.

go to kernel.org and get the source code. Decompress it in the directory /usr/src. this should create a directory /usr/src/linux-2.6.3. Change into that directory and then do:
1. make mrproper (cleans up things; not really necessary the first time but doesn't hurt)
2. make xconfig (starts up the configuration programs; do the configuring; a lot is trial and error)
3. make bzImage (compiles the kernel and creates a compressed image)
4. make modules (compiles the modules)
5. make modules_install (installs the modules)
6. make install (installs the kernel, sets up lilo)

This should be safe. If you want to be extra safe, backup your /boot partition before doing make install. And after you're done, take a look at both /boot and the file /etc/lilo.conf. In the /boot partiton, you should have the old files and new ones. Also, the entries in lilo.conf should contain one for the old kernel and one for the new one. If the entries point to symlinks in /boot, make sure the symlinks are all right and point to the right places - make install used to mess up the symlinks so that there was actually no entry for the old kernel left (I think this got fixed but do take a close look at lilo.conf). Run lilo again, and then reboot.

If you want to change the name of the kernel, edit the Makefile after you're done with the make xconfig. Very much at the top, you'll see extraversion= or sonmething like this where you can specify your own suffix. So if you specify it as custom1, the name of the kernel will be linux-2.6.3custom1. Comes in handy if you want to compare multiple versions.

If all is fine and you want to stick to it and use it permanently, create a symlink /usr/src/linux to /usr/src/linux-2.6.3 (if there already is a symlinks to an old source tree, change the target of the symlink). This is optional and mainly for compiling other things.
 
  


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
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
is this kernel .config safe for system? rgiggs Slackware 14 07-20-2004 01:20 PM
safe to run 'make bzlilo' for kernel upgrade? mikeylikesit! Linux - Software 9 10-13-2002 02:15 PM

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

All times are GMT -5. The time now is 06:21 PM.

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