MandrivaUsers.org : Quick and Easy Kernel Compile Upgrade - MandrivaUsers.org

Jump to content

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Quick and Easy Kernel Compile Upgrade Mandriva 2006

#1 User is offline   ianw1974 

  • Platinum
  • Icon
  • View blog
Group:
Admin
Posts:
13,403
Joined:
09-March 05

Posted 10 March 2006 - 08:16 PM

Whilst this has been done for Mandriva 2006, it can also apply for previous versions. There's a kernel faq in the faq section of this board, however, I decided to write this as a quick and easy way to upgrade without actually having to do much.

Normal kernel versions for Mandriva 2006 are 2.6.12.12mdk standard, up to 2.6.12.17mdk as of present. Some people have wondered what to do if you need to get something working/compiled that requires a later kernel. I also heard people mention problems trying to do manual kernel upgrades on Mandrake/Mandriva due to the way they are normally set up. So I figured, I'll give it a go and see if it's really that bad. As it happens, no, it worked a treat :P

First, I downloaded 2.6.15.6 from kernel.org (this is the latest as of todays date). Download the bz2, it's 10MB smaller than the GZ. This was saved to my ~/Download directory. In my example, this refers to /home/ian/Download. First off, you need to extract it and update the symlink, so:

su (supply root password when prompted)
cd /usr/src
tar xvf /home/ian/Download/linux-2.6.15.6.tar.bz2
rm linux
ln -s linux-2.6.15.6 linux


Now, you've unpacked it, this is where we issue a few commands and then sit back and wait for about 30 minutes or so. Kernel compilation can take some time, especially if your machine is low spec. Mandriva's kernels are mostly modular, and for this, we're going to keep it the same. First, check that you can see files in your /boot directory. Specifically, the /boot/config file which is a symlink to your current kernel config file. If you can see this, then this makes it real easy. Why it makes it easy is that your current config file will be read by the kernel, therefore using all the settings from your existing Mandriva kernel. That way you don't have to worry about building a kernel that misses something and causes problems later. So, the next steps we do are:

Please note, if you want the Mandriva Bootsplash, make sure you check the Bootsplash section towards the bottom of this post. If you continue as below, the kernel will be compiled without bootsplash support.

