Chinaunix首页 | 论坛 | 博客
  • 博客访问: 107583
  • 博文数量: 38
  • 博客积分: 1520
  • 博客等级: 上尉
  • 技术积分: 325
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-20 11:12
文章分类

全部博文(38)

文章存档

2012年(4)

2011年(1)

2010年(7)

2009年(21)

2008年(1)

2007年(4)

我的朋友

分类: LINUX

2009-06-25 11:00:44

所需软件:
     
        DHCP   NFS  TFTP  KICKSTART
 
DHCP配置:
 
cat /etc/dhcpd.conf
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample 
#
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
class "pxeclients"{
  match if substring(option vendor-class-identifier,0,9) = "PXEClient";
  filename "pxelinux.0";
  next-server 192.168.228.135;
}
subnet 192.168.228.0 netmask 255.255.255.0 {
 option routers 192.168.228.135;
 option subnet-mask 255.255.255.0;
 option nis-domain "testA";
 option domain-name "testA";
 option broadcast-address 192.168.228.255;
 option domain-name-servers 202.106.127.1,202.106.0.20;
 option time-offset -18000;
 range dynamic-bootp 192.168.228.10 192.168.228.20;
 default-lease-time 21600;
 max-lease-time 43200;
group {
  next-server 192.168.228.135;
  filename "/tftpboot/pxelinux.0";
 host testA{
  hardware ethernet 00:0c:29:42:79:36;
  fixed-address 192.168.228.135;
  option host-name "testA";       
          }                                          
 }
}
 
NFS配置:
 
cat /etc/exports
#/export *(ro,no_root_squash)
/mnt *(ro,no_root_squash,sync)
/export/ks *(ro,no_root_squash,sync)
/tftpboot *(ro,sync)
 
TFTP配置:
 
cp /usr/lib/syslinux/pxelinux.0  /tftpboot
mkdir -p /tftpboot/pxelinux.cfg
mount -o loop /export/rhel-server-5.3-x86_64-dvd.iso /mnt
cp /mnt/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
cp /mnt/images/pxeboot/initrd.img /tftpboot
cp /mnt/images/pxeboot/vmlinuz /tftpboot
cp /mnt/isolinux/* /tftpboot
 
cat /tftpboot/pxelinux.cfg/default
default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
  kernel vmlinuz
  append initrd=initrd.img
label text
  kernel vmlinuz
  append initrd=initrd.img text
label ks
  kernel vmlinuz
  append ks initrd=initrd.img
label local
  localboot 1
label memtest86
  kernel memtest
  append -
label linuxautoinstall
kernel vmlinuz
append ks=nfs:192.168.228.135:/export/ks/ks.cfg ksdevice=eth0 initrd=initrd.img devfs=nomount ramdisk_size=16384 nofb
 
cat /tftpboot/boot.msg
 
splash.lss
 -  To install or upgrade in graphical mode, press the 0107 key.
 -  To install or upgrade in text mode, type: 01linux text 07.
 -  To install or upgrade in text mode, type: 01linuxautoinstall 07.
 -  Use the function keys listed below for more information.
0f[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue]07
 
KICKSART文件ks.cfg:
 
cat /export/ks/ks.cfg
# Kickstart file automatically generated by anaconda.
install
nfs --server=192.168.228.135 --dir=/mnt/
#url --url
#url --url
#cdrom
key 2515dd4e215225dd
lang en_US.UTF-8
keyboard us
xconfig --startxonboot
network --device eth0 --bootproto dhcp --hostname testA
network --device eth1 --onboot no --bootproto dhcp --hostname testA
rootpw --iscrypted $1$sLa4N9NY$DEVmIVh/6e1k8gCmtEqYJ0
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --enforcing
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="3 quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --linux --drives=sda
part /boot --fstype ext3 --size=100 --asprimary
part / --fstype ext3 --size=7000 --asprimary
part swap --size=1400 --asprimary
part /home --fstype ext3 --size=100 --grow --asprimary
%packages
@development-libs
@editors
@system-tools
@core
@base
@network-server
@legacy-software-development
@legacy-software-support
@base-x
@chinese-support
@admin-tools
@development-tools
emacs
audit
kexec-tools
fipscheck
device-mapper-multipath
vnc-server
dnsmasq
xorg-x11-utils
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
imake
 
安装:
 
linux安装需要network boot pxe起动,选择linuxautoinstall将自动完成所有安装,如下:
 
阅读(482) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~