openstack安装系列之一:操作系统自动安装篇

openstack部署中操作系统安装是个问题,虽然有很多解决方案,但是都要安装一些软件,我试验一些基于操作系统的方法(注意操作版本),步骤:

1、安装配置DHCP;

2、安装配置TFTP与syslinux中的模块

3、PXE启动与安装

下面是详细内容:

 cat 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;
subnet 10.12.28.0 netmask 255.255.252.0 {

# --- default gateway
 deny unknown-clients;
 option routers   10.12.28.1;
 option subnet-mask  255.255.252.0;
 option nis-domain  "test-iaas.org";
 option domain-name  "test-iaas.org";
 option domain-name-servers 10.12.5.134;
 option time-offset  -18000; # Eastern Standard Time
 option ntp-servers  10.12.28.4;
 range dynamic-bootp 10.12.29.6 10.12.29.160;
 default-lease-time 21600;
 max-lease-time 43200;
 #pxe install part
 next-server 10.12.5.134;
 filename "/linux58/pxelinux.0";
 # we want the nameserver to appear at a fixed address
 host s29dot7 { next-server 10.12.5.134; hardware ethernet 00:25:90:2c:9f:40; fixed-address 10.12.29.7; }
 host s29dot160 { next-server 10.12.5.134; hardware ethernet 00:25:90:2c:9f:44; fixed-address 10.12.29.160; }
}

 cat /tftpboot/boot.msg

 
splash.lss

 -  Press the 01<ENTER>07 key to begin the installation process.
 

 cat /tftpboot/pxelinux.cfg/default
#default vesamenu.c32
default linux
prompt 1
timeout 6000

display boot.msg

menu background splash.jpg
menu title Welcome to linux
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000

label linux
  menu label ^Install or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img
label vesa
  menu label Install system with ^basic video driver
  kernel vmlinuz
  append initrd=initrd.img xdriver=vesa nomodeset
label rescue
  menu label ^Rescue installed system
  kernel vmlinuz
  append initrd=initrd.img rescue
label local
  menu label Boot from ^local drive
  localboot 0xffff
label memtest86
  menu label ^Memory test
  kernel memtest
  append -

ll /tftpboot/vmlinuz /tftpboot/initrd.img /tftpboot/pxelinux.0
-rw-r--r-- 1 root root 30754349 06-07 16:49 /tftpboot/initrd.img
-rw-r--r-- 1 root root    26828 06-07 17:05 /tftpboot/pxelinux.0
-rwxr-xr-x 1 root root  3938288 06-07 16:49 /tftpboot/vmlinuz

你可能感兴趣的:(Install,OS,pxe)