SCIENTIFIC-LINUX-DEVEL Archives

February 2007

SCIENTIFIC-LINUX-DEVEL@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Pablo Fernandez <[log in to unmask]>
Reply To:
Pablo Fernandez <[log in to unmask]>
Date:
Wed, 21 Feb 2007 07:26:35 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (166 lines)
Hi all,

Thanks for your answers. As Alex says, the problem is making changes for a PXE 
initrd image, not quite on an installed system.

The method Alex said looked to me too complicated for adding many modules to 
the image, since they're not only copied inside but also referenced from 
multiple files in very weird manners. We need a very complete inintrd to be 
able to install SL43 inside heterogeneus and very new machines, hence the 
need for a lot of new modules, and also be able to make it again in the 
future without spending days of fine-tuning.

I started looking into RedHat for this, and found out that SL also shipped 
some scripts to build those images!! They're found in the SL/build/scripts 
directory in the installation CD. Afterward I discovered that 
anaconda-runtime package also comes with an script for building the initrd 
image for PXE!! It's called /usr/lib/anaconda-runtime/mk-images (in fact, the 
script in the SL CD comes from anaconda)

Anyway I've tried to make it work but it's not as straigtforward as one can 
think, actually couldn't make it work :(
If I can manage I'll let you all know.

Regards,
Pablo

On Tuesday 20 February 2007 17:04, Alex Owen wrote:
> The prog /sbin/mkinitrd makes the initrd used to boot an INSTALLED
> system. The problem here is to generate an initrd used to INSTALL a NEW
> system.
>
> Alex Owen
>
> On Tue, 20 Feb 2007, Chris Hunter wrote:
> > Pretty sure that /sbin/mkinitrd has an option to include modules. I did
> > this with redhat 9 to include promise raid drivers.
> >
> > I believe mkinitrd is run when you install a new kernel rpm package.
> >
> > --
> > Chris Hunter
> > Systems Programmer
> > Department of Astronomy, Yale University
> > [log in to unmask]
> >
> > Quoting Alex Owen <[log in to unmask]>:
> >> Pablo.
> >>
> >> I have had to make a custom initrd for an updated net driver...
> >> Here are some basic notes. The "# recreate modules.cgz" step is the
> >> magic bit that took me time to learn!!
> >>
> >> Hmm.. you want a whole new kernel... I just back ported the specific
> >> driver... so do share your solution when you have it!
> >>
> >> Good luck
> >>
> >> Alex Owen
> >>
> >>
> >> #Basic method:
> >> # * extract initrd
> >> # * extract modules.cgz
> >> # * copy in module
> >> # * recreate modules.czg
> >> # * modify other files under initrd/modules/
> >> # * repack initrd
> >>
> >> mkdir /tmp/initrd
> >> cd /tmp/initrd
> >> rm -rf mnt modules
> >> mkdir mnt modules
> >> ####COPY real SL initrd.img to ./initrd.img.gz
> >> gunzip ./initrd.img.gz
> >> mount -oloop ./initrd.img ./mnt
> >> # extract modules.cgz
> >> cd modules
> >> zcat ../mnt/modules/modules.cgz | cpio -i --make-directories
> >> # copy in module (forcedeth.ko in my case)
> >> cp
> >> ~/redhat/nvidia/NV_MCP55_Linux_DRV_PKG_v1.11/RHEL4_U3/source/forcedeth.k
> >>o ./2.6.9-34.EL/i686/forcedeth.ko
> >>
> >> # recreate modules.cgz
> >> ## the cpio invocation is quite specific and took some hours to find
> >> find . -type f | cpio --quiet -H crc -o | gzip -9
> >>
> >> >/tmp/initrd/mnt/modules/modules.cgz
> >>
> >> #I needed to get my dirver loaded for these PIC ID's
> >> # modify other files under initrd/modules/
> >> cd /tmp/initrd
> >> cat <<'EOF' | sed -e's/  /\t/' >> ./mnt/modules/pcitable 0x10de  0x0056
> >> "forcedeth"
> >> 0x10de  0x0057  "forcedeth"
> >> 0x10de  0x0037  "forcedeth"
> >> 0x10de  0x0038  "forcedeth"
> >> 0x10de  0x0268  "forcedeth"
> >> 0x10de  0x0269  "forcedeth"
> >> 0x10de  0x0372  "forcedeth"
> >> 0x10de  0x0373  "forcedeth"
> >> EOF
> >>
> >> # repack initrd
> >> cd /tmp/initrd
> >> umount ./mnt
> >> gzip -9 initrd.img
> >>
> >> ##rename resulting initrd.img.gz to initrd.img and boot with this new
> >> initrd.img
> >>
> >>
> >> ----------------------------------------------------------------------
> >> Dr Richard Alexander Owen	           Physicist/Programmer
> >>
> >> Queen Mary, University of London      Tel: 0207 882 5054
> >> Physics Department		    Email: [log in to unmask]
> >> Mile End Road
> >> London E1 4NS, UK
> >> ----------------------------------------------------------------------
> >>
> >> On Tue, 20 Feb 2007, Pablo Fernandez wrote:
> >>> Hi all,
> >>>
> >>> We're trying to modify SL4.3 in order to be able to boot very new
> >>> machines over the network. In fact this has not been possible since the
> >>> hardware is not detected by the 2.6.9 kernel at PXE boot time (btw the
> >>> very first step).
> >>>
> >>> My question is if anyone, if possible, can tell me how does the SL team
> >>> create
> >>> the initrd image to boot from PXE. I can create the kernel myself (i.e.
> >>> 2.6.20, and make it detect the hardware) but I can't create the initrd
> >>> image
> >>> to start a kickstart installation (so mkinitrd doesn't help here). I
> >>> tried to
> >>> use the initrd image for pxe that comes with 2.6.9 but since it can't
> >>> load the modules it does not allow me to go on with the installation
> >>> (even though
> >>> the kernel detected the hardware before).
> >>>
> >>> Thank you all!
> >>> Regards,
> >>> Pablo Fernandez
> >>> --
> >>> =======================================================================
> >>>======= Pablo Fernandez Fernandez             e-mail:
> >>> [log in to unmask]
> >>> Dpto Fisica Teorica. C-XI.
> >>> Facultad de Ciencias
> >>> Universidad Autonoma de Madrid.                          Phone: 34 91
> >>> 497 3976
> >>> Cantoblanco, 28049 Madrid, Spain.                          Fax: 34 91
> >>> 497 4086
> >>> =======================================================================
> >>>=======

-- 
 =============================================================================
Pablo Fernandez Fernandez             e-mail: [log in to unmask]
Dpto Fisica Teorica. C-XI.
Facultad de Ciencias
Universidad Autonoma de Madrid.                          Phone: 34 91 497 3976
Cantoblanco, 28049 Madrid, Spain.                          Fax: 34 91 497 4086
 =============================================================================

ATOM RSS1 RSS2