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

Notices


Reply
  Search this Thread
Old 02-18-2015, 01:46 PM   #16
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174

Quote:
Originally Posted by ryanpcmcquen View Post
Do you have kernelMe.sh in /usr/src?

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.
 
1 members found this post helpful.
Old 02-18-2015, 01:55 PM   #17
ryanpcmcquen
Member
 
Registered: Apr 2013
Distribution: DistroWanderer
Posts: 381

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by rkfb View Post
Thanks that did the trick, it's running now. Must have been the transfer as you said.
Sweet! Thanks for trying it out. :-)

Let me know of any improvements/suggestions. Pull requests are cool too.
 
Old 02-18-2015, 03:27 PM   #18
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by ryanpcmcquen View Post
Sweet! Thanks for trying it out. :-)

Let me know of any improvements/suggestions. Pull requests are cool too.
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).
 
Old 02-18-2015, 03:29 PM   #19
ryanpcmcquen
Member
 
Registered: Apr 2013
Distribution: DistroWanderer
Posts: 381

Rep: Reputation: Disabled
Quote:
Originally Posted by rkfb View Post
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 :-).
 
Old 02-18-2015, 03:47 PM   #20
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 15.0 running i3
Posts: 494

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by ryanpcmcquen View Post
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.
 
Old 02-18-2015, 05:00 PM   #21
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
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

Last edited by fogpipe; 02-18-2015 at 05:06 PM.
 
Old 02-18-2015, 10:03 PM   #22
JackHair
Member
 
Registered: Aug 2009
Location: Netherlands
Distribution: Slackware64-current
Posts: 167

Rep: Reputation: 39
Quote:
Originally Posted by fogpipe View Post
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

Last edited by JackHair; 02-18-2015 at 10:05 PM.
 
1 members found this post helpful.
Old 02-18-2015, 10:28 PM   #23
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
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.
 
2 members found this post helpful.
Old 02-19-2015, 02:54 AM   #24
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by JackHair View Post
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.
Code:
:modules]$du -sh 3.14.33*
135M	3.14.33
131M	3.14.33ODIN
16M	3.14.33ODINlmc
Shortens compile time tremendously.

Last edited by fogpipe; 02-19-2015 at 06:34 AM.
 
Old 02-19-2015, 07:24 AM   #25
kevison
Member
 
Registered: Dec 2007
Location: Grand Rapids, Michigan USA
Distribution: Slackware/Bodhi/Manjaro
Posts: 149

Rep: Reputation: Disabled
Quote:
Originally Posted by ryanpcmcquen View Post
I am compiling kernels a lot more since I scripted it:

https://github.com/ryanpcmcquen/linu...re/kernelMe.sh

But I do not usually recompile after updates. I do, however, reinstall quite often.
Very nice!
 
1 members found this post helpful.
Old 02-19-2015, 08:26 AM   #26
JackHair
Member
 
Registered: Aug 2009
Location: Netherlands
Distribution: Slackware64-current
Posts: 167

Rep: Reputation: 39
Quote:
Originally Posted by fogpipe View Post
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.
Code:
:modules]$du -sh 3.14.33*
135M	3.14.33
131M	3.14.33ODIN
16M	3.14.33ODINlmc
Shortens compile time tremendously.
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.
 
1 members found this post helpful.
Old 02-19-2015, 09:01 AM   #27
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I recompile only to test a /testing kernel if I feel like it, otherwise, I stick with the LTS kernels as-is.
 
Old 02-19-2015, 09:05 AM   #28
lems
Member
 
Registered: May 2004
Distribution: BSD
Posts: 269

Rep: Reputation: 119Reputation: 119
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.
 
Old 02-19-2015, 03:50 PM   #29
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by JackHair View Post
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
 
Old 02-20-2015, 05:50 AM   #30
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
  


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
Slackware ARM (current) epic mistake: the current Android kernels are kicked out! Darth Vader Slackware 16 08-25-2013 04:36 PM
slackware current question on the current kernels davimint Slackware 3 06-03-2007 07:39 AM
Updating to 10.2 and effects on kernels Woodsman Slackware 2 11-23-2005 05:29 PM
updating and kernels dreaded Mandriva 9 09-02-2004 11:30 AM

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

All times are GMT -5. The time now is 10:50 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