服务端:鲲鹏服务器
系统版本:4.19.0-arm64-server-uos
客户端:鲲鹏个人计算机
1. 下载服务(DNSMASQ,NFS,DEBIAN)
sudo apt-get install dnsmasq -y sudo apt-get install debian-installer-10-netboot-arm64 -y sudo apt-get nfs-kernel-server -y
2.下载完成,开始配置网络信息
修改以下文件:
sudo vi /etc/network/interfaces
在文件末尾添加以下内容:
# /etc/network/interfaces auto enp125s0f0 iface enp125s0f0 inet static address 192.168.0.13 netmask 255.255.255.0 gateway 192.168.0.1
修改完成重启网络服务(把网线换到需要安装的测试PC机上)
sudo systemctl restart networking
3.开始配置DNSMASQ服务
修改dnsmasq.conf文件,把配置文件中的5353端口打开,并把以下内容添加到文件中。
sudo vi /etc/dnsmasq.conf # 打开配置文件开放5353端口
listen-address=192.168.0.13,127.0.0.1 dhcp-boot=/debian-installer/arm64/bootnetaa64.efi,boothost,192.168.0.13 interface=enp125s0f0 #绑定网卡 bind-interfaces dhcp-range=192.168.0.50,192.168.0.150,1h #dhcp获取租期范围1h dhcp-option=3,192.168.0.1 #gateway dhcp-option=6,192.168.0.1 #DNS server=114.114.114.114 #转发DNS请求到上级服务器 dhcp-option=28,192.168.0.255 # 广播地址 dhcp-option=42,0.0.0.0 #NTP服务器,0.0.0.0指向自己 # 识别不同的BIOS dhcp-match=set:bios,60,PXEClient:Arch:00000 dhcp-boot=tag:bios,bios/pxelinux.0 dhcp-match=set:efibc,60,PXEClient:Arch:00007 dhcp-boot=tag:efibc,efi/syslinux.efi dhcp-match=set:efi,60,PXEClient:Arch:00009 dhcp-boot=tag:efibc,efi/syslinux.efi enable-tftp tftp-root=/var/tftp
4.配置tftp服务
sudo mkdir /var/tftp sudo touch inaccessible #在桌面上新建inaccessible文件 sudo systemctl restart dnsmasq.service sudo systemctl status dnsmasq.service
tftp配置:
sudo groupadd dnsmasq #创建dnsmasq组 sudo chown dnsmasq:dnsmasq /var/tffp -R sudo cp -r /usr/lib/debian-installer/images/10/arm64/text/debian-installer /var/tftp sudo vi /var/tftp/debian-installer/arm64/grub/grub.cfg #打开后将insmd gzio后内容全部删掉
### grub.cfg文件在insmd gzio后追加以下内容 # 桌面系统引导文件 menuentry 'Install uos-desk-arm64'{ set backgroud_color=black set gfxpayload=keep linux /debian-installer/deepin/Uos-Desk-Arm64/live/vmlinuz console=tty boot=live netboot=nfs nfsroot=192.168.0.13:/var/nfs/deepin/Uos-Desk-Arm64 components union=overlaylocales=zh_CN.UTF-8 livecd-installer -- initrd /debian-installer/deepin/Uos-Desk-Arm64/live/initrd.img }
5.拷贝UOS内核文件
sudo mkdir /var/tftp/debian-installer/deepin sudo mkdir /var/tftp/debian-installer/deepin/Uos-Desk-Arm64 # 拷贝内核文件 sudo cp -r /home/wang/Desktop/uos-20-desktop-arm64/live /var/tftp/debian-installer/deepin/Uos-Desk-Arm64 # 给予权限 sudo chown dnsmasq:dnsmasq /var/tftp/debian-installer/deepin -R sudo cp -r /var/tftp/debian-installer/arm64/grubaa64.efi /var/tftp
6.配置NFS服务
sduo mkdir /var/nfs echo '/var/nfs *(ro,sync,no_subtree_check)'| sudo tee -a /etc/exports sudo mkdir /var/nfs/deepin sudo mkdir /var/nfs/deepin/Uos-Desk-Arm64 # 拷贝镜像文件 sudo cp -r /home/wang/Desktop/uos-20-desk-arm64/* /var/nfs/deepin/Uos-Desk-Arm64 # 拷贝镜像隐藏文件 sudo cp -r /home/wang/Desktop/uos-20-desktop-arm64/.disk* /var/nfs/deepin/Uos-Desk-Arm64 sudo chown root:root /var/nfs/deepin -R find /var/nfs/deepin -type d -exec sudo chmod 755{} \ ;
7.重启网络服务,dnsmasq,nfs服务
sudo systemctl restart networking sudo systemctl restart dnsmasq.service sudo systemctl restart nfs-kernel-server