LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   initrd-tools or initramfs-tools (https://www.linuxquestions.org/questions/debian-26/initrd-tools-or-initramfs-tools-469879/)

kushalkoolwal 08-01-2006 06:18 PM

initrd-tools or initramfs-tools
 
Hi,

Earlier I was using Debian Sarge with Kernel 2.6.8. Now I know that the kernel 2.6.8 can work fine with initrd images created by initrd-tools which comes with Debian Stable.

Recently I upgraded my kernel to 2.6.16 and I came to know that these kernel requires tools like initramfs-tools or yaird to create the initrd.img image file. Now I upgraded my Kernel to 2.6.16 (I downloaded the sources and compiled the kernel) and created the initrd.img image with the old initrd-tools and my kernel works fine.

Now my question, are there any disadvantages of using the initrd image created by old initrd-tools? And what are the advantages of using initramfs-tools or yaird. How can I make my kernel independet of initrd?

konsolebox 08-03-2006 03:03 AM

Maybe we can see their difference in the startup scripts they make or the executable files they have but we can't really tell which of the two tools have the greater advantage as there are also times when files included in the initrd are no longer needed and will just take up space. And sometimes it's much better to have a simpler startup script to have faster boot process.

Anyway you shouldn't really think about which is better. The most important thing is that if your system is initrd dependent, always update your initrd file. You can do that manually (depends on the distro) by doing
Code:

mkinitrd -o <initrdfile> <version>
e.g. 'mkinitrd -o /boot/initrd.gz 2.6.16.22[/code]

If you think your system can run without initrd and you want to make your system independent from it, compile your kernel with most drivers required in startup set as built-in and not as modules. After the installation of new kernel, exclude the initrd value in your boot loader's config.

For lilo, run 'lilo' after editing lilo.conf.

kushalkoolwal 08-06-2006 03:19 PM

Quote:

Originally Posted by konsolebox
Maybe we can see their difference in the startup scripts they make or the executable files they have but we can't really tell which of the two tools have the greater advantage as there are also times when files included in the initrd are no longer needed and will just take up space. And sometimes it's much better to have a simpler startup script to have faster boot process.

Anyway you shouldn't really think about which is better. The most important thing is that if your system is initrd dependent, always update your initrd file. You can do that manually (depends on the distro) by doing
Code:

mkinitrd -o <initrdfile> <version>
e.g. 'mkinitrd -o /boot/initrd.gz 2.6.16.22[/code]

If you think your system can run without initrd and you want to make your system independent from it, compile your kernel with most drivers required in startup set as built-in and not as modules. After the installation of new kernel, exclude the initrd value in your boot loader's config.

For lilo, run 'lilo' after editing lilo.conf.

Actually a while ago I had tried building my kernel so that it can run without initrd support, but I think I failed. I really want to get rid of initrd(unless it has some hidden advantages). I have tried building my filesystem driver, IDE Device Driver built-in to the kernel and then I removed the initrd line from my grub menu.lst file but I got a kernel panic. Can anyone suggest what did I miss to built into the kernel?

Thanks

konsolebox 08-06-2006 08:13 PM

hello kushalkoolwal. can u tell us the kerel panic message your received? was it something like 'tried to kill init' or something like unable to load init?

kushalkoolwal 08-07-2006 06:14 PM

Quote:

Originally Posted by konsolebox
hello kushalkoolwal. can u tell us the kerel panic message your received? was it something like 'tried to kill init' or something like unable to load init?

I am getting the following error message:

Code:

VFS:Cannot open root device "hda7" or unknown-block(0,0)
Please append a correct "root"= boot option
Kernel panic- not syncing: VFS: unable to mount root fs on unknwon-block(0,0)

But if I boot with initrd, the system boots normally.

Thanks

utanja 08-07-2006 07:21 PM

Quote:

Originally Posted by kushalkoolwal
I am getting the following error message:

Code:

VFS:Cannot open root device "hda7" or unknown-block(0,0)
Please append a correct "root"= boot option
Kernel panic- not syncing: VFS: unable to mount root fs on unknwon-block(0,0)

But if I boot with initrd, the system boots normally.

Thanks

did you include the filesystem driver for your file system in the kernel?

kushalkoolwal 08-07-2006 07:36 PM

Quote:

Originally Posted by utanja
did you include the filesystem driver for your file system in the kernel?

Yes I included the Filesystem Driver(ext3) and also ext2(just in case)l\.


Thanks

JackieBrown 08-07-2006 08:13 PM

Did you make sure to compile it into the kernel versus as a module. (X vs * if you are using make xconfig)

kushalkoolwal 08-07-2006 08:19 PM

Quote:

Originally Posted by JackieBrown
Did you make sure to compile it into the kernel versus as a module. (X vs * if you are using make xconfig)

Yes I did. If you read my 2nd post, I have mentioned that.

Is there anything else that I may be missing to compile *it* into the kernel.

Thanks

snuffy115 12-28-2006 09:11 PM

If you're still looking for an answer try this;

run lsmod and note all the modules that are loaded.
When compiling your kernel make sure all those modules are compiled into the kernel.


All times are GMT -5. The time now is 12:39 PM.