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:
Alex Owen <[log in to unmask]>
Reply To:
Alex Owen <[log in to unmask]>
Date:
Tue, 20 Feb 2007 09:38:58 +0000
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (100 lines)
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.ko ./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
> ==============================================================================
>

ATOM RSS1 RSS2