Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
02-23-2009, 10:48 PM
|
#1
|
|
LQ Newbie
Registered: Feb 2009
Posts: 8
Rep:
|
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.
|
|
|
|
02-23-2009, 11:00 PM
|
#2
|
|
Member
Registered: Dec 2006
Distribution: Slackware
Posts: 507
Rep:
|
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
|
|
|
|
02-23-2009, 11:18 PM
|
#3
|
|
LQ Newbie
Registered: Feb 2009
Posts: 8
Original Poster
Rep:
|
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.
|
|
|
|
02-24-2009, 03:25 AM
|
#4
|
|
Member
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 513
Rep: 
|
Quote:
Originally Posted by head_shot
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:
Also read this:
http://www.slackbook.org/html/book.h...KERNEL-COMPILE
Quote:
Originally Posted by C-Sniper
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.
|
|
|
|
02-24-2009, 03:24 PM
|
#5
|
|
LQ Newbie
Registered: Feb 2009
Posts: 8
Original Poster
Rep:
|
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?
|
|
|
|
02-24-2009, 04:53 PM
|
#6
|
|
LQ Newbie
Registered: Feb 2009
Posts: 8
Original Poster
Rep:
|
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?!?
|
|
|
|
02-24-2009, 05:59 PM
|
#7
|
|
Member
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 513
Rep: 
|
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.
|
|
|
|
02-27-2009, 07:10 AM
|
#8
|
|
LQ Newbie
Registered: Feb 2009
Posts: 1
Rep:
|
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
|
|
|
|
02-27-2009, 07:41 AM
|
#9
|
|
Senior Member
Registered: May 2008
Posts: 2,839
|
Quote:
Originally Posted by darkcenter
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.
|
|
|
|
05-07-2009, 04:03 AM
|
#10
|
|
Member
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Rep:
|
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
|
|
|
|
05-07-2009, 08:11 AM
|
#11
|
|
Senior Member
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 3,643
|
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
|
|
|
|
05-07-2009, 09:23 AM
|
#12
|
|
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
|
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.
|
|
|
|
05-07-2009, 02:23 PM
|
#13
|
|
Member
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Rep:
|
I was looking for the location of the configuration option....
Quote:
Originally Posted by hitest
|
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
|
|
|
|
05-07-2009, 02:37 PM
|
#14
|
|
Member
Registered: Apr 2009
Location: Orlando, FL
Distribution: Scientific Linux 6 x64
Posts: 211
Rep:
|
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.
|
|
|
|
05-07-2009, 02:51 PM
|
#15
|
|
Member
Registered: Oct 2006
Location: Cochise County, Arizona
Distribution: Gentoo-AMD64 / Slackware64-Current
Posts: 474
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|