Rev 1676 | Blame | Compare with Previous | Last modification | View Log | RSS feed
Network Shark application execution through PXE
Download the GRUB source (I used version 0.97) and run a command like this:
./configure -enable-diskless --enable-preset-menu="menu.lst" --enable-3c90x --disable-ffs --disable-minix --disable-reiserfs --disable-xfs --disable-ufs2 --disable-vstafs
The -enable-diskless option asks to build the PXE compliant GRUB image pxegrub (you will find it in (GRUB_DIR)/stage2).
The --enable-3c90x option enables the support for specific 3Com card. You may need to change this option to support your network card.
The --enable-preset-menu="menu.lst" option says to the building procedure to embed the following menu.lst file:
-----------------------------------------------------
The menu.lst file used while building GRUB
-----------------------------------------------------
# default - boot the first entry.
default 0
# after 0 sec boot default.
timeout 0
fallback 0
title Shark
ifconfig --address=192.168.0.201 --mask=255.255.255.0 --server=192.168.0.130
tftpserver 192.168.0.130
rootnoverify (nd)
configfile (nd)/remote-menu.lst
-----------------------------------------------------
Do change the network information, like IP addresse and server address, to comply with your network.
Then execute "make" and copy the pxegrub image from (GRUB_DIR)/stage2 to your TFTP server directory (for example /tftpboot).
The suggested GRUB configuration can be improved by disabling other filesystems support (i.e., ext2) or, in case of need, to support more than one network card. The latter point is quite delicate, since many GRUB users experienced some problems when including too much network card drivers in a single image.
The embedded menu.lst configuration file points to the remote-menu.lst:
-----------------------------------------------------
The remote-menu.lst file
-----------------------------------------------------
default 0
timeout 0
title Remote Shark
kernel (nd)/shark
boot
-----------------------------------------------------
The remote-menu.lst file says to GRUB to load the "shark" executable application.
ATTENTION: Shark kernel and applications must be built with the VM86 option turned on in shark.cfg.
The following lines are an example of the DHCP server configuration file needed to tell to the PXE boot process where to get the PXE image. Of course, again, you may need to adapt network parameters to your needs.
-----------------------------------------------------
The dhcpd.conf file (using dhcp3)
-----------------------------------------------------
option domain-name "mydomain.net";
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
server-name "server-name";
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.205;
option routers 192.168.0.255;
}
host shark-client1 {
# MAC address of the machine where the Shark application will run
hardware ethernet 00:0A:5E:3C:97:14;
# IP address assigned to that machine
fixed-address 192.168.0.201;
# PXE image to be served from the TFTP server
filename "pxegrub";
# TFTP server address
next-server 192.168.0.130;
}
-----------------------------------------------------