Advantage To Using Initrd.img?


Recommended Posts

is their any real advantage to using an initrd.ing? So long as your boot and root partitions have file system support built directly into the kernel, why would it be needed? So many distros use one, so their must be other advantages I am not seeing.

Link to post
Share on other sites

their are two ways of looking at it.

why would a distrabution like Red Hat use it?

why would you use it.

the initrd.ing is stored at the same place your kernel is. it comtains al your modules.. and normaly you make everything a moduel if you use it. the advantage is you know where it is. you can load teh modules with out knowing where root is. great for live cd or install cd, or a PXE boot for thin clients.

so Red Hat and gang (including me on my distro) use it because its a known location so the system can boot. the last thing that happens in a boot is the unmounting of initrd.ing and change rooting to your drive.

if they did not use it root would have to be hda1 or soemthing on all computers.

also its makes upgrade simple.. compile a kernel create a initrd.ing file and ditribute both together. if they did not they would have to write all the new modules for every kernel upgrade to the root partation. this leaves room for error and is slower.

now you.. their is no advantage for you to use it. you know where root is and can write that to your grub.conf or lilo.conf file..

you put root in your fstab and your root is not changing because that install is not going from computer to computer.

did I explain it well?

Link to post
Share on other sites

ya that seems to clear it up(kind of).

the initrd.ing is stored at the same place your kernel is. it comtains al your modules.. and normaly you make everything a moduel if you use it. the advantage is you know where it is. you can load teh modules with out knowing where root is.

if you are building a distro, won't you know where your root partition is?

also its makes upgrade simple.. compile a kernel create a initrd.ing file and ditribute both together. if they did not they would have to write all the new modules for every kernel upgrade to the root partation.

if you update the kernel and initrd.img, wouldn't you still need to update your module directory on your root partiton?

NOT TRYING TO ARGUE, just trying to understand :-)

Link to post
Share on other sites

if you are building a distro you have a boot device but you have no ideal where the user is going to put their root partition. you could write a scripts or part of the install program that changes the boot loader to point to hte installed root. but why .. this make it more simple..

IT really works well with thin clients where you have a kernel and a initrd.ing that is your root partition. this way you store these two files on a newtwork share and use DHCP to point to them .. and all systems can boot from one kernel and one initrd.ing. to upgrade you just replace the two files. and all of your clients are upgraded at the same time.

as for you modules .. when you use a initrd.ing your modules are not updated on the root partition or even their (I have ot check this one)

I know when Red Hat does a Kernel upgrade or you add something to the kernel you only upgrade the kernel and the initrd.ing.

I see no advantage to a normal desktop user using gentoo. I know genkernel uses it.. but I have never gotten a genkernel to boot.

Link to post
Share on other sites

I appreciate all of your patience. I am still a little unsure on this point. If a system uses an initrd.img, does it load its modules from the initrd.img(only) or does it still load them from the root partition. If it is the latter, and still loads them from the root partition, wouldn't those modules need to be updated along with the kernel update. Sorry if you already answered this question, I probably just missed it. Thanks again for your help.

Link to post
Share on other sites

its loads all native (ones that come with the cd) from the initrd.ing file and the only modules that would reside on root are ones you install which would not be upgraded if I had a kernel upgrade package. so you would have to upgrade them. The same things happens with Fedora.. say you go to ntfs on linux site and downlioad the RPM to install support. your reboot and you have ntfs support. you upgrade your kernel through up2date or yum your ntfs woudl stop working.. (this is diffrent since ntfs support is not part of the kernel) you would have to go get the rpm made for your new kernel.

since the fedora team or most distributers don't care if you add things .. they so don't care if their updates break what you added.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...