Quote:
Code:
root@debian:/tmp/initrdmount# ls Also when I found that the modules directory is empty, I tried booting the same kernel without inird i.e. I just removed the line initd /boot/initrd.img-2.6.15-1 from the menu.lst file. And to my surprise I got a kernel panic error. Why is that so? how can I find out what is my kernel using from initrd image in order to boot the system normally. And also why the modules folder is empty inside my initrd image's extracted contents. I am really confused at this point. Any clearification will be highly appreciated. Thanks..... |
You are right.
Have you checked in : /tmp/initrdmount/lib/modules/2.6.15-1 ? By uncompressing as you did, you will maybe realise that some modules which are loaded are maybe not needed or that file are not even used. So you can tweak your initrd so that your machine will boot faster (not much but still..) Always keep a copy of your old initrd (and remember the name also)!! |
Quote:
Code:
root@debian:/tmp/initrdmount/lib/modules/2.6.15-1/kernel/drivers# ls ide/ Also, I encountered a new kind of initrd image on one of my other system and I don;t know how to extract it. Basically this is what I get after giving the command that you had suggested: Code:
debian:/# file -z /boot/initrd.img-2.6.16 THanks once again for being such a wonderful guide. |
anyone????
:confused: |
cpio -i < /boot/initrd.img-2.6.16
|
Yes I was able to find tons of modules in the location which you specified. Here is the output:
Code:
root@debian:/tmp/initrdmount/lib/modules/2.6.15-1/kernel/drivers# ls ide/ THanks once again. |
This is a mkinitrd question, which I don't know so much (no need here) so I can't help.vi /usr/sbin/mkinitrd.. 1500 lines of pain
I would say that mkinitrd looks into /lib/modules/<kernel_to_install/ and puts some basic tools + guess of list of modules to load (for HDD..) + list of user supplied modules. I'm surprised that you have by default all these useless modules. Have you activated these options in .config ? What you could so is use a postinst_script to clean it up whatever the kernel does. You have to reference your script in /etc/kernel-pkg.conf. This file is read when building debian kernels and you can easilly customize the installation there. Like extract the cpio, remove unwanted, rearchive again. Also add a line to do a copy of the old one in case (like kernel-package does : initrd.old) edit: Code:
man mkinitrd.conf |
If your initrd is a compressed cpio archive and you mount it anyway, it will look empty, when in reality it is not. I will see the same thing for my SuSE's initrd file. The decompressed initrd file (a copy) will mount using the ramfs filesystem and look empty.
Instead try: mkdir /tmp/initrd-dir cd /tmp/initrd-dir zcat /boot/initrd >initrd cpio -ivd <initrd rm initrd Now you have access to the contents. |
All times are GMT -5. The time now is 05:37 AM. |