[syslinux] netboot arbitrary linux systems

Andy Gayton andy at thecablelounge.com
Mon Jun 6 00:18:00 PDT 2005

I've been using pxelinux with good success to netboot knoppix systems.

This is link has been the base for my work so far:


I keep all of the netbootable systems in /tftpboot/systems/knoppix-#.##, 
where knoppix-#.## is the filesystem extracted from the knoppix cd.  I 
use a variation on the knoppix-terminalserver script to generate a 
miniroot.gz (initrd) image for each major knoppix revision.

pxelinux is then configured to point to the kernel and initrd and to the 
nfs share location for the system's root.

the initrd image's linuxrc takes care of loading a suitable network and 
nfs module, running pump to get an ip address and then mounting the 
remote root.

It is possible to customize the systems by running: cp -a 
system/knoppix-#.##  system/purpose ; chroot system/purpose but knoppix 
is a bit of beast which makes it heavy/complex to use as a base system.

I really want to be able to build arbitrary linux systems and then 
capture them with something like:

tar cvpf - ./ --exclude=./purpose-#.##.gz --exclude=./proc | gzip -c > 

and roll a custom initrd image to bootstrap them, and then make the 
systems available to be netbooted.

I'm having a lot of trouble rolling a custom initrd though :).  I've 
started with trying to netboot a simple ubuntu server system.  I'm 
generating the initrd for it on my laptop, which runs an ubuntu 
workstation install - same kernel version.

Any non-statically linked executable I put in the image is getting an 
"Illegal instruction" error.

I've attached the script which is generating the initrd.  This is the 
bit that's copying in the non-static binaries:

for file in ls ifconfig mount modprobe lsmod insmod ; do
     fullpath=`which $file`
     cp $fullpath $MINIROOT/bin
     for lib in `ldd $fullpath | awk '{print $3}'`; do
         cp $lib $MINIROOT/lib

Does anyone know what could be causing an "Illegal instruction" error 
for non-static binaries running from an initrd image?

More generally:
Is anyone working on something similiar?  Is this a suitable forum for 
this topic?  If not, apologies, could someone advise a more suitable forum?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mknetinitrd
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20050606/e41a0e47/attachment.ksh>

More information about the Syslinux mailing list