LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 04-03-2011, 12:49 PM   #1
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 864

Rep: Reputation: 89
Question Newer Kernels and the Need for Initrd


I'm sure this has been discussed time and again, but a search is not getting me any definitive answers to my question.

I've always booted Slackware with an initrd until recently. With my new installation of Slack Current (13.37), I didn't bother to create an initrd because of the constantly updating/transient nature of the current branch at the moment.

My question is this: when 13.37 does go final in a few days, should I go back to my normal practice of booting with an initrd?

Also, I think I understand how the initial ramdisk works, but is it really needed with the more modern kernels?

Thanks in advance...

~Eric
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-03-2011, 01:11 PM   #2
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 518

Rep: Reputation: 133Reputation: 133
Slackware (32-Bit) comes with 4 kernels:
kernel-huge
kernel-huge-smp (supports multi cpu)
kernel-generic
kernel-generic-smp (supports multi cpu)

Slackware64 comes with 2:
kernel-huge
kernel-generic

(Note: these are both 'smp' kernels even though they don't have 'smp' in the name)

Slackware's 'huge' kernels don't require an initrd, but they aren't recommended for daily use.

It is recommended to switch to one of the 'generic' kernels, which do require an initrd, after installing/booting Slackware for the first time.

Last edited by piratesmack; 04-03-2011 at 01:23 PM.
 
1 members found this post helpful.
Old 04-03-2011, 02:02 PM   #3
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,359

Rep: Reputation: 184Reputation: 184
One other note /boot/vmlinuz usually linked to the huge kernel

Last edited by colorpurple21859; 04-03-2011 at 02:03 PM.
 
1 members found this post helpful.
Old 04-03-2011, 02:32 PM   #4
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Initrd is needed when you build things that are necessary to boot as modules, and thus are stored separately from the kernel on the HDD. For example filesystem support. The bootloader knows where the kernel is on the disk, and so can load it without needing anything. However, it doesn't know where the modules are and cannot access them without some modules, like filesystem support, IDE or SATA support, etc (catch22). So, you just make an initrd, which is an image containing these modules that is loaded with the kernel into RAM. piratesmack is correct, in that the huge kernels have everything built-in and thus don't need an initrd. However, if you make a custom kernel, like I do, I build in the things that are needed and leave the rest as modules, which is obviously the best thing to do. No bloated kernel, no initrd.
 
3 members found this post helpful.
Old 04-03-2011, 02:51 PM   #5
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 875

Rep: Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819Reputation: 1819
Even with everything built into the kernel, an initrd is still needed for things like / on LVM, luks, or RAID.
 
4 members found this post helpful.
Old 04-03-2011, 03:37 PM   #6
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 625

Rep: Reputation: 115Reputation: 115
For those who (for religious reasons) can not use initrd, they still can use a ROOTFS embedded in the kernel, an initrd which is included in bzImage, at build time.

After all, all options can be set in the initrd command line ...
 
1 members found this post helpful.
Old 04-03-2011, 03:52 PM   #7
hf2046
Member
 
Registered: Mar 2011
Distribution: Slack64
Posts: 109

Rep: Reputation: 20
Might want to give /boot/README.initrd a look-see. Should answer a lot of your questions definitively on when you need to make an initial ramdisk...
 
1 members found this post helpful.
Old 04-03-2011, 04:35 PM   #8
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by colorpurple21859 View Post
One other note /boot/vmlinuz usually linked to the huge kernel
That's to do with the install order.
Those links are created by whichever kernel package was last installed.
 
1 members found this post helpful.
Old 04-03-2011, 04:37 PM   #9
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 535

Rep: Reputation: 248Reputation: 248Reputation: 248
Quote:
Originally Posted by hf2046 View Post
Might want to give /boot/README.initrd a look-see. Should answer a lot of your questions definitively on when you need to make an initial ramdisk...
If I compile a custom kernel and append something to the name, like 2.6.38.2-server, do I need to use this name in the mkinitrd command:

Code:
mkinitrd -c -k 2.6.38.2-server -m ext4 -f ext4 -r /dev/sda1
or just this:

Code:
mkinitrd -c -k 2.6.38.2 -m ext4 -f ext4 -r /dev/sda1
?
 
1 members found this post helpful.
Old 04-03-2011, 04:39 PM   #10
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 518

Rep: Reputation: 133Reputation: 133
Use '2.6.38.2-server'

The same name as the /lib/modules/<kernel version> folder

But if you build ext4 support into your custom kernel by setting 'CONFIG_EXT4_FS=y' (not 'm'), then you don't even need an initrd (unless you use LVM, LUKS, or RAID like said above)

Last edited by piratesmack; 04-03-2011 at 04:47 PM.
 
1 members found this post helpful.
Old 04-03-2011, 04:45 PM   #11
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware64, NetBSD
Posts: 535

Rep: Reputation: 248Reputation: 248Reputation: 248
Quote:
Originally Posted by piratesmack View Post
Use '2.6.38.2-server'

The same name as the /lib/modules/<kernel version> folder
Thank you.
 
Old 04-03-2011, 08:36 PM   #12
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 109Reputation: 109
If you use the /etc/mkinitrd.conf file. It's easy to create a new one by changing the kernel version in the file then running
mkinitrd -F

Set it up once with all your modules and partitions then you don't have to remember all the command line switches.
 
5 members found this post helpful.
Old 04-03-2011, 08:59 PM   #13
kingbeowulf
Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware64 14.1, Slackware 14.1
Posts: 526

Rep: Reputation: 140Reputation: 140
For me, there are good reasons to use an initrd instead of using the huge kernel. I don't always run Slackware on "modern" hardware but I still want to be able to run a "modern" kernel.
  1. Size: The generic kernel takes up < 1/2 the RAM, and I can shrink that further with configuration customizations, as needed, not only for my main multi gigabyte, multi CPU box, but also for my PIII laptops with 256-512MB of RAM
  2. Speed: initrd/generic boots faster. YMMV
  3. control: I only load what I need, which gives speed, RAM and HD savings, stability, and security.
 
1 members found this post helpful.
Old 04-03-2011, 10:30 PM   #14
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 864

Original Poster
Rep: Reputation: 89
Thanks all. Thanks very much. Those were some great answers. I'll probably go back to booting with the initrd after reading all these replies. I appreciate the time y'all took to answer my queries.

Regards,

~Eric
 
Old 04-04-2011, 02:18 PM   #15
vtel57
Member
 
Registered: Jul 2006
Location: Tampa, FL, USA
Distribution: Slackware64
Posts: 864

Original Poster
Rep: Reputation: 89
Just a quick update... I'm back to booting with the initrd on all my systems.
 
  


Reply

Tags
booting, initial ramdisk, initrd, kernel, slackware


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
TTY0 missing in newer kernels theNbomr Linux - Kernel 8 01-14-2009 10:34 AM
TARPIT and newer kernels felosi Linux - Security 25 05-10-2008 01:10 AM
all the newer kernels im compiling pause on udev darksmiley Linux - General 6 12-28-2005 10:05 AM
Is there something similar to ip personality for newer 2.4 kernels ? Menestrel Linux - Security 0 08-07-2005 04:30 AM
kmod is used in newer kernels but... hampel Linux - General 1 08-27-2003 03:56 PM


All times are GMT -5. The time now is 07:02 AM.

Main Menu
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