PXE網絡引導系統之服務器arm64

      中標麒麟高級服務器操作系統軟件(ARM64版)V7.0

            PXE網絡引導系統手冊

Server: centos 7.6(192.168.4.151)

Client: Neokylin Linux Advanced Server release V7.0

(Chromium)-aarch64 Build06.08.lic/20191206(dhcp)

                 目錄

一、server端安裝及配置

     1、安裝dhcp服務及修改配置文件
       1.1、yum安裝
       1.2、修改配置文件
       1.3、啓動服務
     2、安裝tftp服務及修改配置文件
       2.1、yum安裝
       2.2、修改配置文件
       2.3、拷貝內核文件
       2.4、修改grub內容
       2.5、添加權限啓動服務
     3、裝http服務及修改配置文件
       3.1、yum安裝
       3.2、創建目錄,拷貝ISO,添加權限
       3.3、啓動服務
     4、配置kickstart
       4.1、創建目錄拷貝文件

二、client端操作及安裝效果

     1、在bios中更改啓動方式爲網絡引導
     2、安裝過程

          
     
     
     
     
     

一、server端安裝及配置

1.安裝dhcp服務及修改配置文件

1.1使用yum裝包

yum install dhcp

1.2修改配置文件

vim /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
filename "grubaa64.efi";
next-server 192.168.4.151;
subnet 192.168.4.0 netmask 255.255.255.0 {
#option routers $ROUTER;
  #option subnet-mask $NETMASK;
  range dynamic-bootp  192.168.4.1 192.168.4.100;
  default-lease-time 21600;
  max-lease-time 43200;
}

1.3啓動服務

systemctl start dhcpd
systemctl enabled dhcpd

2.安裝tftp服務及修改配置文件

2.1 yum安裝

yum install tftp tftp-server xinetd

2.2 修改配置文件

修改vim /etc/xinetd.d/tftp,將disable改爲no

2.3拷貝內核文件
掛載鏡像到mnt進行拷貝

cp -rf /mnt/images/pxeboot/* /var/lib/tftpboot/
cp -rf /mnt/EFI/BOOT/grub*.efi /var/lib/tftpboot

2.4修改grub後內容如下

cat /var/lib/tftpboot/grub.cfg
set default="0"
function load_video {
    if [ x$feature_all_video_module = xy ]; then
    	insmod all_video
    else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb 

 

insmod vbe
    	insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=10

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install  Linux Advanced Server V7 HTTP' --class red --class gnu-linux --class gnu --class os {
        set root=(tftp,192.168.4.151)
        linux /vmlinuz ro inst.geoloc=0 console=ttyAMA0 console=tty0 rd.iscsi.waitnet=0 ip=dhcp inst.repo=http://192.168.4.151/kylin inst.ks=http://192.168.4.151/ks/kylin-ks.cfg rd.debug rd.udev.debug systemd.log_level=debug
        initrd /initrd.img
}

2.5添加權限啓動服務

chmod -R 755 /var/lib/tftpboot
systemctl start xinetd
systemctl start tftp


3.安裝http服務及修改配置文件

3.1 yum安裝

yum install httpd

3.2創建目錄,拷貝ISO,添加權限

mkdir /var/www/html/kylin/
rsync -a /mnt/ /var/www/html/kylin/
chmod -R 755 /var/www/html/kylin
cp -f /var/lib/tftpboot/grub.cfg /var/www/html/kylin/EFI/BOOT/grub.cfg

3.3啓動服務

systemctl start httpd

4.配置kickstart

4.1創建目錄拷貝文件

mkdir /var/www/html/ks
cp -f /tmp/kylin-ks.cfg /var/www/html/ks/(cfg文件手寫或生成都可以)
chmod -R 755 /var/www/html/ks
cat kylin-ks.cfg
# Installation disks
ignoredisk --only-use=sda
autopart --type=lvm

# Partition clearing information
clearpart --drives=sda --all
# Use graphical install
graphical
#autostep --autoscreenshot
# Keyboard layouts
keyboard --vckeymap=cn --xlayouts='cn'

# System language
lang zh_CN.UTF-8

# Network information
network  --bootproto=dhcp --device=enp125s0f0 --ipv6=auto --activate
network  --hostname=localhost.localdomain

# Run the Setup Agent on first boot
firstboot --enable

# X Window System configuration information
xconfig  --startxonboot

# System services
services --enabled="chronyd"

# System timezone
timezone Asia/Shanghai --utc --nontp
user --name=jingxiang --password=$6$Cuuh6ji7SRO2s4sC$/bs.6YK.4G5F.gXRju4vdj4z1FCc6k8ic.omk9FQN.C12lbYTzcwLzjWBs0ejyFg2wThjqm0w81jrc7HXf60N/ --iscrypted --gecos="jingxiang"

# Environment groups
# Minimal Install/最小安裝
# Server/基礎設施服務器
# File and Print Server/文件及打印服務器
# Basic Web Server/基本網頁服務器
# Virtualization Host/虛擬化主機
# Server with UKUI GUI/帶 UKUI GUI 的服務器
%packages
@^graphical-server-environment
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@hardware-monitoring
@input-methods
@internet-browser
@multimedia
@print-client
@x11
kexec-tools
wget
%end

# Root password
rootpw --iscrypted $6$g3sB2zTlLyrEKn14$wT8PLK7yc.0Ph2STBd2tHZnfCxj9wfOhDgg5lUd1ZN8LVRc0j4cMRNfQncoGXVbnaw3.qD7b6m8yekv6fgHFg.

# Password policies
%anaconda
pwpolicy root --minlen=8 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=8 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=8 --minquality=1 --notstrict --nochanges --notempty
%end
reboot
%post
# Get kyinfo
#wget http://192.168.4.151/kylin/{.kyinfo,LICENSE} --random-wait --directory-prefix /etc/
# Enable kdump
#sed -i "s/ crashkernel=auto / /" /boot/efi/EFI/kylin/grub.cfg
%end

二、client端操作及安裝效果

1 在bios中更改啓動方式爲網絡引導
2 安裝過程
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

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