2008年6月19日 星期四

Network boot server


#
# Network boot server setting
#

# require package
dhcp
tftp-server
syslinux

# Setup dhcp server
EDIT /etc/dhcpd.conf
#-----------------------------------------------
ddns-update-style none;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.11 192.168.0.20;
default-lease-time 3600;
max-lease-time 4800;
option routers 0.0.0.0;
option subnet-mask 255.255.255.0;
filename "pxelinux.0";
}
#-----------------------------------------------

** option - filename : this is the file for pxe client download and execute

# Setup tftp server
EDIT /etc/xinet.d/tftp
#-----------------------------------------------
server_args = -v -s /tftpboot
disable = no
#-----------------------------------------------
restart xinetd
/etc/rc.d/init.d/xinetd restart

# Setup kernel for remote client
- Fedora Core
get from FC source
copy FC source : /isolinux/vmlinuz to /tftpboot/fc
copy FC source : /isolinux/initrd.img to /tftpboot/fc-initrd

# Setup pxelinux file for boot
mkdir /tftpboot (if not exists)
cp -a /usr/lib/syslinux/pxelinux.0 /tftpboot/
mkdir /tftpboot/pxelinux.cfg
EDIT /tftpboot/pxelinux.cfg/default
#-----------------------------------------------
prompt 1
default fc
timeout 150

label fc
kernel fc
append initrd=fc-initrd ramdisk_size=8192
#-----------------------------------------------

# Usage
# start dhcp server
1) /etc/rc.d/init.d/dhcpd start
2) start client machine use network boot
** default is boot from fc, press enter would continue

# nfs install for linux (optional, u may not want to install throung nfs)
EDIT /etc/exports
#-----------------------------------------------
/data/FC (ro)
#-----------------------------------------------
/etc/rc.d/init.d/nfs start

沒有留言: