LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 01-02-2008, 09:26 AM   #1
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
Choosing a kernel for Slackware 12 and is an initrd needed?


Hi all,

I finally got around to installing the new hard drive in my laptop and installing Slackware 12 on it. So far, I've got just two questions.

First, did I change kernels correctly? -- I've read here, and in the readmes the recommendation to use the generic SMP kernel for day-to-day operations. I did a full installation and the default kernel is the huge smp kernel. So, I went to the boot directory and changed the System.map, bzImage, and config symbolic links to link to the corresponding generic SMP files. The laptop boots correctly and everything seems to work, but is there anything else I need to do?

Second, why would I need to make an initrd? The ANNOUNCE.12_0 file states:

Quote:
There are two kinds of kernels in Slackware -- the huge kernels, which contain support for just about every driver in the Linux kernel. These are primarily intended to be used for installation, but there's no real reason that you couldn't continue to run them after you have installed. The other type of kernel is the generic kernel, in which nearly every driver is built as a module. To use a generic kernel you'll need to build an initrd to load your filesystem module and possibly your drive controller or other drivers needed at boot time, configure LILO to load the initrd at boot, and reinstall LILO.
But I'm using the generic kernel and haven't made an initrd yet. Why is it necessary? Aren't modules loaded with rc.M?

Thanks,

-Drew
 
Old 01-02-2008, 11:13 AM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,333

Rep: Reputation: 144Reputation: 144
Quote:
But I'm using the generic kernel and haven't made an initrd yet. Why is it necessary? Aren't modules loaded with rc.M?
You can't load modules from rc.M until you can mount the root filesystem and read what's in rc.M and /lib/modules. That's what initrd is for. It allows you to load the basic modules for mounting the root filesystem at boot time, like the module for the filesystem you are using for root and the hard drive controller for the hard drive containing your root filesystem. It's basically to get around the catch-22 of you need the modules stored in root to mount root.
 
Old 01-02-2008, 11:20 AM   #3
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Original Poster
Rep: Reputation: 119Reputation: 119
So if I can boot without the initrd, then I can assume that the root file system is mounting just fine without it?

I've got my hard drive in four partitions with one formatted as swap and the other three as JFS. I think the JFS support is in the kernel, so I shouldn't need the initrd if I'm understanding things correctly.

Of course, I could be confused...

-Drew
 
Old 01-02-2008, 11:25 AM   #4
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
No, you don't need initrd if you have fs support in the kernel.
 
Old 01-02-2008, 07:45 PM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,333

Rep: Reputation: 144Reputation: 144
Quote:
I think the JFS support is in the kernel, so I shouldn't need the initrd if I'm understanding things correctly.
If you are using the generic kernel and everything is booting OK, then obviously everything you need to mount your root filesystem is compiled directly into that kernel as opposed to being compiled as loadable modules. It really just depends on how the slackware developers compiled that kernel. If you get a kernel panic, then you need an initrd with JFS support and possibly other modules.
 
Old 01-04-2008, 04:57 AM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
What file system are you running? Have you redone lilo? I would be very suspicious that you are actually still running the huge kernel. I am pretty sure that Pat's generic kernel will not run ext3 without an initrd.
 
Old 01-04-2008, 05:14 AM   #7
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by arubin View Post
I am pretty sure that Pat's generic kernel will not run ext3 without an initrd.
This is indeed the case. Lufbery is using JFS, which also requires an initrd when using the generic kernel (since it is built as a module), so I'm having the same suspicions as you about he/she still running the huge kernel.
 
Old 01-04-2008, 08:18 AM   #8
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Original Poster
Rep: Reputation: 119Reputation: 119
Hi folks,

I'm a guy, by the way.

As Nylex said, I'm using JFS, and I'm pretty sure I'm using the generic SMP kernel. But, I'm not sure.

So, I changed the links for
Code:
System.map, bzImage, and config
to point to the generic SMP kernel. I reran the Lilo configuration, but I'm not sure I did it properly. I think I need to do a little more reading on Lilo.

Otherwise, I'll need to make the initrd. Do I do that first and then switch Lilo to it?

Regards,

-Drew
 
Old 01-04-2008, 08:23 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Are you sure you don't mean "vmlinuz" when you said "bzImage"? This is my LILO config (the important bit) for my system running the generic SMP kernel:

Code:
image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = Linux
  read-only
Note that I did not change the /boot/vmlinuz symlink to point to /boot/vmlinuz-generic-smp-2.6.21.5-smp, hence why my image line is not just "image = /boot/vmlinuz". Edit: I also manually edited my config file.

Show us what yours looks like.

Last edited by Nylex; 01-04-2008 at 08:27 AM.
 
Old 01-04-2008, 08:28 AM   #10
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
I guess that there is a command which tells you what kernel you are running; I don't know what it is :-)

You need to be careful not to burn your bridges. When you try a different kernel it makes sense to leave the option of booting the old kernel. So rather than change symlinks I prefer to add a new option in lilo.conf to give the choice of the old and new kernel. If all goes well you can delete the old option.
 
Old 01-04-2008, 08:33 AM   #11
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Original Poster
Rep: Reputation: 119Reputation: 119
Nylex,

You're right, I meant vmlinuz.

Arubin,

That's great advice! I'll be back to post my lilo.conf tomorrow. I really like the idea of leaving the option to boot to the huge kernel.

Regards, and thanks for the help.

-Drew
 
Old 01-04-2008, 04:34 PM   #12
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,333

Rep: Reputation: 144Reputation: 144
If you want to know what kernel you are running then open a console and run:

$ uname -a

And I agree with the others; I specifically remember having to make an initrd when using reiserfs for my root partition and the 2.6 kernel in slack 11. I had to include both reiserfs and the module for my sata controller in that initrd. Given this specific warning:

Quote:
The other type of kernel is the generic kernel, in which nearly every driver is built as a module. To use a generic kernel you'll need to build an initrd to load your filesystem module and possibly your drive controller or other drivers needed at boot time, configure LILO to load the initrd at boot, and reinstall LILO.
it doesn't look like much has changed.
 
Old 01-04-2008, 04:42 PM   #13
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I don't think "uname -a" helps much (which is probably why it hasn't been suggested before). For example, on my system, with the generic SMP kernel, I get

Linux rigel 2.6.21.5-smp #1 SMP Tue Jun 19 14:52:25 CDT 2007 i686 Mobile Intel(R) Celeron(R) CPU 2.20GHz GenuineIntel GNU/Linux,

which doesn't tell me whether I'm using the huge or the generic kernel, only that it's SMP. I'm not sure what the output would be like for the huge kernel!
 
Old 01-04-2008, 05:27 PM   #14
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
uname -v ?
 
Old 01-05-2008, 02:56 AM   #15
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
http://www.linuxquestions.org/questi...e-name-608673/

Last edited by Alien_Hominid; 01-05-2008 at 03:00 AM.
 
  


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
first slackware installation need help choosing kernel rcschroeder Slackware - Installation 11 01-12-2007 12:36 AM
Kernel Panic (no initrd) after Slackware 10.1 Install kinadian Slackware 3 08-14-2006 08:37 PM
slackware 10.2, kernel 2.6.16, and initrd alphisb0t Slackware 3 03-22-2006 02:58 PM
Choosing the right Kernel to Install (Slackware 10.2) ivancauso Slackware 12 12-06-2005 06:45 PM
Slackware 9.1 - Choosing Linux Kernel? GloVe Slackware 2 10-03-2003 01:29 PM


All times are GMT -5. The time now is 06:10 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration