Main Page | Report this Page
Linux Forum Index  »  Linux - Slackware Forum  »  The dreaded kernel compile...
Page 1 of 1    

The dreaded kernel compile...

Author Message
notbob...
Posted: Sat Oct 17, 2009 11:26 am
Guest
Looks like I gotta learn to compile a kernel. somthing I've been
religiously avoiding because ...well, cuz I could! Now, I'm obsessed
with seeing ALL my boot info when I invoke dmesg as su. Apparently,
the kernal ring buffer is maxed at 16K and I need more buffer size qto
see ALL my boot info. I seem to recall I also need to enable
something in the kernel to see graphics in links. I'll hafta look it
up again. Anything else I should look out for in my spineless
endeavor? ;)

nb
 
Grant...
Posted: Sat Oct 17, 2009 1:35 pm
Guest
On Sat, 17 Oct 2009 17:26:00 GMT, notbob <notbob at (no spam) nothome.com> wrote:

Quote:
Looks like I gotta learn to compile a kernel. somthing I've been
religiously avoiding because ...well, cuz I could! Now, I'm obsessed
with seeing ALL my boot info when I invoke dmesg as su. Apparently,
the kernal ring buffer is maxed at 16K and I need more buffer size qto

Commonly set to 18 --> 256k these days

Quote:
see ALL my boot info. I seem to recall I also need to enable
something in the kernel to see graphics in links. I'll hafta look it
up again. Anything else I should look out for in my spineless
endeavor? Wink

Yes, be sure to add local version number so you can return to distro
kernel for the second and third attempts Smile

If you overwrite the distro kernel and box no longer boots, you can
boot from distro CD/DVD and reinstall kernel or fix /boot symlinks.

Grant.
--
http://bugsplatter.id.au
 
Keith Keller...
Posted: Sat Oct 17, 2009 1:42 pm
Guest
On 2009-10-17, Grant <g_r_a_n_t_ at (no spam) bugsplatter.id.au> wrote:
Quote:

Yes, be sure to add local version number so you can return to distro
kernel for the second and third attempts Smile

Do you really need to do that? I guess if you run make install you do,
but I don't do that; I copy the bzImage file made to /boot/my.own.name,
and modify lilo.conf by hand. The only real hitch is System.map, but
that's not essential for booting, so I usually leave it as-is till I
know my new kernel works, then back up the original and copy in my new
one.

I recently rebuilt my kernel to allow it to scale down the processor.
From what I can tell, the default Slackware kernel does not tune down
the CPUs if the system is idle. Now my CPUs run at 1GHz most of the
time instead of full-speed at 2.2GHz. I haven't had time to compute how
much I'm reducing my power usage, but last I checked, at full speed, I
was using about 9KWh in 24 hours, but at reduced speed it was down to
about 4KWh. I don't recall which kernel parameters control this, but if
you get powertop it'll tell you (or you can look at the kernel docs).

--keith


--keith

--
kkeller-usenet at (no spam) wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
 
Grant...
Posted: Sat Oct 17, 2009 2:34 pm
Guest
On Sat, 17 Oct 2009 12:42:38 -0700, Keith Keller <kkeller-usenet at (no spam) wombat.san-francisco.ca.us> wrote:

Quote:
On 2009-10-17, Grant <g_r_a_n_t_ at (no spam) bugsplatter.id.au> wrote:

Yes, be sure to add local version number so you can return to distro
kernel for the second and third attempts :)

Do you really need to do that?

I remember way back when on redhat I'd try a custom kernel, lose control
of the machine and have to reinstall the distro to get it back ;)

Quote:
I guess if you run make install you do,
but I don't do that; I copy the bzImage file made to /boot/my.own.name,
and modify lilo.conf by hand. The only real hitch is System.map, but
that's not essential for booting, so I usually leave it as-is till I
know my new kernel works, then back up the original and copy in my new
one.

Thing is, I've been running a scripted install (own /sbin/installkernel)
for years now, I forget how ppl might manually install a custom kernel,
what's involved is automated here:

http://bugsplatter.id.au/bash/kernel/

Quote:

I recently rebuilt my kernel to allow it to scale down the processor.
From what I can tell, the default Slackware kernel does not tune down
the CPUs if the system is idle. Now my CPUs run at 1GHz most of the
time instead of full-speed at 2.2GHz. I haven't had time to compute how
much I'm reducing my power usage, but last I checked, at full speed, I
was using about 9KWh in 24 hours, but at reduced speed it was down to
about 4KWh. I don't recall which kernel parameters control this, but if
you get powertop it'll tell you (or you can look at the kernel docs).

Well the distro kernel tries to be everything for everyone, it cannot
be optimal for a particular machine.

Funniest part of this is the realisation we don't need all that peak
processing power 24/7 any more Smile It's not just the CPU clock, but
also the filesystem timing to allow sleeping the hard drive -- but be
aware that HDDs have a spinup lifetime as well as total hours lifetime.

I haven't tried for minimal power consumption. Apart from using an
old Dell box with 150W PSU for the Internet facing box.

Grant.
--
http://bugsplatter.id.au
 
Sylvain Robitaille...
Posted: Sat Oct 17, 2009 8:08 pm
Guest
On Sun, 18 Oct 2009 07:34:50 +1100, Grant wrote:

Quote:
... I forget how ppl might manually install a custom kernel,

