LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-19-2004, 11:26 AM   #1
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
Question using initrd?


i was wondering how i could use an initrd to load my kernel instead of the regular way? are there any tuts on this?

I know you need "linuxrc" but i dont now where to get this or how to configure it. I use slackware, but I'd rather not get some distrobution specific thing.

Last edited by e1000; 02-19-2004 at 11:41 AM.
 
Old 02-19-2004, 11:59 AM   #2
aaa
Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
See the Loopback-root-fs-HOWTO at www.tldp.org
 
Old 02-19-2004, 03:49 PM   #3
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Original Poster
Rep: Reputation: 30
woa, so according to that tut, an initrd is actually a REALLY tiny linux distro with just enough app's to mount and chroot to the real root filesystem (you can even put a small shell in it (like ash) so that the linuxrc can be a shell script).

I do have one question tho, how does the bootloader know where the kernel is that it needs to loaded once it loads the initrd?
 
Old 02-19-2004, 05:00 PM   #4
aaa
Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Quote:
an initrd is actually a REALLY tiny linux distro
An initrd may have a tiny linux system in it, but it doesn't have it's own kernel. The initrd functions as the temporary root filesystem for the kernel, then only the filesystem is switched. If you look at the bootloader configuration file, you'll note that the initrd is specified with the kernel:

(for grub)
kernel (hd0,0)/boot/vmlinuz root=/dev/hda1
initrd (hd0,0)/boot/initrd.img

The kernel boots with the initrd as it's root fs, executes linuxrc if needed, then switches to the original root fs (hda1) unless told otherwise by linuxrc.
 
Old 02-19-2004, 07:21 PM   #5
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Original Poster
Rep: Reputation: 30
oh, i was under the inpression that the "linuxrc" has the job of switching to the root fs. cause i need it to mount a loopback device

im asking these questions cause im in a quest to remaster a cd distro that i really like but its a bit less featurefull than i need. and i have been able to extract the main FS from it and after installig sshd and adding a new startup script I will be ready to make it into a cramfs image, but now i need an initrd with my own kernel that can use with isolinux.

Last edited by e1000; 02-19-2004 at 07:55 PM.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is initrd? PinRojas Linux - Newbie 2 06-16-2005 11:18 AM
initrd chris318 Linux - Software 1 02-27-2005 04:28 PM
Do I even need an initrd? chadman Linux - General 3 02-20-2005 09:53 PM
Initrd????? rm6990 Linux - Software 5 10-15-2004 03:32 AM
initrd tekbuz Debian 2 08-04-2004 12:34 PM


All times are GMT -5. The time now is 04:04 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