Kernel Related Questions

1. How can I upgrade my kernel with SuSE compiled ones ?
2. Where can I see which patches to apply to SuSEify my brand new kernel downloaded from kernel.org ?
3. SuSE 8.0 does not shutdown it stops at "Runlevel 0 has been reached"
4. How to compile a module for the SuSE kernel ?
5. What is martian source and why I'm getting them ?

1. How can I upgrade my kernel with SuSE compiled ones ?

On a pure SuSE Linux system (i.e. no guarantees if you changed lilo.conf or did other things):

  rpm -Uvh k_(deflt|smp).rpm
  mk_initrd
  lilo
  reboot
	    

To create from sources:

  rpm -Uvh kernel-sources*.rpm
  cd /usr/src/linux
  [edit Makefile and set EXTRAVERSION, if you like]

  # "cloneconfig" uses data from /proc/config.gz
  # you may have to say Y/N/M for options new in the new kernel
  #   sources, i.e. not found in /proc/config.gz
  make cloneconfig dep clean bzlilo modules modules_install

  mk_initrd
  lilo
  reboot

2. Where can I see which patches to apply to SuSEify my brand new kernel downloaded from kernel.org ?

Try looking on the ftp site in the people directory...look in mantel. You should find a complete list of patches....or at least he use to keep them there.

3. SuSE 8.0 does not shutdown it stops at "Runlevel 0 has been reached"

Do a
uname -a
      
if you see something like 64GB smp in it, then go to YAST and select to install the standard SUSE kernel instead of the SMP kernel.

  1. Fired up Install/Remove module of YAST2 (or the Las Vegal Girl...whatever you wanna call it)

  2. In the 'Group' List box, select System/kernel

  3. select k_deflt and unselect k_smp (YAST2 should display a 'd' right next to k_smp and should display an 'X' right next to 'k_deflt'

  4. Let it install it

    1. Run mk_initrd and lilo again before step five.

  5. Reboot

  6. Your computer will be a complete screw up at this time. Nothing will run. Your computer will turn into a worthless piece of junk sitting on your desktop not being able to do anything whatsoever. At this step, call 1-800-BILL-GATES to fix the problem.

  7. BTW, when I carried Step 1 - 5, everything was OK. You may or may not encounter Step 6.

4. How to compile a module for the SuSE kernel ?

Before you compile your module you must prepare the sources, so they reflect the running kernel However, a lot of information can be found in /usr/src/linux/Documentation

  1. 	    cd /usr/src/linux
    	  
    self explanatory :)

  2. 	    make mrproper
    	  
    Cleans out the source tree, removing bits from previous compiles that may be in there. Also removes old config files.

  3. 	     make cloneconfig
    	  
    This is a SuSE hack, as far as I'm aware. This reads the configuration from the running kernel, using the dynamic file /proc/config.gz, and uses that to create an identical configuration for the sources. This ensures that you can compile a kernel identical to the one SuSE supplies. Most people use that as a starting point for experimenting with kernel options.

  4. 	    make dep
    	  
    Standard kernel compilation command. It creates dependency files which determine the order in which things are to be compiled. It also creates various header files with information from the configuration.

  5. 	touch /usr/src/linux/include/linux/modversions.h
    	  
    I'm not actually sure if this is necessary. The SuSE kernels don't use module versioning so that header file is never created by "make dep". But a lot of compiles, notably the nvidia graphics driver, fail if that file isn't present.

    The command creates an empty file of that name, which seems to be all that's needed. As I say, I'm not sure about this one, but it's worked for me so far.

  6. After that you can compile yor module, and it will fit nicely into the running kernel

5. What is martian source and why I'm getting them ?

These are packets which orginate on the planet Mars ;-).

These have IP numbers which should never apear in the wild. For example IP range 192.168.0.0/24 is a reserved IP range for local networks and these IP numbers should never reach the Internet.

Copyright 2002-2003 Togan Muftuoglu