It's trivial. Here's the step-by-step for one I did recently on a
Slackware-12.2 system:

# Kernel upgrade:
cd /local/pkg/_OS/src
tar xpskvf /local/pkg/_OS/DIST/linux-2.6.30.1.tar.bz2
rm linux && ln -s linux-2.6.30.1 linux
cd linux
make menuconfig
make
mv arch/x86/boot/bzImage /vmlinuz
mv /boot/System.map /boot/System.map.GENERIC
mv System.map /boot
bu /etc/lilo.conf
vi /etc/lilo.conf
lilo -v

The stock Slackware kernel on my system is available from Lilo as a
selection labeled "generic", which I can revert to if ever I have
problems with a custom kernel (or more likely I add hardware to the
system that isn't supported in my custom kernel and I want to know what
driver the "generic" kernel uses for it).

--
----------------------------------------------------------------------
Sylvain Robitaille syl at (no spam) encs.concordia.ca

Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
----------------------------------------------------------------------
 
Keith Keller...
Posted: Sun Oct 18, 2009 1:47 pm
Guest
On 2009-10-18, geep <geepat at (no spam) boursomaildot.com> wrote:
Quote:
Curious as to why you needed to rebuild kernel to support scaling.
I have 12.2 and only needed to setup a startup script called by rc.local
to load kernel modules - modprobe acpi-cpufreq & modprobe
cpufreq_ondemandand setup /sys/devices/system/cpu/cpu0 and cpu1 with
ondemand

Honestly? I just did what powertop recommended. Perhaps I needed to
rebuild in order to allow powertop to collect the stats it needed.

Quote:
This setup is pretty well doucmented after a little Googling.

Yeah, I didn't do that, obviously. :)

--keith


--
kkeller-usenet at (no spam) wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
 
Res...
Posted: Sun Oct 18, 2009 5:17 pm
Guest
On Sun, 18 Oct 2009, Keith Keller wrote:

Quote:
On 2009-10-18, geep <geepat at (no spam) boursomaildot.com> wrote:
Curious as to why you needed to rebuild kernel to support scaling.
I have 12.2 and only needed to setup a startup script called by rc.local
to load kernel modules - modprobe acpi-cpufreq & modprobe
cpufreq_ondemandand setup /sys/devices/system/cpu/cpu0 and cpu1 with
ondemand

Honestly? I just did what powertop recommended. Perhaps I needed to
rebuild in order to allow powertop to collect the stats it needed.


Has powertop been updated since 2006? Last time I ran that, it told me to
enable usb suspend, even though the servers never had usb enabled at all,
I think the way it gets its info is suspect.
(Yes we did put our wattmeter on it anyway, and no, made no difference :)


--
Res

Time to change the Australian Data Cable and Wiring Laws.
Help get the "Digital Data Exemption" back so we can legally make
ethernet cables. http://forums.ausics.net/./viewtopic.php?f=1&t=61
 
Keith Keller...
Posted: Sun Oct 18, 2009 5:26 pm
Guest
On 2009-10-18, Res <res at (no spam) ausics.net> wrote:
Quote:

Has powertop been updated since 2006? Last time I ran that, it told me to
enable usb suspend, even though the servers never had usb enabled at all,
I think the way it gets its info is suspect.

I don't think it's smart--it just sees if your kernel supports X, and if
not, recommends you enable it, even if X depends on Y which is also not
enabled. It also doesn't know about all the governors--it suggests to
me to enable the ondemand governor even though I've chosen to use the
conservative one instead. So, yes, following it completely blindly is
not necessarily the wisest course of action.

--keith

--
kkeller-usenet at (no spam) wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information
 
Mike Denhoff...
Posted: Mon Oct 19, 2009 6:37 am
Guest
On Sun, 18 Oct 2009 12:03:17 +0100, geep wrote:

Quote:
"Keith Keller" <kkeller-usenet at (no spam) wombat.san-francisco.ca.us> wrote in
message news:eajpq6xhb.ln2 at (no spam) goaway.wombat.san-francisco.ca.us...
I recently rebuilt my kernel to allow it to scale down the processor.
From what I can tell, the default Slackware kernel does not tune down
the CPUs if the system is idle. Now my CPUs run at 1GHz most of the
time instead of full-speed at 2.2GHz. I haven't had time to compute
how much I'm reducing my power usage, but last I checked, at full
speed, I was using about 9KWh in 24 hours, but at reduced speed it was
down to about 4KWh. I don't recall which kernel parameters control
this, but if you get powertop it'll tell you (or you can look at the
kernel docs).

--keith

Hi Keith,
(Apologies for thread drift...)
Curious as to why you needed to rebuild kernel to support scaling. I
have 12.2 and only needed to setup a startup script called by rc.local
to load kernel modules - modprobe acpi-cpufreq & modprobe
cpufreq_ondemandand setup /sys/devices/system/cpu/cpu0 and cpu1 with
ondemand
This setup is pretty well doucmented after a little Googling.

Cheers,
Peter

I do something like that too. The exact module to load depends on your
processor (and maybe motherboard). For my Athlon 64 3500+, I put this in
rc.local

/sbin/modprobe powernow-k8
/sbin/modprobe cpufreq_ondemand
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

There are some docs in the kernel source documentation under cpu-freq

Mike
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sat Nov 28, 2009 2:48 pm