How Do You "Drop In New Kernel" For Slack?
Hi all,
Well I've come to the point in my slackware experience now that I can really screw things up, so here it goes LOL. I thought I read somewhere on the internet, that with Slackware you can just "boom" drop in a kernel patch and zip zip your updated to the latest greatest. But for the life of me I cannot recall or find the web-site that I saw this at. I figured it would be a great way to kill some time Hhahahah. Does anyway have a link to a nice how to? Thank you in advance. |
|
Quote:
This is a short recap of how I build my 2.6 kernels. ==================================================== *** Update: *** I copied this guide to my Wiki page at http://alien.slackbook.org/dokuwiki/...kernelbuilding so that is does not drown in this forum after a couple of days. *** I run the commands from a X terminal, and at some point start the X based kernel configurator. I run my desktop as "myself" but I build my kernels as root. In order to let root use my X display, I do the following in my X terminal: get root rights; merge my own (alien's) Xauthority file with the one from the root user, and set the DISPLAY variable. After doing that, I can run X applications from the "su" terminal. Code:
echo $DISPLAY # you'll be needing this value 3 lines below Download a new kernel, unpack it into /usr/src and create the "linux" link so that the commands are a little more generic. I will take a kernel version of "2.6.16.15" as an example. If yours is a different version, you'll know where to change the version strings in the rest of the story below. Code:
wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.15.tar.bz2 Now, get a Slackware kernel config file for a headstart during your own configuring. Pat's config files are pretty generic. By the time you read this, there might be a config for a newer 2.6 release available: Quote:
Code:
cd /usr/src/linux Code:
make xconfig * build the ext3 and reiser fileystem drivers into the kernel instead of compiling them as modules - I do not need to create an additional "initrd" then (see under "Filesystems" in the configurator). * enable support for dual procesessors and hypertreading (under "Processor type and features" > "Symmetric multi-processing support"). * enable 4GB of RAM. The Slackware default setting is to only support ~800 MB of your RAM, so any additional installed RAM is never used! (under "Processor type and features" > "High Memory Support (4GB)"). * enable the "low-latency" kernel if you run a desktop/laptop computer (under "Processor type and features" > "Preemption model" > "Preemptible kernel"). * set a 1000Hz timer (under "Processor type and features" > "Preemption model" > "Timer frequency"). * ... and more I can't think of right now. You can decide to disable a lot of the modules that the default config will build, to cut down on time, if you don't have the hardware in your computer. You could also looka at software suspend and CPU frequency scaling (under "Processor type and features") if you own a laptop. And finally save your configuration if you're satsfied. Now, start the build of kernel and modules, and install them to the proper places. Code:
make bzImage modules # compile the kernel and the modules Code:
image = /boot/vmlinuz Code:
image = /boot/vmlinuz-custom-2.6.16.15 Code:
lilo If the new kernel boots fine, you can add this line to the top of /etc/lilo.conf and re-run "lilo": Code:
default = newkernel Other packages that contain kernel modules Most certainly you will have packages installed that contain kernel modules that are not part of the default kernel. Slackware has "alsa-driver" for instance, and if you installed any wireless driver, these are basically kernel modules too. Now, with the installation of your new kernel, you will lose these modules, and you have to recompile the sources so that the binary modules match the new kernel. You can get an overview of all packages that have installed a kernel module for your current kernel by running this command (i.e. you must run this command while still running your old kernel): Code:
cd /var/log/packages For ALSA you have a choice: either enable the ALSA driver that is part of the kernel you've just downloaded, or leave the kernel configuration like Slackware's: disable all ALSA support in the kernel and instead re-build the alsa-driver package. Good luck with it all! Eric |
Very good guide, Bob, but...
Quote:
You need:
cd to your source directory, and type Code:
patch -p1 < path/to/your/patch What is the 'relaxant' for? Something, somewhere, may go haywire. Patch won't work right. You didn't use a 3 number kernel. Your dog pees on the keyboard. Whatever. Just keep trying. I had to do mine 3 times last night to get the driver I need for my wireless to show. (That's what I get for doing it the first time a few weeks ago after getting home from driving 1100 miles that day, being totally tired, and patching/compiling. Woke up the next day, and everything worked....Too bad I didn't write down what I did) Patching does get you the 'bleeding edge', but can be a hassle BTW, Bob, EXCELLENT tip on the merge idea. THAT has been driving me bonkers for awhile. |
|
Alien Bob: wow! Thanks for taking the time to type all that out for us newbs trying to work up the courage to compile a 2.6 Kernel. This will save me TONS of time.
|
Thank you for the help guys. I've been able to compile kernels as cwwilson walked me thru a few weeks back, however there are so many things in that long thread and Eric's post that I did not know. The "merge" for root using a users window for one, and finding out which modules are needed too..very nice.
cwwilson, how long does it take for the patching to run assuming that the patch worked the first time? when I compile a kernel it takes about 10 minutes on my pc to do "make". does that save alot of time? and I guess lastly, could you simply tar/archive your current kernel before you do the patch and if it didnt take just restore/overwrite by untar and try again? |
You could do the 'tar' thing, It can help.
Patching took me about 1 minute. It modifies the kernel rather quick |
Quote:
|
Yeah for sure this is really good.
Anyone use any "optimization flags" when they run make? I heard it can make the "make" go faster. |
What a great post Alien Bob! Slackers are amazing, no doubt
|
great write up on kernel compiling!
Hope you include more options you choose during xconfig for the benefit of newbies like me. |
Yeah truly a great write up. My only problem with kernels now is finding out Should I or shouldn't I include the IPV6 at all in my kernel compiles? If I put the ipv6 in, now I could be doing it wrong, but I get a ton of errors. Maybe my guard-dog is too old? DOesnt' support it? or I'm not supposed to have ipv4 and ipv6. I gotta read into it to be honest.
I saw cwwilson posted his kernel config I'm gonna go check that out and see. |
Quote:
I'm thinking of copying the instructions into my Wiki so that I can polish it further and make it more "sticky" - like the two posts up here in the Slackware forum. Eric |
Quote:
I believe what was "new" news to me, tho it might have been in that thread and I really dont have the time to double-check was: "make bzImage modules" I didnt know you could do that at once. I liked Shilo's thread but he uses gnome. To me gnome is like mac. I dont like mac. So I dont use gnome. sorry gnome writers. so i used the slackers bible to learn how to compile and it was not written there that way. giving root the user's console view was definitely new to me. this will stop me from having to pull the network cable when i load then install everything and set it up while running as root to do so in the beginning, altho now that i've gotten further i just drop out of X and go. this saves time. was totally new to me. the wget was nice as I didnt know how to do that for kernels. i've used it on other distro's when i first started out. i think you may want to add about the gpg import key feature of the kernel archives and gpg verify. the tips you added were dead on, short and sweet. the only issue of concern for some of those items from what i read is if the user wants to use ndiswrapper. you may want to caution on 4k v 8k stax. the listing of modules was only new to me even now. Eric, I think the beauty of your post compared to many web-sites or other wiki's was that it just listed the commands in a row. The user can see that it's only about 10-15 steps to do it and get done. You get the impression that "hey i can do this". Whereas web-sites go in to explaining, spread out over many pages, etc which is good, but tends to leave you with the feeling of "oh my god what am I about to get myself into." I think if you do a wiki you keep it short...put a quick link like this {1} which points to a different page if they want a description of what that all means, but just keep it running down like a quick cheet sheet. Not inundated with words. Just here's what you do, boom boom go get pizza boom boom done. You may want to touch on compiling on one pc and copying it over to another. Hope that the above gives you the feel for someone like me, just 2 months or so just into linux thinks. |
All times are GMT -5. The time now is 05:08 AM. |