大家对深山红叶,矮人DOS工具箱之类的维护光盘应该不陌生了,作为企业,网吧网管,随手准备这样的光盘真的是能解决很多问题。对于网刻,相信很多人也有所了解。但是,在网吧/公司维护机器时。基本上面对的都是无光驱的机器,如果要用这些工具,只能是关机接上一个光驱,虽然也有USB TO IDE的转换线可以把台式机的光驱变成USB接口的,但受限于主板的兼容性以及外置电源供电的稳定性。有时候会出这样那样的问题。那么,如何更快速的开始我们的工作呢,答案是将这些工具移植到网络上一台服务器上,客户机利用PXE BOOT功能来得到一个菜单,来使用这些功能。如下图:
service tftp
{
disable = no (默认是yes,这里改成no,启用它)
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/local/tftp/sbin/in.tftpd//改成源码编译安装生成的启动文件
server_args = -v -m /tftpboot/rules -s /tftpboot //-s 表示用/tftpboot作为tftp目录的根目录. -v打开日志在/var/log/messages便于调试, -m 指定重定向规则
per_source = 11
cps = 100 2
flags = IPv4
}
rg \\ / # Convert backslashes to slashes
rg \# @ # Convert hash marks to @ signs
rg /../ /..no../ # Convert /../ to /..no../
rg A a
rg B b
rg C c
rg D d
rg E e
rg F f
rg G g
rg H h
rg I i
rg J j
rg K k
rg L l
rg M m
rg N n
rg O o
rg P p
rg Q q
rg R r
rg S s
rg T t
rg U u
rg V v
rg W w
rg X x
rg Y y
rg Z z
r ^/(.*) \1
tftp是由xinted来启动的,修改完后要记得service xinetd restart
ddns-update-style interim;
ignore client-updates;
default-lease-time 21600;
max-lease-time 43200;
authourtative;
next-server 192.168.1.103;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
range 192.168.1.1 192.168.1.100;
default-lease-time 21600;
max-lease-time 43200;
filename "/pxelinux.0";
option domain-name-servers 202.106.0.20;
}
prompt 0
timeout 60
menu title PXELINUX ADVANCED MENU SYSTEM
MENU WIDTH 80
MENU MARGIN 10
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 19
MENU ENDROW 24
MENU TIMEOUTROW 20
MENU BACKGROUND syslinux.jpg
label local
menu label Boot From Local Disk
LOCALBOOT 0
label knoppix
kernel images/knoppix/knoppix
append ramdisk_size=100000 init=/sbin/init lang=cn apm=power-off vga=791 splash=silent initrd=images/knoppix/knoppix.gz nfsdir=192.168.1.251:/opt/inst/knoppix nomce quiet BOOT_IMAGE=knoppix
label rhel4-i386
menu label RHEL 4 AS U4 i386 nfs(192.168.1.251:/opt/inst/r4)
kernel images/redhat/vmlinuz-rhel4-i386
append initrd=images/redhat/initrd-rhel4-i386.img devfs=nomount ramdisk_size=9216 text
label rhel4-x86_64
menu label RHEL 4 AS U4 x86_64 nfs(192.168.1.251:/opt/inst/r4-64)
kernel images/redhat/vmlinuz-rhel4-x86_64
append ks=nfs:192.168.1.240:/opt/inst/ks/ks4-x86_64 initrd=images/redhat/initrd-rhel4-x86_64.img devfs=nomount ramdisk_size=9216
label rhel5-i386
menu label RHEL 5 i386 nfs(192.168.1.251:/opt/inst/r5)
kernel images/redhat/vmlinuz-rhel5-i386
append ks=nfs:192.168.1.240:/opt/inst/ks/ks5 images=images/redhat/vmlinuz-rhel5-i386 initrd=images/redhat/initrd-rhel5-i386.img devfs=nomount ramdisk_size=9216
label rhel5-x86_64
menu label RHEL 5 x86_64 nfs(192.168.1.251:/opt/inst/r5-64)
kernel images/redhat/vmlinuz-rhel5-x86_64
append ks=nfs:192.168.1.240:/opt/inst/ks/ks5-x86_64 images=images/redhat/vmlinuz-rhel5-x86_64 initrd=images/redhat/initrd-rhel5-x86_64.img devfs=nomount ramdisk_size=9216
label clonezilla
menu label Boot a clonezilla
kernel images/clonezilla/vmlinuz
append initrd=images/clonezilla/initrd.gz boot=casper netboot nfsroot=192.168.1.240:/opt/inst/clonezilla
label ping
menu label Boot ping
kernel images/ping/kernel
append vga=normal devfs=nomount pxe ramdisk_size=33000 load_ramdisk=1 init=/linuxrc prompt_ramdisk=0 initrd=images/ping/initrd.gz root=/dev/ram0 rw noacpi noapm pci=noacpi lba acpi=off apm=off nfsroot=192.168.1.240:/opt/inst/ping
label floppy
menu label Boot a DOS 7.0 floppy disk with ghost2003
kernel images/floppy/memdisk
append initrd=images/floppy/fd.img
label ghost83
menu label Boot Ghost8.3
kernel images/ghost83/memdisk
append initrd=images/ghost83/ghost83.img
label win2k3
menu label Windows 2003 pxe install
kernel w2k3.0
LABEL winpe
menu label WindowsPE with Office
kernel winpe.0
label menu
menu hide
kernel vesamenu.c32