LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 02-23-2009, 10:48 PM   #1
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Rep: Reputation: 0
Smile Slackware 12.2 - HIGHMEM64 support - 1st kernel build


Greetings,

I'm doing my first kernel build on a fresh install of Slackware 12.2, and all I want to do is add support for 8G of RAM. Could someone point me to a guide that is specific to 12.2? I've Googled tons of build articles, and I'm at:
/usr/src/linux# make menuconfig

I'm in menuconfig, and I see the submenu where I can enable HIGHMEM64.

However, my question is this, can I simply enable that, and will this kernel be the exact same kernel that got loaded on install? In other words, if I don't change anything else, are the current defaults [in menuconfig] the same as the currently installed kernel? I didn't do anything special on the install.

I'd also greatly appreciate a step-by-step of what to do after I close out of menuconfig. I'm not exactly certain where the new kernel should go, and how to switch over to the new one.

I'm a touch nervous because this is a production server. It's MY production server, but I've got a couple full-timers using it, so any stupid mistakes I make affect others now. I have been using slackware for around 8 years now (obviously not exclusively), and I still consider myself a total noob. I know just about enough to be dangerous, but want to change that. Any help would be welcomed.

Beyond that, I would like a guide to optimizing my kernel. I was digging through the submenus of menuconfig, and I found a ton of crazy options like 'enable HAM radio support'. Seriously? Do I need this in my kernel? I run a LAMP environment at a cheap office.

Thanks,

-Heady

/first post, please go easy.

Last edited by head_shot; 02-23-2009 at 11:19 PM.
 
Old 02-23-2009, 11:00 PM   #2
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
Welcome to LQ!
I see you have done a fair bit of homework and it will definitely help out.
All you have to do is enable the highmem64 option, then save the configuration, and once back at the terminal type 'make && make modules_install' which will rebuild the kernel and rebuild all the modules and install them to the correct locations.

The next part is where I deviate from everyone else, after running those two commands i run 'make install' which makes sure everything gets update and your vmlinuz is updated as well as your lilo.conf to point to the new kernel image. A LOT of people will tell you to do it another way that involves copying a couple files and effectively accomplishes the same thing. (please see further suggestions in post beneath me for how to go about the other way)

As for streamlining your kernel. A lot of times (if you have an x server running you can use 'make xconfig' which looks a bit prettier than the menuconfig and lets you see more on one screen) if you read the help on each setting you should be able to figure out what you need and what you don't. my suggestion is though, if you don't know what it does, leave it.

Have fun!

P.S. I would recommend waiting for another person to post after me because I am not sure if recompiling a kernel without enabling your filesystem as <*> will require you to rebuild your initrd.gz
 
Old 02-23-2009, 11:18 PM   #3
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks C_Sniper! (nice handle!)

Yes, I've been tempted to use xconfig, but I'm trying to baby-step into CLI, and I figured ncurses is a good intermediate step...right?

Thanks for the tips. I'll wait a couple of posts as you say, and then I will give it a go.
 
Old 02-24-2009, 03:25 AM   #4
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 517

Rep: Reputation: 132Reputation: 132
Quote:
Originally Posted by head_shot View Post
However, my question is this, can I simply enable that, and will this kernel be the exact same kernel that got loaded on install? In other words, if I don't change anything else, are the current defaults [in menuconfig] the same as the currently installed kernel? I didn't do anything special on the install.
To get the same exact kernel that got loaded on install, you need copy the current kernel's configuration file.

The process should be something like:
Code:
cd /usr/src/linux
make mrproper
zcat /proc/config.gz > .config
make menuconfig
-enable high memory support and save
make
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-custom
cp System.map /boot/System.map-custom
cp .config /boot/config-custom
Now you need to edit lilo:
Code:
nano /etc/lilo.conf
Add something like:
Code:
image = /boot/vmlinuz-custom
  root = /dev/sdxx
  label = Slackware
Then run:
Code:
/sbin/lilo

Also read this:
http://www.slackbook.org/html/book.h...KERNEL-COMPILE


Quote:
Originally Posted by C-Sniper View Post
P.S. I would recommend waiting for another person to post after me because I am not sure if recompiling a kernel without enabling your filesystem as <*> will require you to rebuild your initrd.gz
Yeah, it will. But if he uses the stock slackware kernel's configuration file, support for his filesystem should already be built it.

It's best to build support for your filesystem into the kernel and not as a module

Last edited by piratesmack; 02-24-2009 at 03:46 AM.
 
Old 02-24-2009, 03:24 PM   #5
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Well, I followed your steps piratesmack, and got a modprobe error on the following boot. I can't get it to fully boot now. any ideas?

In the meantime, how can reconfig lilo to boot the old kernel?
 
Old 02-24-2009, 04:53 PM   #6
head_shot
LQ Newbie
 
Registered: Feb 2009
Posts: 8

Original Poster
Rep: Reputation: 0
got it working on the old kernel again.

In the truest spirit of Linux, I read article after article, scoured forums, booted from a few different sources, then finally found the answer in the darned MAN file. ;-)

Boot off a slax stick with the Slack Install DVD inserted. CD into the Slack DVD directory /mnt/sr0/slackware/a (in my case)

ROOT=/mnt/sda1 upgradepkg --install-new --reinstall kernel-modules-2.6.27.7-i486-1.tgz

installs/upgrades the package to the root partition of another disk (in this case sda1).

Fixed me up and booted normally with the old kernel. I'm still not certain what happened, maybe I better do this over the weekend next time, eh?!?
 
Old 02-24-2009, 05:59 PM   #7
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 517

Rep: Reputation: 132Reputation: 132
That's weird, did you change anything else in menuconfig?
And what was the exact error you got?

