LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-02-2010, 12:45 PM   #1
coolgreen1
Member
 
Registered: Nov 2007
Distribution: CentOS 5.5 x86_64 (Desktop) & Linux Mint 9 (Netbook)
Posts: 71

Rep: Reputation: 17
[SOLVED]Which kernel?


Hi,

Which kernel should I use? Right now I am using whatever the installer installs be default. I am quite sure this is the "huge" kernel. Should I use the generic kernel or just continue using the huge kernel? I am not having any problems with the huge kernel, Is there any good reasons to use the generic kernel?

Any help would be greatly appreciated.

Last edited by coolgreen1; 06-02-2010 at 04:20 PM.
 
Old 06-02-2010, 12:54 PM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 138Reputation: 138
PV suggests that you use the generic kernel, there is a file in the root directory of the install media that you used called README.initrd it explains why. Here is what it says
Quote:
Slackware initrd mini HOWTO
by Patrick Volkerding, volkerdi@slackware.com
Wed May 12 22:32:34 CDT 2010

This document describes how to create and install an initrd, which may be
required to use the 2.6 kernel. Also see "man mkinitrd".

1. What is an initrd?
2. Why to I need an initrd?
3. How do I build the initrd?
4. Now that I've built an initrd, how do I use it?


1. What is an initrd?

Initrd stands for "initial ramdisk". An initial ramdisk is a very small
Linux filesystem that is loaded into RAM and mounted as the kernel boots,
and before the main root filesystem is mounted.

2. Why do I need an initrd?

The usual reason to use an initrd is because you need to load kernel
modules before mounting the root partition. Usually these modules are
required to support the filesystem used by the root partition (ext3,
reiserfs, xfs), or perhaps the controller that the hard drive is attached
to (SCSI, RAID, etc). Essentially, there are so many different options
available in modern Linux kernels that it isn't practical to try to ship
many different kernels to try to cover everyone's needs. It's a lot more
flexible to ship a generic kernel and a set of kernel modules for it.

3. How do I build the initrd?

The easiest way to make the initrd is to use the mkinitrd script included
in Slackware's mkinitrd package. We'll walk through the process of
upgrading to the generic 2.6.33.4 Linux kernel using the packages
found in Slackware's slackware/a/ directory.

First, make sure the kernel, kernel modules, and mkinitrd package are
installed (the current version numbers might be a little different, so
this is just an example):

installpkg kernel-generic-2.6.33.4-x86_64-1.tgz
installpkg kernel-modules-2.6.33.4-x86_64-1.tgz
installpkg mkinitrd-1.4.5-x86_64-2.txz

Change into the /boot directory:

cd /boot

Now you'll want to run "mkinitrd". I'm using reiserfs for my root
filesystem, and since it's an IDE system the reiserfs module will be
the only one I need to load:

mkinitrd -c -k 2.6.33.4 -m reiserfs

This should do two things. First, it will create a directory
/boot/initrd-tree containing the initrd's filesystem. Then it will
create an initrd (/boot/initrd.gz) from this tree. If you wanted to,
you could make some additional changes in /boot/initrd-tree/ and
then run mkinitrd again without options to rebuild the image. That's
optional, though, and only advanced users will need to think about that.

Here's another example: Build an initrd image using Linux 2.6.33.4
kernel modules for a system with an ext3 root partition on /dev/sdb3:

mkinitrd -c -k 2.6.33.4 -m ext3 -f ext3 -r /dev/sdb3


4. Now that I've built an initrd, how do I use it?

Now that you've got an initrd (/boot/initrd.gz), you'll want to load
it along with the kernel at boot time. If you use LILO for your boot
loader you'll need to edit /etc/lilo.conf and add a line to load the
initrd. Here's an example section of lilo.conf showing how this is
done:

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.33.4
initrd = /boot/initrd.gz
root = /dev/sda6
label = Lnx26334
read-only
# Linux bootable partition config ends

The initrd is loaded by the "initrd = /boot/initrd.gz" line.
Just add the line right below the line for the kernel image you use.
Save the file, and then run LILO again ('lilo' at the command line).
You'll need to run lilo every time you edit lilo.conf or rebuild the
initrd.

Other bootloaders such as syslinux also support the use of an initrd.
See the documentation for those programs for details on using an
initrd with them.


---------

