LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-17-2006, 01:06 PM   #1
penguin123
LQ Newbie
 
Registered: Sep 2003
Location: Ottawa
Distribution: Debian 4.0
Posts: 13

Rep: Reputation: 1
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
 
Old 06-21-2006, 04:26 AM   #2
LegolasV
LQ Newbie
 
Registered: Aug 2005
Posts: 8

Rep: Reputation: 0
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
 
Old 10-21-2008, 01:39 PM   #3
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
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 ?
 
Old 10-21-2008, 06:43 PM   #4
penguin123
LQ Newbie
 
Registered: Sep 2003
Location: Ottawa
Distribution: Debian 4.0
Posts: 13

Original Poster
Rep: Reputation: 1
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)

Last edited by penguin123; 10-21-2008 at 06:44 PM.
 
Old 10-21-2008, 07:00 PM   #5
vesperatus
Member
 
Registered: Feb 2004
Posts: 44

Rep: Reputation: 15
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.
 
0 members found this post helpful.
  


Reply

Tags
initrd, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Initrd.img spaguzz Slackware 4 12-16-2004 03:35 AM
Initrd.img spaguzz Linux - Software 1 12-09-2004 03:21 PM
What's an initrd.img? hotel-lima Linux - Newbie 2 06-11-2004 05:50 PM
initrd.img php_rocks Linux - Newbie 1 08-31-2003 11:20 PM
Initrd-x.x.x-x.img File bas12547 Linux - Software 1 07-05-2003 07:47 AM


All times are GMT -5. The time now is 08:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration