LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   using initrd? (https://www.linuxquestions.org/questions/linux-general-1/using-initrd-148052/)

e1000 02-19-2004 11:26 AM

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.

aaa 02-19-2004 11:59 AM

See the Loopback-root-fs-HOWTO at www.tldp.org

e1000 02-19-2004 03:49 PM

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?

aaa 02-19-2004 05:00 PM

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.

e1000 02-19-2004 07:21 PM

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.


All times are GMT -5. The time now is 01:00 AM.