Have fun!
samac
 
Old 06-02-2010, 01:02 PM   #3
coolgreen1
Member
 
Registered: Nov 2007
Distribution: CentOS 5.5 x86_64 (Desktop) & Linux Mint 9 (Netbook)
Posts: 71

Original Poster
Rep: Reputation: 17
Hi,

Thank you for your quick reply. I have just gone to the generic kernel and all is working perfectly. But what are the reasons to use the generic kernel over the huge one? Another question is do I have to reinstall any of my "SlackBuild" programs?

Last edited by coolgreen1; 06-02-2010 at 01:32 PM.
 
Old 06-02-2010, 02:58 PM   #4
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 3,292

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Quote:
Originally Posted by coolgreen1 View Post
Hi,

Thank you for your quick reply. I have just gone to the generic kernel and all is working perfectly. But what are the reasons to use the generic kernel over the huge one? Another question is do I have to reinstall any of my "SlackBuild" programs?
The huge kernel has every driver possible built into it. The generic one does not. It's a matter of memory usage.
 
Old 06-02-2010, 03:44 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,861

Rep: Reputation: Disabled
You shouldn't have to reinstall any program (or package built with a SlackBuild), but those which need a module linked to the kernel. nVidia proprietary driver (the kernel module part of it) come to mind, as well as VirtualBox kernel modules and tp_smapi, if I remember well.
 
Old 06-02-2010, 04:18 PM   #6
coolgreen1
Member
 
Registered: Nov 2007
Distribution: CentOS 5.5 x86_64 (Desktop) & Linux Mint 9 (Netbook)
Posts: 71

Original Poster
Rep: Reputation: 17
Hi,

All of my programs seem to be working. 3D acceleration is working with the Nvidia driver. The generic kernel does seem to use a lot less RAM. Thank you all for the help.

Last edited by coolgreen1; 06-02-2010 at 04:21 PM.
 
Old 06-08-2010, 01:42 PM   #7
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 506

Rep: Reputation: 50
Quote:
Originally Posted by Richard Cranium View Post
The huge kernel has every driver possible built into it. The generic one does not. It's a matter of memory usage.
Rather than open a new thread, I was hoping to expand on this one... In the past I've always used the model of using the generic kernel along with an initrd to boot. Somehow throughout the years I had slipped up somewhere and went with the default huge kernel never needing initrd. I have always compiled my own kernels and with Slackware 13.1, I have decided to go back to the initrd ways and so there's a couple of things I have been wondering about. What do you prefer to use as a base to build your custom kernel, the generic or huge? If one were to configure the "huge" kernel and remove all the unnecessary drivers, would it be equivalent to a generic kernel where the unnecessary drivers were removed as well?
 
Old 06-08-2010, 02:53 PM   #8
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
For most people it wouldn't make much of a difference, really. If I was to configure a kernel for a server, I'd configure a kernel with everything built-in, without initrd and without the possibility of loading modules, which sure helps preventing some rootkits out there. However, for a desktop system I'd use a generic kernel with modules. I've had a few experiences in the past that required kernel module support and, furthermore, you actually need to load and unload modules.

For example, not long ago I was using a 3G modem to connect to the Internet, using the "option" module. It was mostly fine, but sometimes (as in once a month, for example), the driver would enter an invalid internal state of some kind and I really needed to unplug the modem, then unload the "option" module, then loading it again and pluggin in the modem. Without unloading the module the thing wouldn't work. You wouldn't have that opportunity with a "huge" kernel. Like that, there are a couple of situations out there in which having the possibility of unloading and then reloading a module helps.
 
Old 06-08-2010, 03:03 PM   #9
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,861

Rep: Reputation: Disabled
I always use a generic kernel as a base to compile a more recent one. I don't do so much customization in the process: I run "make oldconfig" to take care of the new drivers and options, then built in the drivers for my root file system in order to avoid needing an initrd and do very few tweaking. In Slackware -generic kernel configuration choices are more clever enough.

I used to remove the drivers I don't need but don't do that anymore; as I have plenty of RAM I don't see the benefit of that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
upgrading Fedora Core 3 kernel 2.6.9-1.667 to 2.6.26.3 manually+kernel panic error LinuxLovinNoob Linux - Newbie 7 12-17-2008 08:45 PM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 07:53 AM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration