LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 12.2 - HIGHMEM64 support - 1st kernel build (http://www.linuxquestions.org/questions/slackware-14/slackware-12-2-highmem64-support-1st-kernel-build-707007/)

head_shot 02-23-2009 11:48 PM

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.

C-Sniper 02-24-2009 12:00 AM

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

head_shot 02-24-2009 12:18 AM

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.

piratesmack 02-24-2009 04:25 AM

Quote:

Originally Posted by head_shot (Post 3455171)
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 (Post 3455179)
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

head_shot 02-24-2009 04:24 PM

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?

head_shot 02-24-2009 05:53 PM

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?!?

piratesmack 02-24-2009 06:59 PM

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

darkcenter 02-27-2009 08:10 AM

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

GazL 02-27-2009 08:41 AM

Quote:

Originally Posted by darkcenter (Post 3459302)
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.

Shingoshi 05-07-2009 05:03 AM

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

hitest 05-07-2009 09:11 AM

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

bgeddy 05-07-2009 10:23 AM

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 ?

Shingoshi 05-07-2009 03:23 PM

I was looking for the location of the configuration option....
 
Quote:

Originally Posted by hitest (Post 3533328)
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

joutlancpa 05-07-2009 03:37 PM

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.

Shingoshi 05-07-2009 03:51 PM

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/


All times are GMT -5. The time now is 04:37 AM.