LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to interact with the initramfs? (https://www.linuxquestions.org/questions/linux-kernel-70/how-to-interact-with-the-initramfs-780266/)

ott0disk 01-06-2010 08:30 AM

How to interact with the initramfs?
 
Hi all,could some one tell me how to tell the initramfs which module not to load??I've got a huge trouble with my new laptop,finally i discovered this is a kernel bug(conflict between the b43 module and acpi)so it can't boot.The solution is,pull off ssb and b43 module from the initramfs and load them in a higher runlevel..HOW TO DO THAT?thanks

theNbomr 01-06-2010 04:24 PM

There are numerous online articles that explain how to decompose an initramfs. One that looks like a good starting point is Decompress and compress initramfs images.
As far as loading drivers post-boot, that may be as simple as adding entries for the drivers to /etc/modprobe.conf

--- rod.

Quakeboy02 01-06-2010 08:20 PM

The most important question is can you boot? If you can, then it's just a matter of making whatever changes you need to make and then running "update-initramfs" (see the man page for parameters). If you can't boot, then you're going to need to do something like the following:

1. Boot from a liveCD
2. With a terminal session, "chroot" into your drive and make your changes
3. Run "update-initramfs" with the appropriate paramaters.

vishesh 01-06-2010 10:10 PM

You can edit initramfs to include any module using following step
mkdir /root/temp
cd /root/temp
gzip -d /boot/initrd-2.6.27.7.img|cpio -i
After that you got content of initrd in /root/temp folder.
Then edit/root/temp/init file and then again create cpio archived initrd
cd /root/temp
find .|cpio --create --format 'newc'>/tmp/myinitrd
gzip /tmp/myinitrd
cp /tmp/myinitrd /boot/

Now boot using myinitrd


All times are GMT -5. The time now is 04:23 PM.