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 09-16-2011, 06:59 PM   #1
seanaustin
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Rep: Reputation: 1
Making an initrd for more than just a filesystem


would it be feasible to set up my initrd to load all modules used by my system - at least all the modules loaded needed for the single-user section, before going multi-user?

I've done some google-work on the subject of initrd, but everyone seems to take two routes: just the bare minimum needed to mount the root filesystem, or use it as the root filesystem. I don't see anything related to what I want to accomplish.

all input is greatly appreciated.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-16-2011, 07:10 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
What are you trying to accomplish and for what purpose? The purpose of the initrd is to mount the root partition which in turn loads all the modules and runs the startup scripts.
 
Old 09-16-2011, 07:25 PM   #3
seanaustin
LQ Newbie
 
Registered: Feb 2010
Posts: 16

Original Poster
Rep: Reputation: 1
I want to have the Init Ramdisk load all modules, then mount the root partition, and run startup scripts.

It's more of an idle question, really. I think I have a concept of how to do it, I just wanted a opinion on the subject before I started experimenting.
 
Old 09-16-2011, 08:54 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You can build the initrd with all the modules you want by running the mkinitrd command, such as:

cd /boot
mkinitrd -k vmlinuz -i myinitrd -m "piix ext3 ..."


However, like I said, the most the boot ramdisk needs the hardware drivers related to the boot partition. The rest of the drivers it loads after it mounts the root partition.
 
Old 09-17-2011, 06:21 AM   #5
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by seanaustin View Post
I want to have the Init Ramdisk load all modules, then mount the root partition, and run startup scripts.
My old Computer Science teacher used to regularly terrorise his students with a question, and now I'm going to ask it to you: Why?

I'm not trying to discourage you. If you want to scratch that itch then by all means go for it, that's what linux is all about, but if you can't answer "why?" any other way than "because I want to" then that might explain why you don't find anyone else doing it that way. I suspect anyone who wanted those kernel features ready from the get-go would just configure the kernel to have them as built-ins and avoid the need to muck about with modules and initrds completely.
 
Old 09-17-2011, 06:39 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,316

Rep: Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032
And I might ask "why not" ?.

My major consternation is why people need to ask. Just fuckin' do it if you feel the need, why do you need the acceptance of others ?.
If it all goes to shit, why does it matter.

Do it. Worthless or not.
 
Old 09-17-2011, 10:28 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,758

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
"have the Init Ramdisk load all modules, then mount the root partition" This is exactly what happens with the standard boot-initrd -except for the 'all' part. But, I think it will load all the modules that you put in the initrd. The real 'root' gets mounted after the initrd finishes.
 
Old 09-17-2011, 11:09 AM   #8
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,101

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
doable? yes
feasible? perhaps
practical? probably not
why?
because
1) the other modules aren't necessary until AFTER the initrd is done
2) i believe the modules loaded by initrd are eventually unloaded and replaced by the version on the drive anyways (could be wrong so don't quote me on this)
3) it's probably more trouble than it's worth
4) if I'm not mistaken, initrd is to some extent optional nowadays if the necessary drivers for initial boot are compiled as built-in.

can you do it? yes
do you need to? no
 
Old 09-17-2011, 11:12 AM   #9
trademark91
Member
 
Registered: Sep 2009
Distribution: Slackware -current x64
Posts: 372

Rep: Reputation: 72
you should use a stopwatch to check the boot speed before you use this initrd and after, also check the amount of RAM being used while idle. Id be interested if this would have any bearing on performance or memory usage. Also, at least for me, it would make more sense just to build all these modules into your kernel, particularly your filesystem. It seems like a cleaner option.
 
Old 09-17-2011, 12:20 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.1
Posts: 1,495

Rep: Reputation: 438Reputation: 438Reputation: 438Reputation: 438Reputation: 438
Quote:
Originally Posted by syg00 View Post
And I might ask "why not" ?.

My major consternation is why people need to ask. Just fuckin' do it if you feel the need, why do you need the acceptance of others ?.
If it all goes to shit, why does it matter.

Do it. Worthless or not.
People ask to find out if the OP is trying to solve a problem. I know that I'm not going to bother validating an action, but I may try to help solve a problem instead.
 
2 members found this post helpful.
  


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
HELP: repartitioning root filesystem in initrd caryp Linux - General 1 06-11-2009 05:49 PM
Initrd as a root filesystem howto mrsiva Linux - Kernel 1 05-02-2008 09:46 AM
Filesystem type of initrd-2.6.9-42.0.3.EL.img veeruk101 Red Hat 3 07-19-2007 08:29 PM
Root FileSystem from RamDisk/InitRD winklmj Linux - Newbie 1 11-24-2004 11:16 PM
ext2 filesystem, do I need a initrd, confirmation? jtp51 Slackware 1 10-23-2004 11:13 PM


All times are GMT -5. The time now is 11:44 PM.

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