LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Confused about "generic" vs. "386" linux kernel (http://www.linuxquestions.org/questions/linux-software-2/confused-about-generic-vs-386-linux-kernel-741104/)

SaintDanBert 07-18-2009 10:08 PM

Confused about "generic" vs. "386" linux kernel
 
After recent updates, I have several copies of the vmlinuz... file in my /boot folder. Each file name includes a version identifies with either "-386" or "-generic". What is the difference between these kernels and do I need both?

My workstation is an Intel Core-2 Duo processor.
Some kernels do not enable the 2nd CPU at boot
-- I don't remember which. Can someone direct me to where I can learn about this?

I've tried reading the linux kernel HOWTO but only got more confused.

AlucardZero 07-18-2009 11:00 PM

One is specialized for 386-based computers and one is more.. generic. The Linux kernel can run on many different architectures (x86 (386, 486, 686, k7..), x86_64, PowerPC, ...) but you don't need the code to run any other architecture than the one you have. The indicators usually correspond to the type of CPU you have.
Quote:

My workstation is an Intel Core-2 Duo processor.
You have an Intel x86 processor that is newer than a Pentium II. Ubuntu? Get a -686 kernel for slightly better results. -386 (or -486) also work but will be slightly slower.

SMP (symmetric multiprocessing) is needed to use more than one core. xref Wikipedia

SaintDanBert 07-19-2009 09:43 PM

Quote:

Originally Posted by AlucardZero (Post 3612375)
One is specialized for 386-based computers and one is more.. generic.
...
SMP (symmetric multiprocessing) is needed to use more than one core. xref Wikipedia

The command "uname --processor" and "uname --hardware-platform" both report UNKNOWN.
While "uname --machine" reports i686, and
"uname --kernel-version" reports "#1 SMP PREEMPT" and a date. It looks like SMP is in there somewhere.

The -386 and -generic files appeared following synaptic update runs. If I use any of them, some of my laptop features do not work. Does this mean that I need to gen my own kernel? If so, how do I know which parts I already have enabled in the running+working kernel so that I can generate an up-to-date kernel that runs and works?

chrism01 07-20-2009 12:53 AM

Try uname -a

also

sysctl -a

to check kernel settings.
You'll prob need to be root.

AlucardZero 07-20-2009 06:30 AM

You have an Intel Core-2 Duo? -386 should be fine. I don't see a -686 and I don't normally use Ubuntu.

SaintDanBert 09-29-2009 11:12 PM

Quote:

Originally Posted by AlucardZero (Post 3613719)
...
-386 should be fine.
...

The latest update delivered a kernel. How do I discover the value of the various kernel-config settings? Is the config file available somewhere? Are the settings readable in /proc or /sys or similar?

Given kernel edition nn.nnn.nnn-nn, can I take a kernel-config file and build a new-and-improved kernel with the same configuration settings?

~~~ 0;-Dan

i92guboj 09-29-2009 11:51 PM

Quote:

Originally Posted by AlucardZero (Post 3612375)
One is specialized for 386-based computers and one is more.. generic.

Hardly, considering that the 386 is the absolute minimum to run linux, and that all the x86 cpu's above that are compatible with the original 386 instructions set. There's nothing more generic than the 386 if we are talking about pc architecture, and anything compiled for an i386 will work on any cpu above that, including 686 or even greater without the need to do anything special at compilation time ;)

However, note that nowadays, a lot of people use 386 when they really mean x86, or any other thing. There are lot of names containing "386" when they really mean anything else above that. So that's not reliable. I don't know about the Ubuntu policies though.

Quote:

Originally Posted by SaintDanBert (Post 3701328)
The latest update delivered a kernel. How do I discover the value of the various kernel-config settings? Is the config file available somewhere? Are the settings readable in /proc or /sys or similar?

If whomever compiled the kernel had a brain, you can read the configuration used to compile the kernel that's currently running from /proc/config.gz. If not, you still have a chance to get it from /boot/, some packagers put there the config files, which usually will be called something like /boot/config-<version number/label>. If they are there you should be able to figure which config file matches a given kernel.

Quote:

Given kernel edition nn.nnn.nnn-nn, can I take a kernel-config file and build a new-and-improved kernel with the same configuration settings?
If you have the config file for a kernel, you can use it as a base to compile your own kernel (for the same or other version). However, the more the versions differ the more probably it is that you will have to do some thinking and get your hands dirtier. For example, imagine you want to use the configuration file of the currently running kernel to compile the latest 2.6.31.1 linux kernel, you would do something like this:

Code:

$ cd ~
$ mkdir linux
$ cd linux
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.1.tar.bz2
$ tar xf linux-2.6.31.1
$ cd linux-2.6.31.1 # or whatever it's called, use ls
$ zcat /proc/config.gz > .config # in this step you dump the config of the running kernel into the new one
$ make oldconfig

This step might ask you some questions that you will have to answer to create a configution that works on the current kernel, there are always new things on every release, other change, some goes away and others are located on a different place.

After that, you can use "make menuconfig" if you want to check or fine tune something. And then just compile and install as you wish. I use "make && make install modules_install". After that you need to set up your boot manager to include the new kernel.

That's the general picture.


All times are GMT -5. The time now is 06:39 AM.