Sorry I didn't tell you this before, but another option you should look at in menuconfig is "General Options>Local version - append to kernel release [-smp]"

Change it from "-smp" to whatever you want to call it. "-custom" for example. That will make it so your new kernel's modules go into a different folder, like "/lib/modules/2.6.27.7-custom" instead of "/lib/modules/2.6.27.7-smp"

That way you can keep both kernels in case something goes wrong

Last edited by piratesmack; 02-24-2009 at 06:09 PM.
 
Old 02-27-2009, 07:10 AM   #8
darkcenter
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
sorry, i just missed piratesmack's direction in the post above: "zcat /proc/config.gz > .config" My question is already answered


>hi,
>i was actually going to attempt the same thing,
>i have slackware 12.2 installed working fine with all of my drivers, my problem is that i can use only 3gb of ram.

>i just want to recompile the default kernel with pae enabled. I dont want to reinstall the drivers or any other modules if possible and i dont >want to have any difference with the default kernel except pae.

>So about my question:

>i have installed kernel sources package, does the sources and configuration under /usr/src/linux reflect my actual kernel configuration? i mean >if i just change pae here, and make a build, would that be ok? or are the config files for my default kernel is residing elsewhere?

>thanks in advance

Last edited by darkcenter; 02-27-2009 at 07:25 AM. Reason: update
 
Old 02-27-2009, 07:41 AM   #9
GazL
Senior Member
 
Registered: May 2008
Posts: 3,231

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by darkcenter View Post
sorry, i just missed piratesmack's direction in the post above: "zcat /proc/config.gz > .config" My question is already answered
You should really run a 'make oldconfig' directly after you copy the .config file into place, just to be on the safe side.
 
Old 05-07-2009, 04:03 AM   #10
Shingoshi
Member
 
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Blog Entries: 28

Rep: Reputation: 34
I think that maybe because I'm already running a Slamd64 64-bit kernel (and HIGHMEM64 is already configured), I may not be having this option shown. So how do I build a 32-bit kernel with HIGHMEM64 while running a 64-bit kernel. Where exactly is the configuration for HIGHMEM64? I don't see it. If the 64-bit kernel already has HIGHMEM64, will the 32-bit build default to the same value?

Shingoshi
 
Old 05-07-2009, 08:11 AM   #11
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,004

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
I've used Eric's guide to build a new kernel. This is a thorough, well-written how to on kernel compiling. I highly recommend it.

Building a Linux Kernel from source
 
Old 05-07-2009, 09:23 AM   #12
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Where exactly is the configuration for HIGHMEM64? I don't see it.
Look at "Processor type and Features->High memory Support".

Edit: I just booted my Slamd64 to check this and I can't find it either - not sure what's going on there. Maybe a kernel version or something ?

Last edited by bgeddy; 05-07-2009 at 11:31 AM.
 
Old 05-07-2009, 02:23 PM   #13
Shingoshi
Member
 
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Blog Entries: 28

Rep: Reputation: 34
I was looking for the location of the configuration option....

Quote:
Originally Posted by hitest View Post
I've used Eric's guide to build a new kernel. This is a thorough, well-written how to on kernel compiling. I highly recommend it.

Building a Linux Kernel from source
I was looking for the location of the configuration option....
But as I stated, and was later substantiated by the respondent (bgeddy) below you, the configuration doesn't show up when you're running a 64-bit kernel. A 64-bit kernel already has this enabled by default. So you're not going to see this configuration option, no matter how hard you look.

I'm going to try with another kernel source I have on my system, and remove the .config file. Hopefully, that will give me a new blank configuration without any ARCH previously set.

And by the way, I have built numerous kernels, including 64-bit. But you simply can't configure what doesn't show up!

Shingoshi
 
Old 05-07-2009, 02:37 PM   #14
joutlancpa
Member
 
Registered: Apr 2009
Location: Orlando, FL
Distribution: Scientific Linux 6 x64
Posts: 211
Blog Entries: 1

Rep: Reputation: 31
I used Alien Bob's guide, on a 32 bit compile, and the option read something like --enable ram up to 64 gb-- or something like that ...I used the ncurses menuconfig...it's in there somewhere, can't remember more than that, sorry.
 
Old 05-07-2009, 02:51 PM   #15
Shingoshi
Member
 
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Blog Entries: 28

Rep: Reputation: 34
HIGHMEM won't show up with a 64-bit kernel...

How many times do I have to write this?
HIGHMEM won't show up with a 64-bit kernel...
I just tried the configuration of my kernel using a clean .config. That produced the same result (because of uname). But then it occurred to me to use "linux32 remake menuconfig". Yes, you're reading correctly. I use remake instead of make. And that did the trick. Only by convincing the kernel (with linux32) that it was a different ARCH, would it finally allow me to build a 32-bit version. HIGHMEM64 showed up, and I set it as required. So all is good now. Well, I think it is. I haven't actually started the rest of the configuration and build yet.

Shingoshi

remake is a patched version of make which provides additional features for debugging. Look for it.
http://bashdb.sourceforge.net/remake/

Last edited by Shingoshi; 05-07-2009 at 03:33 PM.
 
  


Reply

Tags
build, kernel, slackware


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install custom kernel for Slackware during 1st installation deggial Slackware 5 04-15-2007 05:17 AM
How to build MPPE support into custom linux kernel reddyl Suse/Novell 2 01-20-2006 08:38 AM
How to build a module for my kernel? PCMCIA wireless support for cwc854 viktoranagy MEPIS 1 09-09-2005 09:16 AM
HowTo build a new PXES kernel to support a new NIC? ab2000 Linux - Newbie 1 07-23-2005 12:23 PM
build kernel with LVM support raggmopp Linux - Software 0 06-20-2003 04:25 PM


All times are GMT -5. The time now is 07:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration