ubuntu10.10Desktop作为pxe服务器。ip是192.168.22.4.安装dhcp3,tftpd-hpa,apache
1. 创建/etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
RUN_DAEMON="yes"
#OPTIONS="-l -s -c /tftpboot"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c"
2. 修改/etc/dhcp3/dhcpd.conf
next-server 192.168.22.4;
subnet 192.168.22.0 netmask 255.255.255.0 {
option domain-name "pxe.env";
option domain-name-servers 192.168.22.4;
option routers 192.168.22.1;
option broadcast-address 192.168.22.255;
range 192.168.22.100 192.168.22.200;
default-lease-time 600;
max-lease-time 7200;
filename "pxelinux.0";
}
3. 复制ubuntu server 11.10光盘上的所有内容到/var/www/1110US文件夹
复制ubuntu server 11.10光盘上的install/netboot目录下的pxelinux.cfg,ubuntu-install文件夹到/tftpboot文件夹
复制ubuntu-install/amd64文件夹里的initrd.gz, linux, pxelinux.0到/tftpboot文件夹
修改/tftpboot/ubuntu-install/amd64/txt.cfg
default install
label install
menu label ^Install
menu default
kernel ubuntu-installer/amd64/linux
append vga=788 ks=http://192.168.22.4/ks initrd=ubuntu-installer/amd64/initrd.gz -- quiet
4. 编辑/var/www/ks
#Generated by Kickstart Configurator
#platform=x86
#System language
lang en_US
#Language modules to install
langsupport zh_CN --default=en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone Asia/Shanghai
#Root password
rootpw --iscrypted $1$M7yl.UVQ$vpD7QEvcnfimi60Do9EPH/
#Initial user
user xxx --fullname "" --iscrypted --password $1$h9vSmEta$x3hgA8diUxGfTxHlAhPVg.
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://192.168.22.4/1110US/
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext4 --size 15000 --grow
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=static --ip=None --netmask=None --gateway=None --nameserver=None --device=None
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
#Package install information
%packages
@everything