LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-24-2005, 01:27 PM   #1
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Rep: Reputation: 0
Compiling kernel from vanilla sources - suse 9.2


Hi,

first I must say I am not any experienced SUSE user/admin, but my friend asked me to help him with his SUSE 9.2 notebook (I use Debian and/or Gentoo on my machines).

Currently the latest official kernel package for SUSE 9.2 is based on the 2.6.8 kernel while there is a 2.6.11.5 kernel available from kernel.org. I compiled new kernel (and generated the initrd) from 2.6.11.5 sources, using the config from SUSE kernel 2.6.8-24.11-default (extracted from /proc/config.gz). The machine starts up with the new kernel, everything seems to work fine but the system reports a few error messages during the startup:
Code:
...driver failed to load pci_enable_device()...
<3>swsusp: suspend partition has wrong signature?
PM: resume from hard disk failed
Trying to move old root to /initrd ... failed
...the ioctl TIOCGDEV is not known by the kernel...
I don't think any of these errors is critical, but I'd like to get rid of them.
All these problems are probably because of some kernel patches missing.

Finally, here is my question:
Is there any way to find what patches are used in the SUSE kernels? I would like to patch the new kernel to be 100% compatible with the official SUSE kernels. Any help would be much appreciated. Thanks.

Lukas.
 
Old 03-24-2005, 01:38 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Is there any way to find what patches are used in the SUSE kernels? "

Here are the SuSE kernel patches:

http://search.belnet.be/packages/sus...ernel-patches/

--------------------------
Steve Stites
 
Old 03-24-2005, 01:39 PM   #3
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
Quote:
I compiled new kernel (and generated the initrd) from 2.6.11.5 sources, using the config from SUSE kernel
Nope, there are options unavailabe in older kernels plus SuSE kernel is highly customized, so several options from SuSE kernel are not available in vanilla.

1. vanilla kernel
2. get submount (if you want SuSE-like automount, for SuSE is better than supermount) from http://sourceforge.net/projects/submount/. The latest version is 0.9
You can install submount only from running new kernel

If you want to try once more then go to .../linux-2.6.11.5 and issue:
#make clean && make proper

Now, configure kernel
If you want to use original config file as a guide open it in your favorite editor, but dont use is as a .config file

While configuring kernel, get rid of all unnecessary stuff, otherwise your new kernel will eat a lot of memory. Remember that although customized default SuSE kernel has a lot of stuff you don't need.


Quote:
"Is there any way to find what patches are used in the SUSE kernels? "
Don't use old patches for kernel 2.6.8 in kernel 2.6.11.x that is quite obvious.

Last edited by broch; 03-24-2005 at 01:42 PM.
 
Old 03-24-2005, 03:25 PM   #4
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Original Poster
Rep: Reputation: 0
OK, I'm gonna try doing my own configuration. I thought I could save some time using the SUSE .config. Also it is not my computer so I don't know all the hardware details to choose all correct modules. Anyway, I'm gonna try that. I'll let you know how/if it works

I am pretty surprised SUSE doesn't release the kernel updates more frequently. My main distro is Gentoo and it has new kernel package (with gentoo specific patches) just a few days after the kerel release...

Thanks for your help.

Lukas.
 
Old 03-24-2005, 05:42 PM   #5
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
well, gentoo is constant experiment that sometime works sometime something is broken
SuSE is stable.
Whatever is you distro this is linux so procedure is mainly the same:
run
#lspci
next run:
# cat /proc/cpuinfo

the above will give you hardware information you need for kernel config

Configure kernel next run something like:

export CHOST=“i686-pc-linux-gnu”
export CFLAGS="-march=i686 -O3 -funroll-all-loops -funit-at-a-time -fpeel-loops -ftracer -funswitch-loops -pipe -fomit-frame-pointer -fweb"
export CXXFLAGS="${CFLAGS}"
export MAKEOPTS="-j2"

assuming that this is Intel. Adjust for AMD or 64-bit. Remember that -O3 should be avoided on 64-bit because either will not compile or what worse wil kompile bad. If plenty of RAM and speedy CPU you can try "-j6"

copy, configure GRUB and after restart to the new kernel install submount. That is all. Pretty simple.
 
Old 03-24-2005, 06:27 PM   #6
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Original Poster
Rep: Reputation: 0
Great. Thanks.

It is an older Celeron (P3) running at 1GHz, with just 256MB RAM, so I think I should set MAKEOPTS="-j2".
gcc could be set -march=pentium3 -O2 (you say -O3, but I've heard that it can make some apps unstable...???)

Yes, you're right that stability is one of the main goals of SUSE. I have planned to switch approx. 20 office PCs in our company from Windows to Linux, and couldn't decide which distro to choose. Maybe this little excercise with my friend's SUSE notebook would ensure me that SUSE could be the right choice. I must say that I like it very much, especially all the YaST tools work fine

Quote:
Originally posted by broch
If you want to try once more then go to .../linux-2.6.11.5 and issue:
#make clean && make proper
"make proper"? You mean "make mrproper"?

Thanks again for your help.

Lukas.

Last edited by lukas_svoboda; 03-24-2005 at 06:32 PM.
 
Old 03-25-2005, 04:55 PM   #7
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Original Poster
Rep: Reputation: 0
OK. It seems to work, although I still neeed to make some fine tuning in the kernel configuration. Thanks for helping.
 
Old 03-25-2005, 05:46 PM   #8
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
yes, that was "mrproper" not "proper" sorry for the mistake.
In case of laptop with limited RAM, I would really trim down kernel options to the stuff needed now. Is really ipv6 needed? Is he using NFS or samba, does he needs all fs compiled? And so on and so for.
you can compile kernel only with -O3 that might be helpful, the rest, he can compile with -O2. However there isnothing wrong with kernel -O2 obviously.
Good luck with optimizations.
 
Old 03-25-2005, 07:30 PM   #9
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Original Poster
Rep: Reputation: 0
Hi, I'm back again

You mentioned IPv6, which is the thing I want to ask about. Of course IPv6 is not needed, but the SuSEfirewall2 seems to require it:
Code:
SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.
FATAL: Module ip_conntrack not found.
FATAL: Module ip6table_filter not found.
FATAL: Module ip6table_manage not found.
So I added the IPv6 netfilter support to the kernel, all errors vanished except Module ip_conntrack not found. The IPv6 version of this module is not present in the vanilla sources, the original SuSE 2.6.8-24.11-default has it as module using CONFIG_IP6_NF_CONNTRACK=m .config setting. I cannot find this option in the vanilla sources - SuSE probably adds it using a kernel patch.

Can I totally remove the SuSEfirewall2? It is not needed because the notebook runs in a LAN that is firewalled.
 
Old 03-25-2005, 09:55 PM   #10
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
Sure. you can remove SuSEfirewall2, however, because this is laptop, then for mobile computers is better to have firewall. The errors of SuSEfirewall2 are benign, you don't have ipv6 tha is all. You can try to run
echo "alias net-pf-10 off" >> /etc/modprobe.conf
echo "alias ipv6 off" >> /etc/modprobe.conf

additionally try:
/etc/sysconfig/SuSEfirewall2
FW_IPv6=""
change to
FW_IPv6="no"
Above should stop SuSEfirewall2 from trying to set any ipv6 rules.
eventually if these errors really gets on your nerves edit
/sbin/SuSEfirewall2 and delete from line:
load_module ip_tables ip_conntrack ip_conntrack_ftp ip_nat_ftp ip6table_filter ip6table_mangle

text about ipv6 so it will look like:
load_module ip_tables ip_conntrack ip_conntrack_ftp ip_nat_ftp

Maybe there is a trick to get rid of this one too, however I never bothered to lokk for possible resolution: The above warning is true even if ipv6 is enabled.


If you will have problems with SuSEfirewall2 then use Yast -> Security and Users -> Firewall and select option "Stop and remove from boot"

While experimenting with a new kernel, try grsecurity patch or LIDS, as far as I know SElinux under SuSE may breake some things so it should be turned off.

Hope that it will help a little.

Last edited by broch; 03-25-2005 at 10:16 PM.
 
Old 03-26-2005, 03:56 AM   #11
lukas_svoboda
LQ Newbie
 
Registered: Mar 2005
Distribution: debian, gentoo, suse
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by broch
...Hope that it will help a little.
A little? LOL. You helped me a lot! I really appreciate it.
I'll be working on it tonight.

Lukas.
 
Old 03-26-2005, 07:18 AM   #12
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
Quote:
Maybe there is a trick to get rid of this one too, however I never bothered to lokk for possible resolution: The above warning is true even if ipv6 is enabled.
This is irrelevant sentence, it was quite late sorry.

If you want to try gresecurity, the patch is here:
grsecurity patch

Pay attention to the options that may kill X.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vanilla sources, huh? why? Aristides Debian 4 11-09-2005 12:00 PM
vanilla sources, huh? why? Aristides Linux - Software 1 11-08-2005 01:11 PM
compiling kernel sources joshknape Mandriva 17 09-16-2005 08:33 PM
How many diff methods of Installing, Compiling Kernel Sources are there? DriveMeCrazy Red Hat 6 05-10-2004 02:53 PM
Suse 9.0 + Yast + Kernel Sources ferreter Linux - Newbie 5 01-28-2004 09:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 03:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration