PXE Server端,需要安装下面的安装包
dhcp
tftp-server
syslinux
NFS/FTP/HTTP(三者中选择一个就好)
Exadata的安装方式
1. USB flash thumb drive 2. ISO image that may be used on DVD or as remote virtual media usingLightsOut remote virtual media capabilities. 3. ISO+NFS - where a small iso file is used to boot the system and the imaging payload is hosted on a NFS server. 4. PXE+NFS 5. PXE+ISO (New in 12.2.1.1.0)
本文的配置(PXE + NFS)适应于通过PXE的方式去安装Exadata OS或reimage。在12.2.1.1.0中可以通过PXE+ISO的方式安装,需要配置httpd。
[root@od ~]# cat /etc/yum.repos.d/oel68.repo [oel68] name=oel68 baseurl=file:///media/OL6.8\ x86_64\ Disc\ 1\ 20160518/ enabled=1 gpgcheck=0 [root@od ~]# [root@od ~]# yum install syslinux -y [root@od ~]# yum install tftp-server -y [root@od ~]# yum install nfs* -y [root@od ~]# yum install [root@od ~]# rpm -qa|egrep 'nfs|dhcp|syslinux|tftp'|sort -u dhcp-4.1.1-51.P1.0.1.el6.x86_64 dhcp-common-4.1.1-51.P1.0.1.el6.x86_64 nfs4-acl-tools-0.3.3-8.el6.x86_64 nfs-utils-1.2.3-70.0.1.el6.x86_64 nfs-utils-lib-1.1.5-11.el6.x86_64 syslinux-4.04-3.el6.x86_64 syslinux-nonlinux-4.04-3.el6.noarch tftp-server-0.49-8.el6.x86_64 [root@od ~]#创建文件夹,配置服务
/etc/selinux/config SELINUX=disabled 如果不是disabled可以通过下面的命令 [root@od ~]# getenforce Enforcing [root@od ~]# setenforce 0 [root@od !]# getenforce Permissive [root@od ~]# [root@od ~]# chkconfig --level 2345 tftp on [root@od ~]# chkconfig --level 2345 dhcpd on [root@od ~]# chkconfig --level 2345 xinetd on [root@od ~]# chkconfig --level 2345 nfs on [root@od ~]# chkconfig --list|egrep 'nfs|dhcp|xinet|tftp' dhcpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off dhcpd6 0:off 1:off 2:off 3:off 4:off 5:off 6:off nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off nfs-rdma 0:off 1:off 2:off 3:off 4:off 5:off 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off xinetd based services: tftp: on [root@od exaimage]# [root@od ~]# mkdir -p /exaimage/dl360 /exaimage/dl180 /exaimage/config [root@od ~]# mkdir /exaimage/pxelinux.cfg/ [root@od ~]# cp /usr/share/syslinux/pxelinux.0 /exaimage配置tftp
[root@od ~]# cat /etc/xinetd.d/tftp # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { disable = no #no意思为启用 socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /exaimage #指定文件夹 per_source = 11 cps = 100 2 flags = IPv4 } [root@od ~]#配置dhcp
[root@od ~]# cat /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
# see 'man 5 dhcpd.conf'
#
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
subnet 10.0.2.0 netmask 255.255.255.0 {
option routers 10.0.2.1; # Default gateway to be used by DHCP clients
option subnet-mask 255.255.255.0; # Default subnet mask to be used by DHCP clients.
option ip-forwarding off; # Do not forward DHCP requests.
option broadcast-address 10.0.2.255; # Default broadcast address to be used by DHCP client.
option domain-name "us.ohsdba.cn"; # This domain name will be used for GNS
option domain-name-servers 10.0.2.10; # IP address of the DNS server. In this document it will be ohs1
option time-offset -19000; # Central Standard Time
option ntp-servers 0.pool.ntp.org; # Default NTP server to be used by DHCP clients
range 10.0.2.120 10.0.2.150; # Range of IP addresses that can be issued to DHCP client
default-lease-time 21600; # Amount of time in seconds that a client may keep the IP address
max-lease-time 43200;
next-server 10.0.2.10;
filename "pxelinux.0";
} [root@od ~]#
配置nfs[root@od /]# cat /etc/exports /exaimage *(ro,no_root_squash,no_subtree_check,insecure) [root@od /]#配置PXE文件
[root@od ~]# cd /exaimage/ [root@od exaimage]# ls -ltr total 48 -rwxrwxrwx. 1 root root 26759 Feb 4 04:49 pxelinux.0 drwxr-xr-x. 2 root root 4096 Feb 4 05:57 dl360 drwxr-xr-x. 2 root root 4096 Feb 4 06:07 dl180 -rwxrwxrwx. 1 root root 210 Feb 4 06:23 boot.msg drwxrwxrwx. 2 root root 4096 Feb 4 06:30 pxelinux.cfg drwxr-xr-x. 2 root root 4096 Feb 4 08:27 config [root@od exaimage]#boot.msg文件内容
[root@od exaimage]# cat boot.msg press "Enter" to start the default installation(Compute Node),it will start in 30 seconds if not any keys is pressed Type "ExaDB" For Exadata Compute installation Type "ExaCell" For Exadata Cell installation [root@od exaimage]#default文件内容
[root@od exaimage]# cat pxelinux.cfg/default default ExaDB
timeout 300 #30 seconds
label ExaDB
prompt 1 #if 1 then the prompt is boot
display boot.msg #show message
kernel dl360/vmlinux-nfs-12.2.1.1.0-170126.2-compute
append initrd=dl360/initrd-nfs-12.2.1.1.0-170126.2-compute.img pxe stit updfrm dhcp reboot-on-success notests=diskgroup dualboot=no sk=10.0.2.10:/exaimage/dl360 preconf=10.0.2.10:/exaimage/config/preconf.csv
label ExaCell
prompt 1
kernel dl180/vmlinux-nfs-12.2.1.1.0-170126.2-cell
append initrd=dl180/initrd-nfs-12.2.1.1.0-170126.2-cell.img pxe stit updfrm dhcp reboot-on-success notests=diskgroup sk=10.0.2.10:/exaimage/dl180 preconf=10.0.2.10:/exaimage/config/preconf.csv
[root@od exaimage]#
[root@od dl360]# makeImageMedia.sh -h
USAGE:
makeImageMedia.sh -pxe [options] - make files for pxe + nfs distribution
makeImageMedia.sh [options] <output_iso_file> - make iso file
makeImageMedia.sh -autoiso [options] - make iso file with default output name
makeImageMedia.sh [options] - make cell installation USB
makeImageMedia.sh -h, --help, -? - prints this help
Options:
-preconf [<preconf_nfsip>:]<full path name of preconf file on nfs server>
The nfsip MUST be IP address of the NFS server not its hostname.
The preconf_nfsip can be same or different than the nfsip option,
allowing the preloaded configuration file to reside on different
subtree or entirely different nfs server from that of the imaging bits
on the nfsip nfs server.
-nfsip <ip_address>
IP address for the nfs server ISO + NFS and USB + NFS distribution.
if this option is not provided then IP address of eth0 interface is in use.
-nfs <full path to the nfs directory>
This directory must be exported in /etc/exports on the nfs server.
-dir <relative path to the deirectory in which NFS files will be landed>
A relative path from the nfs directory provided in -nfs option.
-logpath [nfsip:]<full path to the writeable nfs share>
If provided it will copy the imaging, zero and first boots logs to the
writable nfs share location in single tar bzip2 file <serial_num>.tbz.
The serial_num is the serial number of the system obtained as
dmidecode -s system-serial-number
-pxeout <pxe output filename>
overwrites default version number 120713 in output files
for pxe distribution.
-dhcp
use dhcp to get initial IP address during imaging
-stit
signal to force reimage even if installation exists on the machine
-factory
print special [FACTORY_...] messages for use by factory
-updfrm
check hardware and firmware versions. Update firmware where applicable.
-nodisktests
do not run disktests at zero boot. They take 6-14 hours!
-notests <group for validations to be skipped, e.g. diskgroup>
skips all validations with given vldgroup name. For example, if
diskgroup is given as the group name, then each validation with
vldgroup set to diskgroup will be skipped. diskgroup today includes
disktests, calibration and diskhealth. This is one more way to skip
disktests in addition to the nodisktests option.
-dualboot <yes|no>
overwtire default dual boot behaviour. It's only applicable for the
db node. By default dual boot feature (installing Linux image and
prereserving space for Solaris) depends on hardware type (system
product name). By default X4170 M2 and X4800 (G5) servers have dual
boot.
-noresetraid
do not reset existing configuration on RAID controller. By default
imaging code reset configuration on RAID controller. A side effect of
it is Linux re-imaging wipes Solaris installation our if it exists.
-kerver <kernel_version>
overwrite default kernel. By defaut installing kernel version depends
on hardware type (system product name). List of kernels and hardware
dependencies defined in the "kernel_ver" line at the very top of
makeImageMedia.sh script. This distribution supports kernels
"2.6.32-400.1.1.el5uek"
-reboot-on-success
do not wait for operator to power off machine on successful image,
just reboot. Useful for mass unattended imaging using preconf option.
DO NOT use in factory process.
[root@od dl360]#
传输文件
将Compute节点Image传输到/exaimage/dl360,将Cell节点Image传输到/exaimage/dl180,将reconf.csv文件传输到/exaimage/config
启动相关服务
# service dhcpd restart # service iptables stop [root@od ~]# service dhcpd start Starting dhcpd: [ OK ] [root@od ~]# service nfs start Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS mountd: [ OK ] Starting NFS daemon: [ OK ] Starting RPC idmapd: [ OK ] [root@od ~]# service xinetd start Starting xinetd: [ OK ] [root@od ~]#
注意:12.1.2.1.0之前的PXE image需要通过makeImageMedia.sh去创建,之后的可以直接下载使用,不需要通过这个脚本去创建,现在的文件中已不包makeImageMedia.sh文件。
[root@od dl360]# ./makeImageMedia.sh -pxe -dualboot no Please wait. Calculating md5 checksums for cellbits ... Calculating md5 checksum for exaos.tbz ... Calculating md5 checksum for dbboot.tbz ... Calculating md5 checksum for dbfw.tbz ... Calculating md5 checksum for diag.iso ... Calculating md5 checksum for kernel.tbz ... Calculating md5 checksum for ofed.tbz ... Calculating md5 checksum for sunutils.tbz ... Calculating md5 checksum for hputils.tbz ... Calculating md5 checksum for c7rpms.tbz ... Calculating md5 checksum for commonos.tbz ... Calculating md5 checksum for debugos.tbz ... Calculating md5 checksum for dbrpms.tbz ... Store filename of nfsimg tarball nfsimg-11.2.3.2.0-120713-DL360.tar inside initrd Please wait. Making initrd ... 214624 blocks Please wait. Calculating md5 checksums for boot ... PXE NFS image: /exaimage/image/dl360/./PXE/nfsimg-11.2.3.2.0-120713-DL360.tar PXE NFS md5 sum: /exaimage/image/dl360/./PXE/nfsimg-11.2.3.2.0-120713-DL360.tar.md5 PXE initrd: /exaimage/image/dl360/./PXE/initrd-11.2.3.2.0-120713-DL360.img PXE kernel: /exaimage/image/dl360/./PXE/vmlinux-11.2.3.2.0-120713-DL360 [root@od dl360]#
上面是Image版本为Exadata 11.2.3.2.0,通过脚本生成的PXE文件
下面是下载的Exadata 12.2.1.1.0PXE文件
[root@od dl360]# ls -ltr total 2869376 -rwxrwxrwx. 1 root root 5446176 Jan 26 21:23 vmlinux-nfs-12.2.1.1.0-170126.2-compute -rwxrwxrwx. 1 root root 115410613 Jan 26 21:23 initrd-nfs-12.2.1.1.0-170126.2-compute.img -rwxrwxrwx. 1 root root 73 Jan 26 21:35 nfsimg-12.2.1.1.0-170126.2-compute.tar.md5 -rwxrwxrwx. 1 root root 2817341440 Jan 26 21:35 nfsimg-12.2.1.1.0-170126.2-compute.tar -rwxrwxrwx. 1 root root 1046 Jan 27 00:47 README.txt -rwxrwxrwx. 1 root root 39525 Jan 29 07:45 README_FOR_FACTORY.txt [root@od dl360]#
Reference
http://www.syslinux.org/wiki/index.php
http://www.syslinux.org/wiki/index.php?title=PXELINUX
http://ipxe.org/start
https://support.microsoft.com/en-us/help/102737/differences-between-ftp-and-tftp