What's new

Linux Kernel Upgrade Help

t0rek

Wilson's Friend
OK guys. I know this has been already discussed here but I need some help. I'm running Slackware 9 with th 2.4.20 kernel, and I want to upgrade to 2.6.5 (this is the las stable version I think) I already downloaded the source so where I must start? I made a Google search but it only finded complicated and giant guides and some of them not for my distro... Could somebody give me a little bit of help or post a good link for an easy guide for Slakcware?
 

Slougi

New member
First you need to install module-init-tools. There should be a slack package available.

Then you need to download the source and untar it. The usual convention is to place the source in /usr/src/ and make a symlink /usr/src/linux to the source code directory. On my system /usr/src looks like this:

Code:
slougi@Gondolin slougi $ ls -l /usr/src/
total 7
lrwxrwxrwx   1 root root  11 Mar 15 18:44 linux -> linux-2.6.4
drwxr-xr-x  16 root root 808 Mar 11 13:57 linux-2.4.22-gentoo-r7
drwxr-xr-x  16 root root 624 Mar 22 05:13 linux-2.4.26_pre5-gentoo
drwxr-xr-x  16 root root 624 Mar 30 13:23 linux-2.4.26_pre6-gentoo
drwxr-xr-x  19 root root 784 Mar 19 22:08 linux-2.6.4
drwxr-xr-x  19 root root 776 Mar  8 17:11 linux-2.6.4-rc2
drwxr-xr-x  18 root root 632 Mar 22 05:26 linux-2.6.5-rc2

I know I really need to clean up there ;)

Next the source code must be configured. if you have a /proc/config file just copy that to /usr/src/linux/.config, if you hav /proc/config.gz do zcat /proc/config.gz > /usr/src/linux/.config.

Then enter the source dir and do make oldconfig, followed by make.

Alternatively if you cannot get the config this way, do a make menuconfig in the source dir and configure it manually, then save the config and make.

Next you must copy the appropriate files to /boot/ and configure the boot loader. Usually this means copying the bzImage or vmlinux file, and maybe the map file, and editing grub.conf in case of grub and lilo.conf in case of lilo.

As you can see updating the kernel is not the easiest thing to do :)
 

Slougi

New member
I believe slackware by default mounts /boot, or it is not on a separate partition. Not 100% sure though.
 
OP
t0rek

t0rek

Wilson's Friend
It's been a while uhmmm ... :p

Few months ago when I saw Slougi's post I found it very complicated then, I was busy with a lot of things...

Now, I understand this stuff better but I have a problem, I downloaded and installed module-init-tools because now I already now what is for (for the modules of course) But even after I installed it, I still receive the following error:

Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt


It still keeps coming (the error) when I try to run make modules_install.
After the reboot the kernel is always unable to load the modules. However it does boot up (but without the modules :( )

So my question is... what I'm doing wrong? I need help... again :blush: :p
 

smcd

Active member
You could just do it the easy way, download Slackware 10 ISOs and install the 2.6.7 kernel as it is under "/testing/" in Slackware, iirc. If you then wanted to go to 2.6.5, download the source... compile everything & install it.
 

jdsony

New member
A prime example of why I don't use Linux. It's great for people who like messing around with things a lot but for me it's just not very productive. I've had Redhat, Mandrake, and a couple other distros installed for a short time over the last few years and used it with the standard programs that came in the distro. When I got bored of that I tried to install 3D drivers for my video card...that was a little more complicated than I would have liked and even when I followed the steps I hit a road block. I also tried to install some emulators and BAAM! I find out I have to compile them myself. I'm not technically challenged just technically impatient.

I'm sure I'll find myself with Linux on here again in the near future and this time I'll probably get one step further into it.
 

Malcolm

Not a Moderator
Linux is easy, you just need to spend some time with it; I used Linux on-and-off with Windows for about 4 years before I decided Linux was the best option.
 
OP
t0rek

t0rek

Wilson's Friend
Yeah... I don't see the point of just give up... I'll keep trying and trying until I learn to use it... BTW, Malcolm could you help me with the kernel stuff?
 

smcd

Active member
t0rek set up an account for ssh & we can tunnel into your machine and do it all for you... :devil:
 

Malcolm

Not a Moderator
t0rek said:
Yeah... I don't see the point of just give up... I'll keep trying and trying until I learn to use it... BTW, Malcolm could you help me with the kernel stuff?

Download the latest stable kernel:
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.7.tar.bz2

Download the latest modules tools:
ftp://ftp.kernel.org/pub/linux/kernel/people/rusty/modules/module-init-tools-3.0.tar.gz

Code:
# move the archives to the proper locations
mv linux-2.6.7.tar.bz2 /usr/src
mv module-init-tools-3.0.tar.gz /usr/src

# go there ourselves ;)
cd /usr/src 

# untar the sources (this is gonna take a while)
tar -xjvf linux-2.6.7.tar.bz2
tar -xzvf module-init-tools-3.0.tar.gz

# make a symbolic link that the OS really, really needs
ln -sf linux-2.6.7 linux


cd modules-init-tools-3.0
# setup the modules to be able to process gzip'd modules
./configure --enable-zlib
# do all the compiling stuff
make
# this moves all the new binaries to the default install locations
make install
# this deletes all the compiled binaries, you don't need them here
# anymore
make clean

cd ../linux

# Enter the kernel configuration menus, curses style
make menuconfig
# if you're running XFree you can use:
# make xconfig <-- QT Based menu
# make gconfig <-- GTK Based menu
---{{{SETUP YOUR KERNEL}}}---

# compile everything then install the modules
make && make modules_install

# incase your /boot is on a seperate partition, 
# if you get an error here its cool :)
mount /boot 
# copy the kernel to the boot directory
cp -i arch/i386/bzImage /boot/

Now all you have to do is setup grub/lilo/boot-loaderX.

That *should* get you up and running :)

{edit}
forgot to add where you're suposta cp the bzImage too, i fix - ed
{/edit}
 
Last edited:

smcd

Active member
Malcom you could just run "make install," that'll do the bzImage copyin' too, can't remember if that sticks it in / or in /boot/ though, and it even updates lilo (at least on my slackware setup). :p
 

Malcolm

Not a Moderator
everyones setup is, generally, different; I try to keep the instructions as distro indenpendent as possible. On gentoo and RedHat make install borks-up :)
 
OP
t0rek

t0rek

Wilson's Friend
Well, on Slackware I know that by running "make install" it will do the bzImage copying and the lilo uptade.... Thanks Malcolm
 
OP
t0rek

t0rek

Wilson's Friend
Malcom, I still receive the "module init-tools" error, and my modules aren't gettting compiled? I pretty sure that I installed "module init-tools" What can't be wrong?
 

Malcolm

Not a Moderator
can you excute modprobe without errors, the only thing I can think of is your path variable isn't setup properly.

1) run modprobe -V, insmod -V, lsmod -V and lemme see the output
2) run echo $PATH and lemme see the output
3) stupid question, but are you running as root?
 
OP
t0rek

t0rek

Wilson's Friend
Well I'm running as root indeed... I don't get it... "modprobe" should be runned before or after the kernel is compiled?
 

Top