内容简介:华三服务器的ipmi的web提供了nfs挂载iso去安装,也是我之前使用的,发现研发给的镜像在4g以上(镜像基于centos7.3改的,我之前测试都是用的minimal镜像890M左右)。安装的时候报错,然后当面测试得出结论nfs的网速原因,其次也是我们这边办公网是百兆。。。办公网被it接管了,交换机密码不给,自己找了台5130交换机,下面接服务器和我自己电脑搭建测了下定制iso的pxe流程这是组网情况
华三服务器的ipmi的web提供了nfs挂载iso去安装,也是我之前使用的,发现研发给的镜像在4g以上(镜像基于centos7.3改的,我之前测试都是用的minimal镜像890M左右)。安装的时候报错,然后当面测试得出结论nfs的网速原因,其次也是我们这边办公网是百兆。。。
办公网被it接管了,交换机密码不给,自己找了台5130交换机,下面接服务器和我自己电脑搭建测了下定制iso的pxe流程
这是组网情况
10.96.4.1/24
+------------+
| switch |
| |
+-+--------+-+
| |
| |
+------+ +--------+
| |
| |
v v
+----+------+ +------+------+
| h3c server| | my pc |
+-----------+ +-------------+
10.96.4.2
叫同事帮忙配置下交换机的dhcp,我虚机桥接的,虚机ip配置为4.2。起初 ? 看到有 nextserver 还有个 tftp-server 两命令,以为 nextserver 是dhcp中继的命令,而 tftp-server 是指定pxe下载 pxelinux.0 的tftp ip,也就是一开始下面的配置
[H3C-S5130-dhcp-pool-1] bootfile-name pxelinux.0 [H3C-S5130-dhcp-pool-1] next-server 10.96.4.2
pxe的dhcp直接用交换机的,tftp和web我用 docker 起的,网上的做法基本都不能识别进到菜单界面,最后在 http://blog.chinaunix.net/uid-22621471-id-4980582.html 找到启发,复制EIF/BOOT下文件到tftp的根目录,并且bootfile-name设置为 BOOTX64.EFI 。 http/cvk 下是iso解压的,vmlinuz和initrd是镜像 /EFI/BOOT/ 里复制到tftp根目录的
.
├── docker-compose.yml
├── http
│ └── cvk
| .....
├── nginx-conf.d
│ └── default.conf
└── tftp
├── BOOTX64.EFI
├── fonts
│ ├── TRANS.TBL
│ └── unicode.pf2
├── grub.cfg
├── grubx64.efi
├── HDM-1.11.29_signed.bin //华三的HDM固件,忽略
├── initrd.img
├── MokManager.efi
├── TRANS.TBL
└── vmlinuz
docker-compose.yml
version: '3.4'
services:
nginx:
image: nginx:alpine
hostname: nginx
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- ./http:/usr/share/nginx/html
- ./nginx-conf.d:/etc/nginx/conf.d
network_mode: "host"
logging:
driver: json-file
options:
max-file: '3'
max-size: 100m
tftp:
image: pghalliday/tftp
hostname: tftp
volumes:
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
- ./tftp:/var/tftpboot
command:
["--verbose", "--foreground", "--secure", "/var/tftpboot"]
network_mode: "host"
logging:
driver: json-file
options:
max-file: '3'
max-size: 100m
default.conf
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
autoindex on;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
在交换机的dhcp里设置 bootfile-name BOOTX64.EFI 后pxe进入的菜单是 grub.cfg 的内容,而一般的官方的启动选项为
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet initrdefi /images/pxeboot/initrd.img
里面的 inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 是指向带label的hard disk,这里需要修改为url,这里我改为
linuxefi vmlinuz inst.repo=http://10.96.4.2/cvk ks=http://10.96.4.2:81/ks.cfg inst.ks.sendmac inst.ks.sendsn quiet initrdefi initrd.img
url是从我自己 go 写的一个web,ks会在访问web渲染后返回获取的,详情上一篇,ks文件里得加一行指定安装源
url --url="http://10.96.4.2/cvk"
一般网上的老资料都说在append后加启动选项 ksdevice=eth0 的指定获取ks的默认网卡,现在的centos里的anaconda已经改了逻辑会从每张网卡去retry获取,根本不需要指定,指定也可以,但是不是说不指定下会弹出选择需要人为去选择网卡
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- 为何要用到三层交换机?监控系统中三层交换机选择的七项指标
- 网络基本功之细说交换机
- 深度解析SDN交换机配置及应用问题
- 运维中交换机的常见问题及如何处理
- Phoenix工业交换机曝漏洞 石油、能源和海事受影响
- 基于 Python 的交换机实时监控系统的设计与实现
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Tango with Django
David Maxwell、Leif Azzopardi / Leanpub / 2016-11-12 / USD 19.00
Tango with Django is a beginner's guide to web development using the Python programming language and the popular Django web framework. The book is written in a clear and friendly style teaching you th......一起来看看 《Tango with Django》 这本书的介绍吧!