[CentOS] PXE-Kernel crashes with "RAMDISK: incomplete write ..." after modifiying initrd.img

Thu Mar 26 14:54:39 UTC 2009
Frank Thommen <frank.thommen at embl-heidelberg.de>

Hi,

to install current PC models (with new Intel NICs) via Kickstart/PXE, I 
wanted to add the newest e1000e-Treiber to initrd.img.  With this 
modified image, the Kickstart kernel crashes with the following error 
messages:


[...]
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (20480 != 32768) 6062080
VFS: Cannot open root device "<NULL>" or unknown-block(253,3)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on 
unknown-block(253,3)


To modify the initrd.img, I took the original CentOS 5.2 image, unpacked 
with cpio/gunzip and replaced modules/2.6.18-92.el5/x86_64/e1000e.ko 
with a current version.  This driver module had been created on a 
freshly installed CentOS 5.2 host with kernel 2.6.18-92.el5 and w/o any 
updates.  After adding the driver, I re-archived and re-packed the image 
and replaced the initrd.img on my tftp server.


The new image is considerably bigger than the old one (12 MB vs. 5.7 MB) 
which puzzles me, as the driver file itself is 2.8 MB (compared to the 
old e1000e.ko with ca 170 KB) but the resulting modules.cgz is only 
around 700 KB bigger than the original one.  All files have been 
compressed with `gzip -9`.


My PXE bootsettings are:

   KERNEL CentOS-5.2_64/vmlinuz
   APPEND initrd=CentOS-5.2_64/initrd.img ramdisk_size=5940 kssendmac 
ks=http://srv/ks/ks.cgi noipv6


Even raising ramdisk_size doesn't help.  At around ramdisk_size=7100 
there seems to be an overflow and the size is recounted from zero (?).


Any Ideas, how one can/should create an updated and working initrd.img 
for Kickstart/PXE?


A similar question has been asked before on this list and a 
recommendation was to wait for 5.3.  Unfortunately I cannot wait for the 
next release.


Thanks in advance

     frank