利用Serva网络引导安装CentOS7

官网下载地址:https://www.vercot.com/~serva/download.html,下载Community社区版就可以

安装成功后,点击左上角图标弹出菜单,选择Settings进行设置

 

HTTP设置如下图: 

 TFTP设置如下图:

DHCP设置如下图:

设置完成后确定,关闭Serva重新启动。

在设置成功后,在所设置的目录下会生成几个文件夹,如下:

 

NWA_PXE目录是存放Linux系统的

WIA_RIS目录是存放早期Windows系统,如XP,Windows2000等

WIA_WDS目录是存放Windows系统,如Windows10、Windows Server 2016等。

这次是要安装CentOS7所以是使用NWA_PXE目录

将CentOS7的ISO文件解压到NWA_PXE目录中,如下:

 

 

 在目录中创建ServaAsset.inf文件,这个文件有所需的引导和安装等信息。这个文件创建方法和内容在Serva网站上有详细的说明,地址:https://www.vercot.com/~serva/an/NonWindowsPXE3.html

 ServaAsset.inf文件(文件内容为CentOS系统的,如需要其他Linux版本参看上面的地址。Windows系统不需要该文件,只需要把Windows系统ISO文件解压到相应的目录就可以)

;-Serva v3.0 Asset Information File 
;-Boot/Install:
;  Red Hat Enterprise Linux / CentOS Linux
;-Tested on:
;  rhel-server-7.5-x86_64-dvd.iso
;  rhel-server-7.5-x86_64-boot.iso 
;  rhel-workstation-7.5-x86_64-dvd.iso
;  rhel-workstation-7.5-x86_64-boot.iso
;  rhel-client-7.5-x86_64-dvd.iso
;  rhel-client-7.5-x86_64-boot.iso
;  rhel-atomic-installer-7.5.0-1.x86_64.iso
;
;  rhel-server-7.4-x86_64-dvd.iso
;  rhel-server-7.4-x86_64-boot.iso 
;  rhel-workstation-7.4-x86_64-dvd.iso
;  rhel-workstation-7.4-x86_64-boot.iso
;  rhel-client-7.4-x86_64-dvd.iso
;  rhel-client-7.4-x86_64-boot.iso
;  rhel-atomic-installer-7.4.0-1.x86_64.iso
;
;  rhel-server-7.3-x86_64-dvd.iso
;  rhel-server-7.3-x86_64-boot.iso 
;  rhel-workstation-7.3-x86_64-dvd.iso
;  rhel-workstation-7.3-x86_64-boot.iso
;  rhel-client-7.3-x86_64-dvd.iso
;  rhel-client-7.3-x86_64-boot.iso
;
;  rhel-server-7.2-x86_64-dvd.iso
;  rhel-server-7.2-x86_64-boot.iso
;  rhel-workstation-7.2-x86_64-dvd.iso
;  rhel-workstation-7.2-x86_64-boot.iso
;  rhel-client-7.2-x86_64-dvd.iso
;  rhel-client-7.2-x86_64-boot.iso
;  rhel-atomic-installer-7.2-10.x86_64.iso
;
;  CentOS-7-x86_64-DVD-1804.iso
;  CentOS-Atomic-Host-7-Installer.iso (2018-Jun-11)
;
;  CentOS-7-x86_64-DVD-1708.iso
;  CentOS-Atomic-Host-7-Installer.iso (2017-Nov-28)
;
;
;  rhel-workstation-6.5-x86_64-dvd.iso
;  rhel-server-6.5-x86_64-dvd.iso
;  CentOS-6.5-x86_64-bin-DVD1.iso
;
;-Require:
;  \SERVA_REPO\ offered as HTTP root
;-Notes:
; For KickStart
;  7.3 and up > Add to append  inst.ks=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/images/pxeboot/ks.cfg
;  7.2 > Add to append  ks=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/images/pxeboot/ks.cfg
[PXESERVA_MENU_ENTRY]
asset    = CentOS Linux
platform = x86_64

kernel_bios    = /NWA_PXE/$HEAD_DIR$/images/pxeboot/vmlinuz
append_bios    = initrd=/NWA_PXE/$HEAD_DIR$/images/pxeboot/initrd.img inst.repo=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/
;7.2 > append_bios    = initrd=/NWA_PXE/$HEAD_DIR$/images/pxeboot/initrd.img root=live:http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/LiveOS/squashfs.img ksdevice=bootif repo=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/
;6.x > append_bios    = initrd=/NWA_PXE/$HEAD_DIR$/images/pxeboot/initrd.img method=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$ noipv6 ksdevice=bootif
ipappend_bios   = 2

kernel_efi64   = /NWA_PXE/$HEAD_DIR$/images/pxeboot/vmlinuz
append_efi64   = initrd=/NWA_PXE/$HEAD_DIR$/images/pxeboot/initrd.img inst.repo=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/
;7.2 > append_efi64   = initrd=/NWA_PXE/$HEAD_DIR$/images/pxeboot/initrd.img root=live:http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/LiveOS/squashfs.img ksdevice=bootif repo=http://$IP_BSRV$/NWA_PXE/$HEAD_DIR$/
ipappend_efi64 = 2

 利用虚拟机进行测试

先设置虚拟机使用网络启动

引导到Serva PXE安装菜单,可以看到暂时只有CentOS系统,如果配置了其他系统的话,菜单中也会出现。

下图为配置了Windows10和CentOS两个系统。

 

 

选中要安装的系统,开始进行安装。

 

 不知道为什么一进来就是选中了中文。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章