Click to See Complete Forum and Search --> : slackware 9.1 upgrading to kernel 2.6.0 tutorial
emactive
01-22-2004, 04:50 PM
Seems like its hard to find the right tutorial out there for kernel upgrading. I found this one for slackware 9.1 users.
:: Kernel 2.6 (for Slackware 9.1) Compile Guide
Compiling a new kernel can be very frustrating at times but doesn't have to be hard! From my experience (and other people's) I've compiled this quick start guide to get you up and running with the latest and greatest version of the linux kernel (2.6.0 at time of writing).
N.B. you will need root access to run many of the commands below. Type 'su' from the command prompt as a normal user (you will be asked for the root password) to gain root permissions.
1. Download the latest stable kernel from a mirror close to you: http://www.kernel.org/mirrors/
2. Go into the directory you downloaded it to and type the following:
mv linux-2.6.0.tar.gz /usr/src
cd /usr/src
tar -zxvf linux-2.6.0.tar.gz
rm /usr/src/linux
ln -s /usr/src/linux-2.6.0 /usr/src/linux
This moves the downloaded kernel source file into /usr/src, extracts it and updates the 'linux' link to point to the newly created folder.
If you do would prefer to store the kernel sources in another directory (e.g. your home directory) then you may ignore the first two commands and change the last one to link to another directory:
su -c "ln -s /home/username/linux-2.6.0 /usr/src/linux"
This has a number of advantages and is especially useful for normal users to be able to execute the various make commands without the need of being root.
3. Next move into the 'linux' directory and configure the options you wish to compile into the kernel:
cd linux
make menuconfig
If you are running X-Windows you may want to run xconfig (or gconfig in gnome) for the nice graphical interface instead of menuconfig.
When finished exit and save the new configuration.
4. Now its time to compile everything:
make bzImage
make modules
make modules_install
This compiles the kernel and the various modules needed by it.
5. Next configure your system so it can boot the new kernel:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6
cp Sytem.map /boot/Sytem.map-2.6
rm /boot/System.map
ln -s /boot/System.map-2.6 /boot/System.map
pico -w /etc/lilo.conf
The last command will open the lilo configuration file in the pico text editor.
From here make a copy of the entry for the previous kernel making the following changes:
# Linux bootable partition config begins
image = /boot/vmlinuz-2.6
root = /dev/hda1
label = Linux-2.6
read-only
Where /dev/hda1 is the location of your boot partition.
Exit pico using cmd-x, selecting yes (y) when asked to save changes.
6. Commit the changes to the boot loader:
/sbin/lilo
If no errors occur then you should be ready to reboot and start using your new kernel!
N.B. If the new kernel boots OK but you find that various part of the system fail to initialise (the network being the obvious one) then it may be worth deleting the config link file in the /boot folder:
rm /boot/config
Enjoy!
http://durham.randomwire.com/kernel.php
JohnT
01-22-2004, 05:36 PM
2. Go into the directory you downloaded it to and type the following:
mv linux-2.6.0.tar.gz /usr/src
cd /usr/src
tar -zxvf linux-2.6.0.tar.gz
rm /usr/src/linux <-------Why would you do this?
ln -s /usr/src/linux-2.6.0 /usr/src/linux <-----then replace it.
This moves the downloaded kernel source file into /usr/src, extracts it and updates the 'linux' link to point to the newly created folder.
aNoob
01-22-2004, 05:53 PM
Guyz,please,make up your minds :D
I'm trying to compile for the third time 2.6 kernel.What should I do now if you disagree on such a small issue?
j79zlr
01-22-2004, 05:58 PM
JohnT is right, but either way it doesn't matter, you do not need to remove the symlink before redefining it, but it doesn't hurt anything either.
JohnT
01-22-2004, 06:06 PM
There has not been one Slack kernel compile tutorial that I have come across that works across the board for everyone. Agreed it is a small thing, but also is the mis-placement of the " make modules" line I have seen in some. The most consistent one I have seen is in the Slack handbook. This one looks almost like it with the one exception, but sloppy editing is no excuse in my book when it cost some people hours or even re-installs , especially on a kernel compile. Sorry if it sounds kinda harsh, but..........
j79zlr
01-22-2004, 06:14 PM
The slack book forgets the make modules_install after make modules. I wrote one too, worked for me and a couple friends, http://www.j79zlr.com/linux/index.php?page=kernel
JohnT
01-22-2004, 06:17 PM
Originally posted by j79zlr
The slack book forgets the make modules_install after make modules. I wrote one too, worked for me and a couple friends, http://www.j79zlr.com/linux/index.php?page=kernel
I called 'em' on that one too, when I had Slack 7.0. I just edited my edition after finding out the hard way.....is it still in there? BTW yours looks good and I see you've noted the changes:p
j79zlr
01-22-2004, 06:22 PM
must note the changes :D
I emailed them about omitting that, but they never got back to me. The make dep; make clean; part I just removed doesn't hurt anything if its there. :)
JohnT
01-22-2004, 06:27 PM
OK...gotcha
# ln -s Linux-2.6.0 Linux
# cd linux
# No such file or directory
Do you see? he ,he. I'm relentless:p
j79zlr
01-22-2004, 06:31 PM
jeesh :D fixed
JohnT
01-22-2004, 06:33 PM
Originally posted by j79zlr
jeesh :D fixed
You forgot the one above that...Linux.old
Watch out for the kernel patrol:D
Its a good job though...appreciated by many I am sure.
I've got it bookmarked. With my memory I need a good guide everytime.
JohnT
01-22-2004, 06:39 PM
The make dep; make clean; part I just removed doesn't hurt anything if its there.
I agree, I extract a new one if needed.
There's no point of having a /usr/src/linux symlink to whatever kernel you have.
carbon-12
01-22-2004, 07:39 PM
LOL ive tried to recompile my kernel 3 times in slackware.
1.) Forgot to enable Reisfer in menuconfig and got a kernel panic
2.) Used "make oldconfig" but my internet and sound stopped working.
3.) Tried to select every relevant module but at the lilo screen it said it couldnt load vmlinuz.
No 2.6 for me :(
Originally posted by carbon-12
2.) Used "make oldconfig" but my internet and sound stopped working.
make oldconfig doesnt work between 2.4 and 2.6 kernels.
j79zlr
01-22-2004, 08:19 PM
Besides, they boot faster and seem to run better overall if you remove unnecessary items, like support for the 200 NIC's you dont have.
JohnT
01-22-2004, 10:05 PM
Originally posted by j79zlr
Besides, they boot faster and seem to run better overall if you remove unnecessary items, like support for the 200 NIC's you dont have.
He,he, I dont want mine going any faster than me:D
MMYoung
01-24-2004, 11:44 AM
to getting 2.6.1 compiled using your howto.
Couple of stupid questions.
1. Sound will not "automagically" start when rebooting. I have have to do a modprobe snd_emu10k1 each time.
2. Same with network card module
3. Have to start boot using vga="normal" in lilo.conf. My 2.4.22 kernel can be started using the vga="773"
I can access my USB Zip drive, my USB mouse works, I can access my CDROM drives, etc. I've downloaded the newest NVIDIA driver and X is working fine. After I do the modprobe "thingy" I have sound in X and my network "works".
As far as I can tell these three things are the ONLY things that are keeping me from just jumping up and down for joy!! Any tips would be greatly appreciated.
I'm thinking that it has something to do with modprobe.conf but I added lines in modprobe.conf, but got error messages. That (modprobe.conf/modules.conf) is new territory for me.
BTW, using Slackware 9.1
TIA,
MMYoung
MMYoung
01-24-2004, 12:19 PM
Since I had the NVIDIA driver working under 2.6.1 I thought, just for sh#ts and giggles, I'd edit the lilo.conf to see if I could use the vga="773" parameter. After editing I dutifully typed in lilo at the root promt and got this error:
Warning partition 2 of hda is not set to active.
added 2.4.22*
added 2.6.1
That is the error message as close as I can remember (wish I had written it down). As hda2 is the extended partion on my hard drive it ain't supposed to be active (I don't reckon) so I didn't figure it to be a "major" problem. So I rebooted and got 91's all over my screen.
I booted into my main distro, MEPIS, and now sound doesn't work. However, I rebooted into my regular Slackware 9.1 partition and sound and everything works fine. Will try to boot back into MEPIS after I type this to see if it was just some "oddball" thing that might have happened during boot. I don't see how what I did on /dev/hda12 would affect anything on /dev/hda7, especially since /dev/hda10 works fine.
Will post back later,
MYoung
JohnT
01-24-2004, 01:55 PM
I'm thinking that it has something to do with modprobe.conf but I added lines in modprobe.conf, but got error messages. That (modprobe.conf/modules.conf) is new territory for me.
/etc/rc.d/rc.modules.......either uncomment or add them.
As to your Lilo warning......post your drive layout.
MMYoung
01-24-2004, 02:36 PM
Thanks for the rc.modules tip. I KNEW that, but my brain was in "vapor lock" over the other stuff.
Since I have posted I have deleted my /dev/hda12, where I had my "testing" Slackware installed to test the 2.6.1 kernel. So it ain't there no more. Thing is I type in "lilo" at a root terminal in my 2.4.22 Slackware on /dev/10 I don't get that error, but I did when I booted into 2.4.22 Slackware on /dev/hda12.
Be that as it may, and it may be moot at this point, here is the output of fdisk:
Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 7 56196 6 FAT16
/dev/hda2 8 7476 59994742+ f W95 Ext'd (LBA)
/dev/hda5 8 1313 10490413+ 7 HPFS/NTFS
/dev/hda6 1314 3165 14876158+ 7 HPFS/NTFS
/dev/hda7 3166 4471 10490413+ 83 Linux
/dev/hda8 4472 4602 1052226 82 Linux swap
/dev/hda9 4603 5386 6297448+ 83 Linux
/dev/hda10 5387 6692 10490413+ 83 Linux
/dev/hda11 6693 7476 6297448+ 83 Linux
MMYoung
01-24-2004, 04:42 PM
Hey JohnT,
You ain't going to belive this. But the sound problem turned out to be that my volumes had been reset to 0. Now why that happened is still a mystery, but after I set my volumes using KMix I rebooted, had sound and no errors. As I posted in the MEPIS forum here (http://www.mepis.org/node/view/1060) it's amazing what stress and 2 pots of coffee will do to your thinking.
Thank goodness for good ol' Hard Candy's clear thinking and levelheadedness.
Did I just say that?
Luckily I saved a copy of my .config file in case I ever want to give it another try.
Thanks,
MMYoung
j79zlr
01-24-2004, 05:57 PM
Originally posted by MMYoung
3. Have to start boot using vga="normal" in lilo.conf. My 2.4.22 kernel can be started using the vga="773"
Make sure that you compile the console framebuffer into the kernel, not on linux right now so I cant give you the exact location but I think its in the graphics section under VESA, something like
Console Drivers ->
VGA text console
Video mode selection support
Frame-buffer support ->
Support for frame buffer devices
VESA VGA graphics console
Use splash screen instead of boot logo
emactive
01-26-2004, 01:13 PM
i guess until i find a legit tutorial i'll stick with 2.4.22
av8or
01-26-2004, 01:17 PM
JohnT,
I must say, I like your sig! :D
JohnT
01-26-2004, 10:20 PM
Originally posted by MMYoung
Hey JohnT,
You ain't going to belive this. But the sound problem turned out to be that my volumes had been reset to 0. Now why that happened is still a mystery, but after I set my volumes using KMix I rebooted, had sound and no errors. As I posted in the MEPIS forum here (http://www.mepis.org/node/view/1060) it's amazing what stress and 2 pots of coffee will do to your thinking.
Thank goodness for good ol' Hard Candy's clear thinking and levelheadedness.
Did I just say that?
Luckily I saved a copy of my .config file in case I ever want to give it another try.
Thanks,
MMYoung
That sound level anomaly sometimes crops up when you've been messing with "alsa"
MMYoung
02-19-2004, 04:05 PM
I DID IT! I DID IT! I GOT 2.6.2 COMPILED IN SLACKWARE! D&#NNATION BREAK OUT THE CHAMPAGNE!
ALSA works! I can boot using the vga=771 line in lilo! NVIDIA drivers work. KDE 3.2 works. Network works! Can mount usb zip drive and cdroms. My usb mouse works (even the scroll wheel).
I just wish yall could see me right now just a smilin' like a possum eating saw briers and dancin' one of the goldurned ugliest jigs what any white man ever attempted.
Thanks to everyone on this thread for their input, couldn't a done it without you.
Man, life is sweet!!!!!!!!
Thanks folks,
MMYoung
riekon
03-22-2004, 04:03 PM
5. Next configure your system so it can boot the new kernel:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6
cp Sytem.map /boot/Sytem.map-2.6
rm /boot/System.map
ln -s /boot/System.map-2.6 /boot/System.map
pico -w /etc/lilo.conf
The last command will open the lilo configuration file in the pico text editor.
From here make a copy of the entry for the previous kernel making the following changes:
# Linux bootable partition config begins
Is it necessary to convert the bzImage name to vmlinuz?
Is it necessary to rm the already existent System.map and create a sym link if the vmlinuz/bzImage both have the same 2.6.x version attatched?
JohnT
03-22-2004, 06:25 PM
Originally posted by riekon
Is it necessary to convert the bzImage name to vmlinuz?
Is it necessary to rm the already existent System.map and create a sym link if the vmlinuz/bzImage both have the same 2.6.x version attatched?
*The bzImage consists of three parts
boot block: This is a 512 bytes with the signature 55aa in offset 510 and 511, respectively.
setup block: This is boot code that comprehends "gunzipping" what is following.
vmlinux: This is the code which is generated on the top level of the kernel source and can be disassembled with objdump. It's not necessary to rename but convenient if you have more than one kernel.
*To enable the old kernel upon boot if something goes wrong.
mv /boot/System.map /boot/System.map.old
mv /boot/vmlinuz /boot/vmlinuz.old
Edit Lilo to reflect these names
This way you have the option of booting either new or old kernel.