SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have read the online docs at slackware.com for recompiling the kernel, and I have a question on the following 2 commands
make mrproper
make menuconfig
The docs say for "make mrproper" the following
Quote:
The first step is to bring the kernel source into its base state. We issue this command to do that (note, you may wish to back-up the .config file as this command will delete it without warning):
If I want to retain the current defaults (which I'm assuming will be the ones the distributed kernel was compiled with, correct me if I'm wrong) would I skip the "make mrproper" command begin with "make menuconfig"
What I'm trying to achieve is to recompile the kernel for my architecture and possibly change some configuration options, but I would want to start with the options the currently distributed kernel (13.37) was compiled with.
TIA,
Andrew
Last edited by unSpawn; 07-08-2012 at 05:57 AM.
Reason: //s|.org|.com|g
if you need a more detailed description of the necessary steps to follow for building a custom kernel, you can also have a look at the very detailed Alien BOB's kernel building wiki page.
command make mrproper restores your source code to its original or clean state
command make menuconfig will bring up the text based interface for you to configure you kernel
Which brings us to the question of how to preserve the running kernel as a fail safe? I've seen the answer in posts & tuts, maybe someone can explain the output process used to achieve this?
Which brings us to the question of how to preserve the running kernel as a fail safe? I've seen the answer in posts & tuts, maybe someone can explain the output process used to achieve this?
Simply do not overwrite your kernel, modules, initrd (if you use it) and your firmware. Also keep the option to boot from your old kernel in lilo.conf.
Start with /etc/lilo.conf, it includes references to your current set-up. This should show where is your kernel and initrd. Your modules should not be touched unless you are recompiling exactly the same kernel with the same LOCALVERSION. The firmware is tricky. I move it before I install the new one:
mv /lib/firmware /lib/firmware-2.6.36
then
make modules_install
You may need to proprietary firmware from your old firmware directory (for example for wireless LAN) at a later stage.
If it goes wrong, your system should still boot without the firmware, but it would lack some functionality until you restore it and reboot.
Last edited by ChrisAbela; 07-10-2012 at 04:28 AM.
command make mrproper restores your source code to its original or clean state
command make menuconfig will bring up the text based interface for you to configure you kernel
Which brings us to the question of how to preserve the running kernel as a fail safe? I've seen the answer in posts & tuts, maybe someone can explain the output process used to achieve this?
The first link is about kernel 2.4 and is pretty old, do not follow these instructions for kernels shipped with Slackware 13.37.
Your last question is answered as well in the wiki page pointed out by Ponce.
Better learn the basics of lilo before trying to recompile your kernel.
Last edited by Didier Spaier; 07-10-2012 at 10:49 AM.
Reason: s/second link/first link/
A good kernel building reference is Greg Kroah-Hartman's Linux Kernel in a Nutshell. The book is also available on Greg's website. Greg is a well known kernel developer.
Also, if you built a driver/module for your wifi card, for example. Keep the source code on your system in, say, /usr/local/src since you may need to rebuild the module for the new kernel.
Though Linux Kernel in a Nutshell be a interesting book, its reading is not necessary here; it could be even confusing for a beginner.
@dualarrow & NightSky: again, just read carefully what Alien BOB wrote and if you don't understand the purpose or effect of a specific command, first read the manual for it, i.e.
Code:
man <command_name>
then if this is still not clear just ask for explanations here, we will be eager to answer your questions.
To know the commands available to configure and make the kernel, just launch an xterm and type:
Code:
cd /usr/src/linux-<version>
su
make help|less
Last edited by Didier Spaier; 07-10-2012 at 10:03 AM.
The second link is about kernel 2.4 and is pretty old, do not follow these instructions for kernels shipped with Slackware 13.37.
FWIW it's a 2.6 base not a 2.4 and most of it is still completely relevant so long as you have the vaguest sense of what you're doing. Having said that I will try to find time to update specifically for 3.x when I can.
Thank you each and every one. First link I knew is outdated..just found all the detailed explanations of profiling your system's hardware + stat files & options in MenuConfig very clarifying, easy to read, it actually helped me understand the more current documentation. I Apologize if I've misinformed anyone.
My advise is simpler than that: do not compile a pre-release kernel at all. The only people who really need to do that are the kernel or driver developers or maintainers.
Granted, nobody may forbid you to try. But bear in mind that as long as a kernel is not officially released there are possibilities that it breaks something in your system that you would have to fix yourself, if you can.
Last edited by Didier Spaier; 07-11-2012 at 04:37 PM.
Didier, Good to understand that. What about your post: Easier kernel configuration with 2.6.32? Went to kernel newbies, looking for current information for 3.2.21? Yes reading kernel release notes.
Thanks Didier.
All i want to do is set the running kernel to the current hardware? Keeping kernel 3.2.21 is not a problem, because then i can keep running current upgrades without running slackpkg install new. Chris have you done this?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.