一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Oracle 使用PXE刷XD案例

时间:2022-06-29 09:34:59 编辑:袖梨 来源:一聚教程网

使用PXE刷XD
需要安装服务
bind
dhcp
system-config-netboot
tftp-server
dhcp配置
[root@oracleplus ~]# more /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8)

[root@oracleplus ~]# more /etc/dhcpd.conf
subnet 192.168.30.0 netmask 255.255.255.0 {
  range dynamic-bootp 192.168.30.101 192.168.30.126;
  option broadcast-address 192.168.30.255;
  option routers 192.168.30.1;
  next-server 192.168.30.90;
  filename = "pxelinux.0";
}
--以下直接复制无需修改
ddns-update-style none;
subnet 10.182.77.0 netmask 255.255.255.0 {}
subnet 10.182.45.0 netmask 255.255.255.0 {
  range dynamic-bootp 10.182.45.92 10.182.45.100;
  option broadcast-address 10.182.45.255;
  option routers 10.182.45.1;
  next-server 10.182.77.133;
  filename = "pxelinux.0";
}
tftp配置
[root@oracleplus ~]# more /etc/xinetd.d/tftp
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -v -s /xd
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
nfs配置
[root@oracleplus ~]# more /etc/exports
/xd *(no_root_squash,no_subtree_check,insecure)
pxe配置
[root@oracleplus ~]# cp /usr/share/syslinux/pxelinux.0 /xd

[root@oracleplus pxelinux.cfg]# more /xd/pxelinux.cfg/default
default linux
timeout 70

label cell
prompt 1
display boot.msg
  kernel dl180/vmlinux-11.2.3.2.1-dl180-DL180
  append initrd=dl180/initrd-11.2.3.2.1-dl180-DL180.img pxe stit updfrm dhcp sk=192.168.30.90:/xd/dl180 preconf=192.168.30.90:/xd/prec
onf.csv

label db
prompt 1
display boot.msg
  kernel dl360/vmlinux-11.2.3.2.1-dl360-DL360
  append initrd=dl360/initrd-11.2.3.2.1-dl360-DL360.img pxe stit updfrm dhcp sk=192.168.30.90:/xd/dl360 preconf=192.168.30.90:/xd/prec
onf.csv
tar -pxvf the ImageMaker.tar
cd /xd/dl180
[root@oracleplus dl180]# ./makeImageMedia.sh -pxe -pxeout dl180
Please wait. Calculating md5 checksums for cellbits ...
Calculating md5 checksum for exaos.tbz ...
Calculating md5 checksum for cellboot.tbz ...
Calculating md5 checksum for cellfw.tbz ...
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 cellrpms.tbz ...
Calculating md5 checksum for doclib.zip ...
Calculating md5 checksum for cell.bin ...
Store filename of nfsimg tarball nfsimg-11.2.3.2.1-dl180-DL180.tar inside initrd
Please wait. Making initrd ...
214836 blocks
Please wait. Calculating md5 checksums for boot ...
PXE NFS image:   /xd/dl180/./PXE/nfsimg-11.2.3.2.1-dl180-DL180.tar
PXE NFS md5 sum: /xd/dl180/./PXE/nfsimg-11.2.3.2.1-dl180-DL180.tar.md5
PXE initrd:      /xd/dl180/./PXE/initrd-11.2.3.2.1-dl180-DL180.img
PXE kernel:      /xd/dl180/./PXE/vmlinux-11.2.3.2.1-dl180-DL180

[root@oracleplus dl180]# mv /xd/dl180/./PXE/nfsimg-11.2.3.2.1-dl180-DL180.tar /xd/dl180/
[root@oracleplus dl180]# mv /xd/dl180/./PXE/nfsimg-11.2.3.2.1-dl180-DL180.tar.md5 /xd/dl180/
[root@oracleplus dl180]# mv /xd/dl180/./PXE/initrd-11.2.3.2.1-dl180-DL180.img /xd/dl180/
[root@oracleplus dl180]# mv /xd/dl180/./PXE/vmlinux-11.2.3.2.1-dl180-DL180 /xd/dl180/

[root@oracleplus dl180]# ll
total 1531612
drwxr-xr-x   3 root root       4096 Mar 26 23:41 boot
drwxrwxr-x   2 root root       4096 Jan  9 22:34 doc
drwxr-xr-x   2 root root       4096 Jan  9 22:33 grub
drwxr-xr-x  17 root root       4096 Mar 26 23:41 initrd
-rw-r--r--   1 root root   38839215 Mar 26 23:41 initrd-11.2.3.2.1-dl180-DL180.img
-rwxrwxr-x   1 root root      27485 Jan  9 22:34 makeImageMedia.sh
-rw-r--r--   1 root root 1524193280 Mar 26 23:40 nfsimg-11.2.3.2.1-dl180-DL180.tar
-rw-r--r--   1 root root         68 Mar 26 23:41 nfsimg-11.2.3.2.1-dl180-DL180.tar.md5
drwxrwxr-x   3 root root       4096 Jan  9 22:34 patches
drwxr-xr-x   2 root root       4096 Mar 26 23:48 PXE
-r-xr-xr-x   1 root root      39041 Mar 31  2011 README_FOR_FACTORY.txt
-r-xr-xr-x   1 root root    3688864 Mar 26 23:41 vmlinux-11.2.3.2.1-dl180-DL180
上传preconf.csv到/xd目录
[root@oracleplus xd]# ll preconf.csv
-rw-r--r--  1 root root 2133 Mar 14 18:14 preconf.csv
然后重启dhcp,xinetd,nfs服务,重启需要恢复的xd的db and cell节点,验证结果如下


热门栏目