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.
Well, just for fun, I downloaded linux-2.6.3-tar.gz
Following a couple of threads on kernel compiling, I put it in /usr/src and off I went.
I got to the make menuconfig part and discovered that most of the stuff in there is completely unknown by me. I have no clue what most of it is or whether I should select or not select most of it. Whether I should * it or M it. Some of it seemed logical enough, for instance, I think I deselected ext2 support and selected reiserfs support. I think I added some smb support. But I have no idea in practice what I did yet. I saw some stuff that looked right.
Is there a guide to make menuconfig somewhere or is it mainly trial and error and read the little help snippets for each item? Is there mainly just a particular set of items that a normal user would usually select? Such as no ISDN, and yes USB, and no PCMCIA, and yes whatever else, etc? I guess it is different in every case and just depends on the users familiarity with the components of his system and processor.
Then I got to the make bzImage part and watched stuff scroll across the screen for nearly an hour. (It's an AMD K6-2 350). Each line of that output was preceded by either CC, AS, LD, KSYM, HOSTCC, etc.... What are those? Where can I find info directly related to interpreting what's going on there?
make bzImage just finished. On to the next steps. No smoke is coming out of the case yet!
Well, this is fun. I followed DrOzz's kernel thread and now I have a 2.6.3 in lilo, just because that's what I named it.
I select it in the red lilo screen.
At the boot: prompt I hit enter.
It says loading 2.6.3.......................
It then says BIOS check successful
It then reboots.
Now I have an endless rebooting loop!!
Time to reinstall the old slack and put off the kernel stuff until later, I reckon.
Maybe I should not use the kernel thread from DrOzz and use the thread at the top of this forum. Maybe I did too much.
One thing he calls for is mkinitrd. mkinitrd does not exist on either of my slack machines.
actually, the compile sequence is pretty simple:
make menuconfig (or xconfig)
make bzImage
make modules
make modules_install
make install
make install takes care of copying things to the right places, etc. and even takes care of lilo. It's lot easier and probably safer since it will leave the old kernel available. Do you have the old kernel still around in lilo's menu? If you do, that should still work.
mkinitrd might have to be called with
/sbin/mkinitrd
on slack.
Well, the system is totally hosed. I read somewhere that with slackware, or maybe it was just with 2.6.3, that you don't even need to run make bzImage. Who knows.
Also, like I said, mkinitrd doesn't exist on the system, which includes in /sbin.
That machine is just for playing around with. And I just jumped off way too far out in the deep end. I'll reinstall and and go back to something easier, like sticking a lit cigarette in my eye.
But, for future reference, I am still curious about my first 2 questions in the first post about make menuconfig and make bzImage, even if it isn't necessary to run make bzImage now...
the doc that comes with the kernel still says to run make bzImage if you want a conpressed kernel image, which you almost certainly want. But it seems it makes one even if you just do make. I'm not sure. doesn't really matter. make bzImage doesn't hurt
As for picking and choosing, I think a lot is trial and error. There are a lot of things that you know you don't need given your hardware. I bet support for amateur radio is one of those... The trickier things are processor features and network stuff but just read the explanations and trial and error, I guess - always make sure you have a bootable kernel around. Don't erase anything in /boot while you're at it. Just add. Even if there's junk in /boot, it doesn't matter so long as the entries lilo.conf points to the right files and you run lilo.
edit: does slack use a initrd.img? Some distros don't. Just look in /boot. If there's no file that looks like initrd-something.img, then you don't need mkinitrd.
A good way to start learning about compiling kernels is to 'rob' a config file from a standard Slack kernel and use that at first. Actually the best is to use the bare.i config file. bare.i has the least options compiled in and so serves as the basis for compiling the standard Slackware package for the kernel-modules. By doing this it will usually get you a successful compile so you begin to see how the PROCESS goes. All those messages you saw was the actual kernel compilation going on.
After successfully doing it once, then you can go into menuconfig and just change the architecture so it fits your machine. This is where you'll get most of any improvement to be had from having a custom kernel. If you need to add any special device support or protocol or file system you can do it now.
The only thing that has to be compiled in (marked with Y or *) are the things that you need to BOOT your system, such as support for the file system you are using and support for the type of device that filesystem is located on. Everything else can be compiled as a module, thus cutting down on the size of the kernel.
Now, to figure out what all those things DO, have a look at /usr/src/linux/Documentation/Configure.help which explains in more detail what all those options are for.
Also about the messages that go by during compile, don't worry if you see errors. Unless at the end when it's finished it gives an error, you should be alright.
I was helped immensely by DaOne's guide to kernel compiling located here. I'll tell you from the perspective of a Slack n00b who's only been compiling kernels for about a month (yet has 50-60 bad experiments experience under their belt) what little I know and have learned.
If starting from scratch I start of with make mrproper. It's not in DaOne's guide and I AM NOT contradicting him, I have just noticed that kernels built doing the make mrproper command first are much quicker in my experience.
Know your hardware. Not just what type of motherboard you have but the chipset, onboard NIC type, specifications (ACPI or APM) et cetera. The command lspci gives up all types of information. Make sure you know all your hardware.
Use the help files. There is a help option inside menuconfig for almost every option. When in doubt, read them. When not in doubt, read them. I've read every help for every option at least once. If look in the directory of the kernel in the Documentation folder you'll find even more information. Reading is essential.
Look online for someone who's already blazed the path. One of my machines is an IBM 600X and when I decided to Slack it up most of my work was already done for me. There's not too much sense in reinventing the wheel when trying to build a car.
Experiment. Even with the 600X I don't have it configured exactly the way others I've read about do, mainly because times and kernels change. The greatest thing about DaOne's guide is that it allows you the ability to load the previous kernel if the new one doesn't go quite as planned, which I think is enough to get someone considered for sainthood.
Kernel compliling I didn't see as that big a deal once a had done some reading and research. The only thing that I feel as though I still have yet to master with the kernel is patching. Haven't found a good tutorial out there yet but I will and it will get done. Best of luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.