LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-24-2011, 03:58 PM   #1
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Rep: Reputation: 1
Question to initrd or not to initrd...


Hi guys,

I've read a few topics and readme's concerning building an initrd for Slackware 13.37.

For example this part from the Slackware Release Announcement ...

Quote:
...First there are 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...
It seems clear to me that there isn't a big reason ("there's no real reason that you couldn't continue to run them after you have installed") to switch from huge to generic but can someone elaborate on the consequences (performance / stability / ...) for a Slackware system that uses huge vs generic ?

I'm interested in learning a bit more about the possible advantages and disadvantages of both.

I'm still not really sure why I should make an initrd or not.
Maybe you can help me decide

Thanks
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-24-2011, 04:01 PM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I've never really used or needed initrd on my system. It's only really useful if you need to preload modules like ReiserFS and such for boot process purposes. Other than that, the system can fairly much load everything else on it's own. I stopped using ReiserFS when I came to Slackware as my main Linux OS choice and started using EXT4 so I've been without an initrd for a long time now. It's a handy thing to have if you need it, but if you don't, it's just unneeded.

Last edited by ReaperX7; 09-24-2011 at 04:04 PM.
 
Old 09-24-2011, 04:17 PM   #3
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 69
A reason for using the generic kernels is that the Slackware team will only take seriously bugs that can be replicated using those. A reason not to use them is if you use slackpkg to update your kernels and don't want to rebuild the initrd and run lilo manually all the time your kernel is updated.
 
Old 09-24-2011, 04:44 PM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,873

Rep: Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982Reputation: 4982
I don't really like the 'huge' or 'generic' approach slackware uses. IMO 'huge' contains too much stuff, and 'generic' pushes too much stuff out to modules. There must be a happy medium somewhere in-between, and to that end I build my own kernel.

As for performance and stability, I doubt you'd be able to detect any difference, though there have been posts on this forum from time to time where someone running a 'huge' kernel has encountered problems that switching to the generic kernel resolved (Usually related to trying to build or use out-of-tree drivers).

A initrd is required in certain circumstances: such as having your rootfs on encrypted devices or a raid array that needs assembling. I have my rootfs on an encrypted lvm partition so even though I use a custom kernel, I still need a initrd because of this.
 
2 members found this post helpful.
Old 09-24-2011, 06:09 PM   #5
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Original Poster
Rep: Reputation: 1
Thank you all for your answers. At the time being I don't seem to have a real need to change kernels. Maybe I'll try it out sometime just to see how it goes.
 
Old 09-25-2011, 08:12 AM   #6
ottavio
Member
 
Registered: Nov 2007
Posts: 312

Rep: Reputation: 46
Is there a precompiled "initrd.gz" to download from the x86-(64) repositories?

Stuart Winter offers precompiled initrd's on his Armedslack repos:
http://ftp.slackware.org.uk/armedsla...els/versatile/
 
Old 09-25-2011, 08:36 AM   #7
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Is there a precompiled "initrd.gz" to download from the x86-(64) repositories?
To make an initrd just run this as root :
Code:
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)
That should create a file /boot/initrd.gz to suite your system.
 
1 members found this post helpful.
Old 09-25-2011, 10:12 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

I find the utility of a 'initrd' to be beneficial when you have multiple systems that are unique environemts and the facility of the 'initrd' very useful.

There have been unique systems that performed better with a 'initrd' than having things compiled in. Two phased control can be useful when one has to use a kernel that requires additions for functionality. I do tend to move to the generic, easier to trim the fat thus a 'initrd'. If a trim then re-compile work from there.
 
Old 09-25-2011, 10:59 AM   #9
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware, Void
Posts: 7,341

Rep: Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743Reputation: 3743
Initrd howto from PV:

http://slackware.osuosl.org/slackwar.../README.initrd
 
Old 09-26-2011, 08:40 AM   #10
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Original Poster
Rep: Reputation: 1
How about a custom kernel without the "bloat" but with the stuff that initrd normally takes care off ?

Instead of an initrd + generic kernel...

Or is it just that the second is more convenient and easier to set up ?
 
Old 09-26-2011, 09:47 AM   #11
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by noobje View Post
How about a custom kernel without the "bloat" but with the stuff that initrd normally takes care off ?

Instead of an initrd + generic kernel...
doable,especially if you're the one compiling the kernel as machines differ thus so do drivers. I could be wrong but i believe initrd is generated as a subset of LOADED modules.
 
Old 09-26-2011, 09:50 AM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,350

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
The generic kernel with an initrd is easier to upgrade. If you follow -current and the kernel is upgraded, then you can download and install the new generic kernel together with the modules, run mkinitrd, reboot and be running the new kernel very quickly.
A custom kernel avoids the need for an initrd, but will require recompilation if the kernel is upgraded, a longer and more involved process.

Last edited by allend; 09-26-2011 at 09:53 AM.
 
Old 09-26-2011, 12:00 PM   #13
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by frieza View Post
... I could be wrong but i believe initrd is generated as a subset of LOADED modules.
Is there any way to inspect the initrd file to find out the modules that it can use
(making compiling your own kernel easier because of the modules already identified in a suitable initrd)

Or are there better ways to determine all the modules (in the kernel / loaded or potentially loaded ) that your systems is using / can use for building your own kernel ?

Last edited by svu; 09-26-2011 at 12:01 PM.
 
Old 09-26-2011, 10:50 PM   #14
narz
Member
 
Registered: May 2007
Location: US
Distribution: slackware
Posts: 186

Rep: Reputation: 37
Quote:
Originally Posted by GazL View Post
I don't really like the 'huge' or 'generic' approach slackware uses. IMO 'huge' contains too much stuff, and 'generic' pushes too much stuff out to modules. There must be a happy medium somewhere in-between, and to that end I build my own kernel.
What do you find "too modular" about the generic kernel? The linux kernel seems bloated enough, the more stuff you can keep out of it the better.
 
Old 09-27-2011, 12:40 AM   #15
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by svu View Post
Is there any way to inspect the initrd file to find out the modules that it can use
(making compiling your own kernel easier because of the modules already identified in a suitable initrd)

Or are there better ways to determine all the modules (in the kernel / loaded or potentially loaded ) that your systems is using / can use for building your own kernel ?
Well, try reading /usr/share/mkinitrd/mkinitrd_command_generator.sh
 
  


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
How to create new initrd.gz (or initrd.img) file? kkpal Programming 2 12-10-2007 08:38 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM
Initrd OmnipotentOscar Debian 3 12-19-2006 06:02 PM
initrd ashlesha Linux - Software 1 12-01-2006 04:57 PM
Do I even need an initrd? chadman Linux - General 3 02-20-2005 09:53 PM

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

All times are GMT -5. The time now is 01:09 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
Open Source Consulting | Domain Registration