Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to rebuild vmlinuz and initrd.img from scratch for pxeboot environment

Reply
Thread Tools Display Modes

How to rebuild vmlinuz and initrd.img from scratch for pxeboot environment

 
 
Olivier BOURDON
Guest
Posts: n/a

 
      07-26-2004, 05:43 PM
Hello all and sorry for the wide posting

I have been surfing a lot lately to find a way to re-create custom
vmlinuz and initrd.img for a boot over net environment (read pxe) like
the
images which comes with Fedora core in /mnt/cdrom/images/pxeboot/
and specially the .config mandatory options to support kickstarting

It seems like I did not find anything really helping me out but only
stuff telling how to add a existing/pre-compiled driver into the
initrd.img so that unknown hardware is handled (even though I got
problems with module versions against vmlinuz revision)

Can anyone point me to something which could help ?

Thanks to all

Olivier
 
Reply With Quote
 
 
 
 
Juha Laiho
Guest
Posts: n/a

 
      07-26-2004, 06:02 PM
(E-Mail Removed) (Olivier BOURDON) said:
>Hello all and sorry for the wide posting


(nonexistent newsgroups snipped, followups set to comp.os.linux.setup)

>I have been surfing a lot lately to find a way to re-create custom
>vmlinuz and initrd.img for a boot over net environment (read pxe)

....
>Can anyone point me to something which could help ?


Well, custom vmlinuz is compiling your kernel yourself, possibly with
your choice of one-off patches applied.

As for initrd, it's just a file containing an image of a filesystem
(and if I recall correctly, may be compressed with gzip). Best way
to understand it is to disassemble one. If the image is compressed,
uncompress it. After that you can mount it by using the loop devices
(so, you set up a loop device that is backed by the image file, and
then mount that loop device to some temporary location -- see
"losetup").

I hope this provides at least starting points.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
Timothy Murphy
Guest
Posts: n/a

 
      07-26-2004, 08:03 PM
Olivier BOURDON wrote:

> It seems like I did not find anything really helping me out but only
> stuff telling how to add a existing/pre-compiled driver into the
> initrd.img so that unknown hardware is handled (even though I got
> problems with module versions against vmlinuz revision)
>
> Can anyone point me to something which could help ?


I don't understand the question.
If you don't like the compiled kernel
you will have to compile your own.

When you compile and install a kernel
that creates vmlinuz and initrd ,
and then you can install these in your pxeboot directory.


--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
 
Reply With Quote
 
Olivier BOURDON
Guest
Posts: n/a

 
      07-27-2004, 06:38 AM
OK so let's be a bit more precise then

I definitely WANT to compile a new kernel but I need to be sure that
the associated .config file used to build it will allow me to use it
in a pxeboot environment
So my 1st question: are there some mandatory kernel config parameters
that
I should set for this particular case?

Having done that, I run the make modules command to get the drivers .o
files that I need to associate this kernel to the initrd.img
modules.cgz file
Will it work as is or are there other things

Additionnal question: is there a way to have say a 2.4.22-2215 kernel
load a 2.4.22-2297 module without complaining about the version ?

Thanks again
 
Reply With Quote
 
Timothy Murphy
Guest
Posts: n/a

 
      07-27-2004, 12:42 PM
Olivier BOURDON wrote:

> I definitely WANT to compile a new kernel but I need to be sure that
> the associated .config file used to build it will allow me to use it
> in a pxeboot environment
> So my 1st question: are there some mandatory kernel config parameters
> that
> I should set for this particular case?


I don't think so.
As far as I know, any kernel that runs on your computer should work.
But have you read pxeboot.doc in /usr/share/doc/syslinux-<version>/ ?

> Having done that, I run the make modules command to get the drivers .o
> files that I need to associate this kernel to the initrd.img
> modules.cgz file
> Will it work as is or are there other things


I think you just compile the kernel in the usual way.
After creating the .config file with "make xconfig" or "make menuconfig"
you say something like "make dep; make clean; make bzImage; make modules"
and then "make modules_install; make install".

> Additionnal question: is there a way to have say a 2.4.22-2215 kernel
> load a 2.4.22-2297 module without complaining about the version ?


With 2.6.* kernels there is a config option
"Module versioning support (EXPERIMENTAL)" to allow this.
I'm not sure if it was there for 2.4.* kernels.

Personally I would compile a vanilla kernel, eg 2.4.26 or whatever,
unless there is a very strong reason not to.

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
 
Reply With Quote
 
Juhan Leemet
Guest
Posts: n/a

 
      07-27-2004, 04:09 PM
On Mon, 26 Jul 2004 23:38:56 -0700, Olivier BOURDON wrote:
> OK so let's be a bit more precise then
>
> I definitely WANT to compile a new kernel but I need to be sure that
> the associated .config file used to build it will allow me to use it
> in a pxeboot environment


It's usually a good idea to keep the old kernel, and have a backup boot
selection ("man lilo" or "man grub"), so that if the new kernel is
"busted" you can still boot the old kernel and make repairs. That is less
important nowadays, since there are several ways to boot rescue CDs, but
it is still rather convenient to use that feature.

--
Juhan Leemet
Logicognosis, Inc.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SP2 RIS to WDS conversion - pxeboot.com i smissing Arch Willingham Windows Networking 1 03-22-2007 11:33 PM
USB modem losing sync (since Windows rebuild) paulfoel Broadband 2 05-16-2006 12:17 PM
PXEboot problem - boots w/ 2.4.31, not 2.6.13 marshall@perilith.com Linux Networking 0 10-18-2005 07:59 PM
discover which card did pxe in initrd ittay.dror@gmail.com Linux Networking 0 02-15-2005 07:27 AM
initrd 'dev busy'? Robert McKee Linux Networking 3 04-25-2004 03:55 PM



1 2 3 4 5 6 7 8 9 10 11