I am having a problem with setting up diskless clients under CentOS 5.2. I have everything working under CentOS 4.7. This is an adaptation of the (somewhat old) Diskless Linux with PXE HOWTO by Gerd v. Egidy, originally at the URL http://www.intra2net.com/opensource/diskless-howto/, which is now defunt (there is a mirror of it at http://blog.chinaunix.net/u/2389/showart_82438.html).
What I am doing is using a RAMDISK to mount a NFS exported (read-only) root file system and copying part of it to a RAMDISK root file system, all of this after configuring the clients ethernet (via DHCP) and loading the NFS modules. The RAMDISK uses a statically built BusyBox for all of its functions, including ash.
I am using the stock syslinux, dhcpd, tftp-server, and kernel RPMS.
My /tftpboot directory contains:
sauron.deepsoft.com% dir -l /CentOS52/tftpboot/ total 10012 -rw-r--r-- 1 root root 8388608 Feb 12 14:26 pxeboot-2.6.18-92.el5.img -rw-r--r-- 1 root root 13148 Feb 11 16:27 pxelinux.0 drwxr-xr-x 2 root root 4096 Feb 12 14:37 pxelinux.cfg/ -rw-r--r-- 1 root root 1806388 Feb 11 16:26 vmlinuz-2.6.18-92.el5 sauron.deepsoft.com% dir -lhR /CentOS52/tftpboot/ /CentOS52/tftpboot/: total 9.8M -rw-r--r-- 1 root root 8.0M Feb 12 14:26 pxeboot-2.6.18-92.el5.img -rw-r--r-- 1 root root 13K Feb 11 16:27 pxelinux.0 drwxr-xr-x 2 root root 4.0K Feb 12 14:37 pxelinux.cfg/ -rw-r--r-- 1 root root 1.8M Feb 11 16:26 vmlinuz-2.6.18-92.el5
/CentOS52/tftpboot/pxelinux.cfg: total 16K -rw-r--r-- 1 root root 101 Feb 12 14:37 default -rw-r--r-- 1 root root 134 Feb 12 14:09 default~
and /CentOS52/tftpboot/pxelinux.cfg/default contains:
sauron.deepsoft.com% cat /CentOS52/tftpboot/pxelinux.cfg/default LABEL linux KERNEL vmlinuz-2.6.18-92.el5 APPEND ramdisk_size=8192 initrd=pxeboot-2.6.18-92.el5.img
vmlinuz-2.6.18-92.el5 is the stock kernel, copied from /boot
pxeboot-2.6.18-92.el5.img is a 8meg EXT2 filesystem image (under CentOS 4.7 the image is compressed, under CentOS 5.2, I have it uncompressed -- I seem to get 'further' that way).
The last thing the kernel writes out is:
RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 8192KiB [1 disk] into ram disk... done. EXT2 fs: blocksize too small for device. grow_buffers: requested out-of-range block 18446744071562067968 for device ram0 isofs_fill_super: bread failed, dev=ram0, iso_blknum=17, block=-2147483648 No filesystem could mount root, tried: ext2 iso9660 Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,3)
Under CentOS 4.7 (*stock* kernel version 2.6.9-67.0.22.EL), the ramdisk is uncompress, mounted, and the linuxrc script runs. Once the root file system is NFS mounted and setup, the normal boot process continues to completion. *Something* seems to be different with CentOS 5.2, and things don't seem to work and I cannot figure it out. I've looked through all of the kernel documents, but I am not finding any clues.