PDA

View Full Version : Two items to update



FA-MAS
04-03-2002, 02:54 PM
Hay, Im back at it. This time I want to upgrade my kernel (currently i run 2.4.5). Also I want to upgrade my glibc. I'm wanting to know which order i should do this in. Kernel or glibc first. Also, I need a little help installing a new kernel. I've already checked the Kernel HOW-TO. They seem make it out to be more complicated than it is (i know because i've read some forums) Any help would be appreciated. Boy, I'm glad I went with Slackware. I've learned so much more with this distro in the same ammount of time than I had with mandrake.

Later.

FA-MAS
04-03-2002, 03:06 PM
Acutally I re-read the kernel HOW-TO, and it actually seems straight forward this time, heh. But still, what order? Kernel or glibc?

FA-MAS
04-04-2002, 02:11 PM
29 views and only I reply?

Bern
04-07-2002, 02:02 PM
1) su to root and cd to /usr/src, make sure that linux/ is a symlink to linux-version/ (do "ls -al linux")
[code:1:4bd6e490d1]
bash-2.05$ ls -al linux
lrwxrwxrwx 1 root root 13 Apr 6 14:26 linux -> linux-2.4.18//
bash-2.05$
[/code:1:4bd6e490d1]
2) Download the latest kernel from your nearest mirror (http://www.kernel.org/mirrors/) (2.4.18 at the time of typing) to your home directory.
3) Extract the kernel to /usr/src/linux-2.4.18
4) Create a symlink pointing to linux-2.4.18/ (do "rm linux && ln -s linux-2.4.18/ linux")
5) Copy the config from your previous working kernel (for a stock slack kernel do "cp linux-2.4.5/.config linux/.config")
6) Edit your /etc/lilo.config - this is because with slack you can do a make install on the kernel and we need to have lilo.conf prepared first. Add the following under the existing kernel entry,
[code:1:4bd6e490d1]
#old linux
image = /vmlinuz.old
root = /dev/hd?? #replace /dev/hd??
label = slack.old
read-only
[/code:1:4bd6e490d1]
7) Change to the new kernel directory ("cd linux")
8) "make mrproper". Only do this if you want to recompile an existing kernel.
9) "make menuconfig". This will load your old .config, make any changes and save.
10) "make dep". Checks dependencies.
11) "make clean". Removes old o files.
12) "make bzImage". Build it
13) "make install". This is only for slack, make sure you completed step 6 first.
14) "make modules".
15) "make modules_install"
16) Reboot and test.
17) Recompile and install any third party kernel modules you need, nvidia drivers, lm_sensors etc.
18)Enjoy :)

FA-MAS
04-10-2002, 03:22 AM
I understand it all except for step # 8. What is meant by "Only do this if you want to recompile an existing kernel"

I mean I have an existing kernel (2.4.5) Which is stock, but it works great for me. I would like to upgrade to kernel 2.4.18.

I would like to not exclude anything from the new kernel that I needed. Would step 8 only affect my older kernel, such as I wanted to keep the existing kernel, but add some elements?

ne0z
04-10-2002, 04:00 AM
In step 8 Bern is referring to recompiling your existing kernel with a different config or if you have problems. Since you are updating your kernel you do not need this step.

FA-MAS
04-10-2002, 04:05 AM
Thanks. That is what I wanted to know. I'm going to do this tonight. Wish me luck.

Later

Bern
04-10-2002, 08:57 AM
Dont forget do do step six!

FA-MAS
04-10-2002, 11:39 PM
Ok, I did every step just like you said Bern. I can still boot the old kernel and have all my functionality. But, I can now also boot the new kernel. I'm missing a couple of things. When I boot, I see that modprobe is trying to find modules for tulip (the module my ethernet card needs) as well as ppp and a few others.

Should I have done something in menuconfig? When I ran it, it stated it used the defaults from my linux/.config. Which were copied over from my old kernel.

I've tried modprobe myself and it doesn't find tulip or the others. Also I tried insmod tulip.o and It didn't know where to load that module from.

What do you think I should do?

Bern
04-11-2002, 06:33 AM
When you were going through the menuconfig did you press M for the tulip to make it a module or did you press Y?
You can check back by opening the .config file in a text editor and scroll down to 10/100 pci section, a M next to the tulip entry means there should be a module and a Y means that support is compiled into the kernel.

FA-MAS
04-11-2002, 08:01 AM
I left it as the default. I thought it pulled what it needed to complie into the kernel from the linux/.config which I copied from linux-2.4.5/.config to linux/.config. I did look under the ethernet controllers in menuconfig, I didn't see anything that specifically said tulip. Maybe I'll attempt this process:

copy the .config file from the previous source directory to the new source tree

make oldconfig
make dep
make bzImage
make modules
make modules_install

