LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How to create initrd.img when compiling 2.6.16.20 for i386 on AMD 64 or whatever (http://www.linuxquestions.org/questions/linux-kernel-70/how-to-create-initrd-img-when-compiling-2-6-16-20-for-i386-on-amd-64-or-whatever-455719/)

penguin123 06-17-2006 01:06 PM

How to create initrd.img when compiling 2.6.16.20 for i386 on AMD 64 or whatever
 
How to create initrd.img when compiling 2.6.16.20 for i386 on an AMD 64 (or from any other architecture)

Here is my dilemma:

I have compiled 2.6.16.20 kernel on my AMD 64 for i368 architecture, which went fine, including creation of the modules. Here are the steps I completed so far:

cd /usr/local/src/linux-2.6.16.20/
make mrporper
make O=/home/penguin/kernel/for_ntdebpc gconfig ARCH=i386
make O=/home/penguin/kernel/for_ntdebpc ARCH=i386
make O=/home/penguin/kernel/for_ntdebpc ARCH=i386 modules
make O=/home/penguin/kernel/for_ntdebpc ARCH=i386 INSTALL_MOD_PATH=/home/penguin/kernel/for_ntdebpc/modules modules_install

My problem is creating the initrd.img for the i386 architecture. What would be the proper command, executed from the proper path, with proper parameters to build a initrd.img against what I have already built in home/penguin/kernel/for_ntdebpc

If I execute for example:
mkinitrd -o /home/penguin/kernel/for_ntdebpc/initrd-2.6.16.20.img 2.6.16.20
This build against the current machine (I think...?)


Best regards to all, any all hints will be appreciated
Chris, Ottawa


ps:
http://infowars.com
http://ottawa.yi.org

LegolasV 06-21-2006 04:26 AM

I think you need to put your modules in proper directory /lib/modules (for my Ubuntu, this is proper directory). mkinitrd only look at this directory for needed modules

vesperatus 10-21-2008 01:39 PM

I have a similiar issue.

I got a new box, that has no dvd drive and I install it using pxeboot, and compiled a new kernel to get my driver loaded. However, i'm trying to create some kind of generic initrd image that would be similar to the one found on any iso you use to install. Right now, the initrd created with mkinitrd seems to be customized for the box where it was created.

Is there any way to create a generic initrd file that can run on any hardware ?

penguin123 10-21-2008 06:43 PM

Yes there is a way to do that (I'm sure). I have not compiled an initrd for a few years now... but i think that if you want to compile an intird that will run on "any" hardware it must be "small" enough (to load on any hardware).... other than that (i'm not sure)... but (my original problem was modules....) afterwards there must be a lot of hardware probing going on to determine which module should be loaded to drive all the hardware....

Please post if you make any progress or solve the issue. If you could also elaborate on what you mean by "any hardware" that would be great.

I'm not an expert on initrd but just for reference; for others: (from wikipedia: "The complete linux driver set, covering every interface and file system that might be required, runs to many megabytes of object code. It is undesirable to waste memory on drivers for hardware that the system doesn't have" http://en.wikipedia.org/wiki/Initrd)

vesperatus 10-21-2008 07:00 PM

By "any" hardware, i'm basically trying to reproduce the same kind of initrd image you would find on a live CD, or the ones you would use to pxeboot a box.

I found some information later today and it seems that you cannot use mkinitrd to do that and must use some "other" thing.

If I find that "other" thing, you can be sure to hear back from me.


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