make mrproper (this clears any previous kernel compile, so for first time round, not really required)
make menuconfig (when this loads, just tab to exit, and then save the configuration


and that's it, your kernel config is exactly the same as your current 2.6.12 Mandriva kernel.

Compiling the kernel

Now, we need to compile it. I normally just add it all on one line, so that you just leave it go and it'll finish and complete automatically for you. Below, I've listed the options you can do in 3 stages, and then all in one:

make
make modules_install
make install


this means you have to keep checking after each stage. However, this one command will do it all for you:

make && make modules_install && make install


The first part compiles the kernel and modules. The second part installs the modules and the third part copies the kernel into place, creates the initrd image that Mandriva requires and copies the system.map, kernel.h and config files into the /boot directory. The contents of my directory is listed as follows:

[ian@elise ~]$ ls -l /boot
total 5404
-rw-r--r--  1 root root	 512 Jan 13 22:01 boot.0300
lrwxrwxrwx  1 root root	  19 Mar 10 20:52 config -> config-2.6.12-17mdk
-rw-r--r--  1 root root   71358 Feb 13 22:27 config-2.6.12-17mdk
-rw-r--r--  1 root root   65014 Mar 10 20:47 config-2.6.15.6
drwxr-xr-x  2 root root	 120 Jan 13 21:45 grub/
-rw-------  1 root root  234244 Feb 25 15:01 initrd-2.6.12-17mdk.img
-rw-r--r--  1 root root  210860 Mar 10 20:47 initrd-2.6.15.6.img
lrwxrwxrwx  1 root root	  23 Feb 25 15:01 initrd.img -> initrd-2.6.12-17mdk.img
lrwxrwxrwx  1 root root	  27 Mar 10 20:52 kernel.h -> /boot/kernel.h-2.6.12-17mdk
-rw-r--r--  1 root root	 695 Feb 25 16:06 kernel.h-2.6.12-17mdk
-rw-r--r--  1 root root	 695 Mar 10 20:49 kernel.h-2.6.15.6
-rw-------  1 root root  343552 Mar 10 20:47 map
lrwxrwxrwx  1 root root	  15 Jan 13 22:02 message -> message-graphic
-rw-r--r--  1 root root  246542 Mar 10 20:47 message-graphic
-rw-r--r--  1 root root	 116 Jan 13 22:02 message-text
lrwxrwxrwx  1 root root	  23 Mar 10 20:52 System.map -> System.map-2.6.12-17mdk
-rw-r--r--  1 root root  639466 Feb 13 22:27 System.map-2.6.12-17mdk
-rw-r--r--  1 root root  622211 Mar 10 20:47 System.map-2.6.15.6
-rw-r--r--  1 root root	 256 Jan 13 22:01 uk.klt
lrwxrwxrwx  1 root root	  20 Feb 25 15:01 vmlinuz -> vmlinuz-2.6.12-17mdk
-rw-r--r--  1 root root 1607727 Feb 13 22:27 vmlinuz-2.6.12-17mdk
-rw-r--r--  1 root root 1448482 Mar 10 20:47 vmlinuz-2.6.15.6


I didn't bother to update my symlinks for config, etc, etc. I could do, but for now, I've installed it as it. The last command also modified my lilo configuration and created an entry called "26156". So my main entries allow me to boot my standard Mandriva kernel, and the last one allows me to boot my newly created kernel. Updating your symlinks is only required if you have implicitly pointed your lilo/grub configuration to look at the symlinks instead of the actual kernel version itself. My new kernel is functioning correctly without having to do this.

Mandriva Bootsplash

The Mandriva bootsplash will no longer be present, but this is only a minor thing. A patch can be applied to get it back. Therefore, you need to change the steps from "make menuconfig". First, you need to download from here:

ftp://ftp.openbios.o...1.6-2.6.15.diff (info provided in post #8 below by mandrivauser ceco)

The steps to enable are as follows:

cd /usr/src/linux
patch -p1 < /path/to/bootsplash-3.1.6-2.6.15.diff
make menuconfig
Device Drivers --> Graphics Support
Scroll to bottom and select Logo Configuration
Disable Bootup Logo
Select Bootsplash Configuration
Enable Bootup Splash Screen


exit and choose save option, then continue using the compile steps as shown above. If using later kernel version in the future, then check for a later version of the bootsplash here: http://www.bootsplash.org/kernel.html

Additional posts below list success stories as well as problems encountered and how to resolve them. Please read all the below so that you can make sure your kernel migration is a success.
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

#2 User is offline   josk 

  • casual
  • Icon
Group:
Members
Posts:
66
Joined:
23-June 04

Posted 10 March 2006 - 09:34 PM

Thanks!
0

#3 User is offline   scarecrow 

  • Platinum
  • Icon
Group:
Platinum
Posts:
5,086
Joined:
16-February 05

Posted 10 March 2006 - 10:50 PM

I wouldn't compile my kernel as root, it doesn't sound like a good idea. Maybe in a fakeroot environment, but why not as plain user?

This post has been edited by scarecrow: 10 March 2006 - 10:51 PM

0

#4 User is offline   tyme 

  • Generic Geek Unit
  • Icon
  • View blog
Group:
Platinum
Posts:
13,284
Joined:
24-October 02

Posted 10 March 2006 - 11:15 PM

Plain user wouldn't have the rights necessary for writing to the directories. I've never heard of issues compiling a kernel as root, and most everyone does it in this manner. I don't know of any guides that suggest doing it otherwise, or any reasons to do such.

Note that these directions are for compiling from pure source, not rebuilding a source rpm.
Posted Image
Posted Image
{Gu}
0

#5 User is offline   Ceco 

  • casual
  • Icon
Group:
Members
Posts:
50
Joined:
22-February 06

Posted 12 March 2006 - 04:18 PM

What about multimedia kernels? I've seen that there is "kernel-multimedia-2.6.14-0.mm.7mdk-1-1mdk.i586.rpm" (http://www.mde.djura.org/2006.0/RPMS/kernel-multimedia-2.6.12-12.mm.13mdk-1-1mdk.i586.rpm) and kernel-2.6.14.1mdk-1-1mdk.i586.rpm (ftp://mandrake.contactel.cz/Mandrakelinux/devel/cooker/i586/media/main/kernel-2.6.14.1mdk-1-1mdk.i586.rpm)
Which one to use? Which is better and what is the difference?
0

#6 User is offline   uralmasha 

  • frequent
  • Icon
Group:
Members
Posts:
200
Joined:
14-April 05

Posted 12 March 2006 - 04:40 PM

I would also recommend reading the kernel build how-to on digital hermit site. It contains generic instructions, but is worth reading anyway.

If I remember correctly, that how-to also explains how to patch a vanilla kernel with, e.g., "multimedia" patch. -mm patches are, according to kernel.org, "more experimental".
0

#7 User is offline   sjaglin 

  • Stef@Chipping-Sodbury
  • Icon
Group:
Members
Posts:
339
Joined:
24-May 05

Posted 12 March 2006 - 06:36 PM

Hi Ian
All done and it worked fien, only problem , as expected I lost my nvidia drivers because I suppose the kernel-source does not match the kernel. Sorry, I just went back to init3 and relaunched the NV installer and all is now in order, I will now try my software to see if all is ok. :thumbs:

uname -a :
Linux linux-box 2.6.15 #1 Sun Mar 12 17:58:03 GMT 2006 i686 AMD Athlon™ XP 3000+ unknown GNU/Linux

I didn t need to touch Lilo, it was uodated automatically.

Maybe a stupid question but do I leave my rpm update on automatic? Will the updates that I get from ftp servers be understood by the new Kernel or do the assume I still have the 2.6.12?
:mellow:
Stef

This post has been edited by sjaglin@yahoo.co.uk: 12 March 2006 - 07:41 PM

My ECO House!
Asus Eee PC1000H Dual boot Mandriva 2009.1 and xp
QNAP 109 NAS
Interest : Solar Energy, Linux, Photography...
Posted Image
0

#8 User is offline   Ceco 

  • casual
  • Icon
Group:
Members
Posts:
50
Joined:
22-February 06

Posted 12 March 2006 - 11:21 PM

View Postianw1974, on Mar 10 2006, 08:16 PM, said:

The Mandriva bootsplash will no longer be present, but this is only a minor thing. I believe a patch can be applied, will update when I've checked/tested to see if the patch sorts it out.


There is a realised patch for 2.6.15.You can download it from here:
ftp://ftp.openbios.o...1.6-2.6.15.diff
I've tested it and it works!

To apply the patch follow this instructions:
cd /usr/src/linux
patch -p1 < /path/to/bootsplash-3.1.6-2.6.15.diff

And then u have to change your configuration of the kernel with "make xconfig" or "make menuconfig" if its not changed.U should enable "Frame-Buffer support" and select "VESA VGA graphics console" in the Console Drivers section.You also should disable "Use boot logo" and enable "Use splash screen".

This post has been edited by Ceco: 12 March 2006 - 11:37 PM

0

#9 User is offline   iphitus 

  • Arch Linux Developer, Rocket Scientist
  • Icon
  • View blog
Group:
Global Moderator
Posts:
3,868
Joined:
16-April 03

Posted 13 March 2006 - 12:13 AM

Or just patch it with ArchCK... http://iphitus.loudas.com/archck.php

end plug :P
0

#10 User is offline   ianw1974 

  • Platinum
  • Icon
  • View blog
Group:
Admin
Posts:
13,403
Joined:
09-March 05

Posted 13 March 2006 - 07:08 AM

It won't automatically update your kernel. What might be best to stop kernel-source upgrades is to remove mandriva kernel-sources, and just leave the 2.6.15.6 kernel source in place. That way it'll never attempt to update the kernel source, and you can do all this manually at your leisure.

Note, that if for example 2.6.16 came out, you could download the source, and compile in the same manner, since it would read your existing config. To make sure that this reads your 2.6.15.6 config, make sure symlinks are updated in /boot so that they point to 2.6.15.6 and not 2.6.12.17 or whatever you have installed with Mandriva.

You will not be able to remove your Mandriva 2.6.12.xx kernel, I just tried on my test system and it said it will break your system :D

But it's there as a fall back in case of any probs using 2.6.15.6. Enjoy :beer:
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

#11 User is offline   ianw1974 

  • Platinum
  • Icon
  • View blog
Group:
Admin
Posts:
13,403
Joined:
09-March 05

Posted 13 March 2006 - 10:00 AM

Quote

There is a realised patch for 2.6.15.You can download it from here:
ftp://ftp.openbios.o...1.6-2.6.15.diff
I've tested it and it works!

To apply the patch follow this instructions:
cd /usr/src/linux
patch -p1 < /path/to/bootsplash-3.1.6-2.6.15.diff


And then u have to change your configuration of the kernel with "make xconfig" or "make menuconfig" if its not changed.U should enable "Frame-Buffer support" and select "VESA VGA graphics console" in the Console Drivers section.You also should disable "Use boot logo" and enable "Use splash screen".


Yes, this works. To find the options in case you're unsure of where they are, this is how I did it:

make menuconfig
Device Drivers --> Graphics Support
Scroll to bottom and select Logo Configuration
Disable Bootup Logo
Select Bootsplash Configuration
Enable Bootup Splash Screen


exit and save, and then this is when you compile the kernel using the commands I listed before.

I've not used the archck link iphitus posted, as I'm unsure of whether this relates just to the "arch" distro, or is generic.
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

#12 User is offline   iphitus 

  • Arch Linux Developer, Rocket Scientist
  • Icon
  • View blog
Group:
Global Moderator
Posts:
3,868
Joined:
16-April 03

Posted 13 March 2006 - 10:47 AM

I wouldnt have posted if it wasnt generic, there would be no point in doing such. By their nature though, kernel patches and patchsets are mostly distro inspecific.

The poor name is a hangover from when I used to solely make it for the Archie liveCD. It's branched out since and is used by a heap of Gentoo, Arch, Fedora, and other users....

iphitus
0

#13 User is offline   ianw1974 

  • Platinum
  • Icon
  • View blog
Group:
Admin
Posts:
13,403
Joined:
09-March 05

Posted 13 March 2006 - 10:59 AM

Ah OK, cool :P

Two patches for anyone to use now! :D
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

#14 User is offline   Ceco 

  • casual
  • Icon
Group:
Members
Posts:
50
Joined:
22-February 06

Posted 13 March 2006 - 03:48 PM

After installing 2.6.15.6 there is an error while boot:
Mounting local filesystems: mounting special device: mount: /dev/hdc does not exist!

But /dev/hdc exist!!! How to fix this?
Edit: I've returned to the old 2.6.14-mm because of this :(

This post has been edited by Ceco: 13 March 2006 - 04:34 PM

0

#15 User is offline   ianw1974 

  • Platinum
  • Icon
  • View blog
Group:
Admin
Posts:
13,403
Joined:
09-March 05

Posted 14 March 2006 - 06:53 AM

Check your /etc/fstab. If it mentions supermount, then this could be the problem. My cd-rom's are configured for "auto" and therefore mount no problems with 2.6.15.6. When you compiled 2.6.15.6 were you in your 2.6.14 mm kernel? If so, this could also explain why.

This howto was written on the basis that you have a Mandrake/Mandriva kernel installed. A stock kernel that has settings relevant to Mandrake/Mandriva. On this basis it works. I've no idea how your 2.6.14mm kernel has been configured, so it could be you missed a setting somewhere, which is why you are now experiencing problems. If you can, I would suggest you boot into a Mandrake/Mandriva kernel, and then rerun the compile, making sure that your /boot/config symlink is pointing to a Mandrake/Mandriva config file.

The only problem I've found so far is with the mandi service failing, probably due to some patch applied to the kernel. This isn't required anyway, as shorewall will work perfectly well without it. It just means if you configure using mcc, you have to disable the interactive option and when prompted to install mandi-ifw to click cancel, and just install shorewall after this.
Ian Walker
Juniper Networks Certified Internet Associate (JNCIA-FWV, JNCIA-IDP and JNCIA-SSL)
Aventail Certified Professional (ACP)
Certified Trend Micro Engineer

Linux Systems Limited is partnered with Red Hat Linux.

Posted Image2 x systems installed with Mandriva 2010 x86_64 (1 @ Home, 1 @ Work)

Posted Image My Linux Solutions | My Business Website
0

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic



1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users