We'll see, wish meh luck.

Bern
04-11-2002, 10:32 AM
That will work, dont forget to do "make mrproper" first if your going to recompile the same kernel, and copy over the .config after as mrproper will remove it and leave you with a completly clean source tree.

FA-MAS
04-11-2002, 01:08 PM
Ok, that didn't go well. I got alot of unresolved symbols. Although I did do "make clean" after I did "make dep" I just forgot to include it in my previous post.

My problem is that when I run "make menuconfig", I don't know what half of the stuff is. I'm really just looking to update the kernel, but keep the config the same. I don't want to add anything new. I still want what was loading in the kernel to do so, I also want what was loading as module to continue doing so. I just don't know how.

Bern
04-11-2002, 01:24 PM
cd to the 2.4.18 kernel source and do "make mrproper" first, this will clean the entire tree including the kernel you built first, then copy the old .config etc.

FA-MAS
04-11-2002, 01:31 PM
So you're saying to

1) Extract the kernel to /usr/src/linux-2.4.18

2) Change to the new kernel directory ("cd /usr/drc/linux-2.4.18")

3) "make mrproper" This will clear the source tree

4) Copy the config from my previous working kernel (for a stock slack kernel do "cp linux-2.4.5/.config linux-2.4.18/.config")

5) "make menuconfig" This should pick up how I had my previous kernel setup. And I don't want to change anything if that's the case. So I just exit and let it save the kernel.

6)make dep
6a) make clean
7) make bzImage
8) make modules
9) make modules_install

and then re-boot

I'm gonna try now

Bern
04-11-2002, 01:45 PM
Originally posted by FA-MAS
[B]So you're saying to

1) Extract the kernel to /usr/src/linux-2.4.18
Yes.

[b]
2) Change to the new kernel directory ("cd /usr/drc/linux-2.4.18")
First, you should make a sym link called linux that points to the kernel source you want to compile, you might need to rename the stock kernel from linux to linux-2.4.5 first and then do "ln -s linux-2.4.18 linux" to create the link.

[b]
3) "make mrproper" This will clear the source tree
Only do this in a kernel source that you've already made a kernel from, not needed for a fresh source.

[b]
4) Copy the config from my previous working kernel (for a stock slack kernel do "cp linux-2.4.5/.config linux-2.4.18/.config")
Yes.

[b]
5) "make menuconfig" This should pick up how I had my previous kernel setup. And I don't want to change anything if that's the case. So I just exit and let it save the kernel.
Yes.

[b]
6)make dep
6a) make clean
7) make bzImage
Don't forget you can do "make install" in slack with a properly prepared lilo.conf

[b]
8) make modules
9) make modules_install

and then re-boot

I'm gonna try now
ICQ me if you need more in depth info.

FA-MAS
04-11-2002, 02:28 PM
Still those unresolved symbols. Here's what I'm gonna do. I'm gonna re-install from scratch. Just so that I have a clean install. It will be using kernel 2.4.5. Then I'll ICQ you and maybe you would help me walkthough it?

Bern
04-11-2002, 03:04 PM
Go for it :)

FA-MAS
04-26-2002, 01:19 PM
w00t! I fianlly got it the way I want. Here's what I did. All logged in as root.

1. went to kernel.org and got the full source
2. cd to /usr/src, removed the linux symlink
3. Extract the kernel to /usr/src/linux-2.4.18
4. Re-created the symlink pointing linux to linux-2.4.18/
5. Went to ftp.slackware.com and downloaded the .config file for their bare.i bootdisk based off of kernel 2.4.18 <--this was my edit, it said 2.5.18

6. Copied the .config to the new kernel tree
7. Ran "make oldconfig", It ran through clean because the slackware creator had already set it up the way I wanted

7. Ran "make dep"
8. Ran "make clean"
9. Ran "make bzImage"
10. Ran "make install", of course I edited my lilo.conf. I can boot both kernels now.

11. Ran "make modules"
12. Ran "make modules_install"
13. Re-booted

And it didn't blow up and is working for me flawlessly.

Bern
04-26-2002, 01:28 PM
Don't you just love it when a plan comes together :)

FA-MAS
04-26-2002, 02:03 PM
Yes, I do. My next goal is to run "make menuconfig" and write down every single option that is in there, and then determine what they are, and include or exclude them. And of course write document for reference.

Thanks and later.

Bern
04-26-2002, 07:02 PM
The kde control center has a kernel config front end under System---->Linux Kernel Configurator, when you click on an option it displays the help message for that option.

FA-MAS
04-26-2002, 11:42 PM
I don't have kde yet, which brings me to my next question. What version do you think I should install?

Bern
04-27-2002, 06:38 AM
Kde3 is the latest, you'll need qt3 as well, just grab the slackware 8 packages from your nearest kde mirror.