-current users: Do you recompile kernels after updating?
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.
EDIT:
Try reinstalling the script, there isn't a EOF on that line, so clearly something happened in transit. For convenience I added a quick install tut at the top of the script:
Code:
################################
### TO INSTALL/USE:
### wget -N https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/slackware/kernelMe.sh -P /usr/src/
### cd /usr/src/
### sh kernelMe.sh
################################
Thanks that did the trick, it's running now. Must have been the transfer as you said.
What I would say initially is that the wget line you added throws up an error as you need to be root for the /usr/src access.
I ran it as a normal user to my Downloads folder (as I always do) and then moved it to /usr/src afterwards (as I always do).
I'll add a note about being root (the script does check to see if you are root, and I thought the '#' in front of the command would make it obvious, but maybe not enough :-).
I'll add a note about being root (the script does check to see if you are root, and I thought the '#' in front of the command would make it obvious, but maybe not enough :-).
The script wouldn't have checked me because I copy/pasted the wget command from the top of the script to an xterm.
Im one of those who always does recompile, taking some stuff out, and append a version string to denote the machine its running on.
My main desktop is a pentium d dual processor, so i compile for that rather than just a generic x86_64 (though i dont really know what the technical differences might be).
There are also some memory options that i select that should improve performance, if im understanding them correctly and i always compile in my filesystem choices.
I leave the default kernel entry as a backup (i have had misahaps ) so i always have an out if things go wrong.
I asked because i was curious about other people doing this and if there were options i might try that i didnt know about.
iirc my current .config is about 4-5 kernel updates ago in origin.
Recompiling the latest kernel update and reading the "help" in menuconfig is one of my favorite weekend pastimes, even tho alot of it seems like it might be in another language
Im one of those who always does recompile, taking some stuff out, and append a version string to denote the machine its running on.
My main desktop is a pentium d dual processor, so i compile for that rather than just a generic x86_64 (though i dont really know what the technical differences might be).
There are also some memory options that i select that should improve performance, if im understanding them correctly and i always compile in my filesystem choices.
I leave the default kernel entry as a backup (i have had misahaps ) so i always have an out if things go wrong.
I asked because i was curious about other people doing this and if there were options i might try that i didnt know about.
iirc my current .config is about 4-5 kernel updates ago in origin.
Recompiling the latest kernel update and reading the "help" in menuconfig is one of my favorite weekend pastimes, even tho alot of it seems like it might be in another language
I always build the kernel for my CPU. I just edit the makefile and change the K8 entry to use "native", I believe you don't compile CPU instructions your CPU wont use (correct me if I'm wrong). The 1st kernel I compile I do "make localmodconfig" so I just get the stuff I actually need. When you do localmodconfig do make sure you have all the hardware you use connected though. It'll result in a very small kernel and compiling takes only like 8 minutes. I'll end up with 21MB in modules instead of 120+ MB
I always custom build any kernel immediately for CPU, and low-latency, realtime scheduling since I am a gamer and also record and edit media. However which kernel I choose is rarely the latest but rather one for long term stability.
I always build the kernel for my CPU. I just edit the makefile and change the K8 entry to use "native", I believe you don't compile CPU instructions your CPU wont use (correct me if I'm wrong). The 1st kernel I compile I do "make localmodconfig" so I just get the stuff I actually need. When you do localmodconfig do make sure you have all the hardware you use connected though. It'll result in a very small kernel and compiling takes only like 8 minutes. I'll end up with 21MB in modules instead of 120+ MB
Wow thats great, thanks I didnt even know about localmodconfig.
How is it used?
The current compilation steps i use are
Code:
make clean&&make bzImage&&make modules&& make modules_install
Where does make localmodconfig come in?
Never mind i figured it out. Thanks
Wow i had no idea how many unnecessary modules i was building. I guess i just tended to pass them by in the config thinking that if they werent needed they wouldnt be loaded.
Wow i had no idea how many unnecessary modules i was building. I guess i just tended to pass them by in the config thinking that if they werent needed they wouldnt be loaded.
The extra modules are no problem. But as you found out compiling is a lot faster without the extra modules. When you get new hardware it's a bit more tricky though. Then you 1st need huge/generic/"earlier compile with everything" so you can detect the needed modules. Enabling something new manually in such a lean config can be a lot harder.
I usually compile a new kernel when there is a new kernel available on kernel.org. I use Patrick's generic or huge configs, and only change processor type, enable preemption and CONFIG_SCHED_AUTOGROUP. Currently, I'm running 3.18.7 on my desktop (x86_64), and 3.14.33 on my laptop (x86) -- both running -current. I have written a script which can check for a new kernel version. It's called getkernel: https://raw.githubusercontent.com/1e...ster/getkernel. When compilation is done, I run another script: prepkernel: https://raw.githubusercontent.com/1e...ter/prepkernel I don't expect these scripts to be useful to anybody other than myself, though linking to them doesn't hurt, I guess.
The extra modules are no problem. But as you found out compiling is a lot faster without the extra modules. When you get new hardware it's a bit more tricky though. Then you 1st need huge/generic/"earlier compile with everything" so you can detect the needed modules. Enabling something new manually in such a lean config can be a lot harder.
Thats good advice, but im not really bothered by the prospect of a recompile
I wouldn't mind knowing exactly which modules my system would only need and then trim down the kernel to having everything as a module and having a stripped bare kernel loaded by an initrd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.