               **************************************************
                      Myson MTD80X Based Fast Ethernet Card
                                 
                       Linux PXE Support Installation Guide
               **************************************************


-------------	
Introduction
-------------

Linux can be used as the server for remote-booting clients by providing 
DHCP and TFTP/MTFTP services. To create a remote boot 
network enviromnment you will need:

	DHCP Server, PXE Server (PXE daemon and TFTP/MTFTP daemon)

Before you configure these services, please make sure that these services 
are installed on Linux. 


-----------------------
Installation Procedure 
-----------------------

1. DHCP server:

   1.1 Editing the new file /etc/dhcpd.conf. 
    
	A sample dhcpd.conf file is shown below:

		subnet 192.168.1.0 netmask 255.255.255.0{    
			range 192.168.1.100 192.168.1.250;
			option broadcast-address 192.168.1.255;
		}
		host clientname{
			hardware ethernet 00:C0:B4:57:F7:E3;
			fixed-address 192.168.1.25;
			filename "/tftpboot/pxelinux.0";
			option broadcast-address 192.168.1.255;
		}

	"subnet " is an IP address that you allocated.
	"range" is a range of IP addresses that you want to allocat.
	"00:C0:B4:57:F7:E3" is the MAC address.
	"fixed-address" is a fixed-address for this client.

   1.2 touch the file "/var/lib/dhcp/dhcp.leases".

2. MTFTP and PXE service:

   2.1 Editing the new file /etc/xinetd.d/mtftp. 

	mtftp file sample is as follows:

		service mtftp
		{
			disable	= no
			socket_type		= dgram
			protocol		= udp
			wait			= yes
			user			= root
			server			= /usr/sbin/in.mtftpd
			server_args		= /tftpboot
		}
	
     If your Linux system is running inetd, you must add the following line 
     to your /etc/inetd.conf file to enable the TFTP and PXE MTFTP daemon:

		tftp  dgram udp wait root /usr/sbin/tcpd in.tftpd  /tftpboot
		mtftp dgram udp wait root /usr/sbin/tcpd in.mtftpd /tftpboot

   2.2 Add the following lines to your /etc/services file:

	mtftp		1759/udp
	pxe		67/udp
	pxe		4011/udp

   2.3 Edit the /etc/pxe.conf files so that the /etc/pxe.conf and /etc/mtftpd.conf 
       match your network configuration.

    2.3.1 You can find a section like "[Multicast_ip_addresses]" in mtftpd.conf.
       	  You must match pxe.conf and mtftpd.conf, so find the line 
	  "[Discovery_MCast_Addr]" and edit it as below in pxe.conf:

		[Discovery_MCast_Addr]
		224.1.5.5

	Setting address "224.1.5.5" is for matching with mtftpd.conf setting.

    2.3.2 linux-boot is disabled (mark) in Default setting.  If you want to enable
          it, find sections [Service_Types] and  [X86PC/UNDI/MENU], and 
          remark them. 
	
	  example: 

	 	14,Remote Install boot

	  find the section "[X86PC/UNDI/linux-boot/ImageFile_Name]", 
 	  and remark all lines in the section.

   2.4 Edit /tftpboot/pxelinux.cfg (if this file does not exist, you must  
       add it) as follows:

		prompt=1
		label linux
		kernel vmlinuz

   2.5 Download a file  from http://www.go.dlr.de/fresh/linux/src/syslinux-1.63.tar.gz.
       and uncompress this file as below:

		tar -zxvf syslinux-1.63.tar.gz

   2.6 After uncompressing the file, you can find a file "pxelinux.0" in 
       the syslinux-1.63 directory. Copy it to /tftpboot/.

		cp pxelinux.0 /tftpboot

   2.7 Copy kernel file to /tftpboot/

		cp /boot/vmlinuz /tftpboot/

   2.8 Make a directory  "linux-boot"  in  /tftpboot/X86PC/UNDI/

		cd /tftpboot/X86PC/UNDI/
		mkdir linux-boot

   2.9 Copy /tftpboot/X86PC/UNDI/linux-install/linux.0 to linux-boot

     		cd /tftpboot/X86PC/UNDI/linux-install/
		cp linux.0 ../linux-boot


   2.10 Copy kernel file to /tftpboot/X86PC/UNDI/linux-install 
        and linux-boot, and rename it as linux.1.

		cp /boot/vmlinuz /tftpboot/X86PC/UNDI/linux-install/linux.1
		cp /boot/vmlinuz /tftpboot/X86PC/UNDI/linux-boot/linux.1

   2.11 Make ramdisk and copy ramdisk file to /tftpboot/X86PC/UNDI/linux-install 
        and linux-boot, and rename it as linux.2.

		dd if=/dev/ramdisk of=ram.img
		msfs -t minix ram.img 8192
		mkdir ramdisk
		mount -n -o loop ram.img ramdisk
		mv filename1 ramdisk 
     		.	
		.	(put files you want in the ramdisk directory)
     		.
     		.
		mv filename2 ramdisk
		umount ramdisk
		cp ram.img /tftpboot/X86PC/UNDI/linux-install/linux.2
		cp ram.img /tftpboot/X86PC/UNDI/linux-boot/linux.2
 
   2.12 Make link 

		cd /tftpboot/X86PC/UNDI/BStrap/
		ln -s bstrap.0 bstrap
		cd /tftpboot/X86PC/UNDI/linux-install
		ls -s linux.0 linux
		cd /tftpboot/X86PC/UNDI/linux-boot
		ls -s linux.0 linux


3. After configuation is done, you must run these services (DHCP, PXE, 
   TFTP, MTFTP).  You can type "ntsysv" to set it up.  
		
		ntsysv

4. Reboot your system.


5. After rebooting, you must bind your adapter to allow the DHCP
   daemon to start.

		Insmod pci-scan.o
		Insmod mtd80x.o
		Ifconfig eth0 x.x.x.x  netmask x.x.x.x

6. Restart the DHCP daemon:

		./etc/rc.d/init.d/dhcpd restart

7. Finally, run the PXE;
 
		pxe


-------------------
Client Installation
-------------------

Please make sure your server was setup  before you turn on your client 
computer.  You can type " ps -A | grep dhcpd" and "ps -A | grep pxe" 
on your server to make sure these services are ready.

When you turn on you client system, you can see this message as follows:

Intel UNDI, PXE-2.0(build) For MYSON MTD80x 100/10 NIC(V1.02)
Copyright c 1997, 1998, 1999  Intel Corpoartion
CLIENT MAC ADDR: xx xx xx xx xx xx
DHCP K|

If your DHCP and PXE service are started correctly, 
you can see the following message:
	
CLIENT IP:x.x.x.x		MASK: x.x.x.x 	DHCP IP:x.x.x.x
Press F8 to view menuKKK(10)

When you press F8, you can see this message as follows:

Local Boot
Remote Install Linux
Remote Boot Linux






