当前位置: 首页 > news >正文

arm64架构 统信UOS搭建PXE无盘启动Linux系统(麒麟桌面为例)

arm64架构 统信UOS搭建PXE无盘启动Linux系统(麒麟桌面为例) 搞了好久搞得头疼哎

1、准备服务器UOS服务器

准备服务IP 这里是192.168.1.100

1.1、安装程序

    yum install -y dhcp tftp tftp-server xinetd nfs-utils rpcbind 

2、修改配置

2.1、修改dhcpd.conf

 vi /etc/dhcp/dhcpd.conf

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp-server/dhcpd.conf.example
#   see dhcpd.conf(5) man page
#
#(DHCP-DNS互动)
ddns-update-style none;
#(忽略客户端更新)
ignore client-updates;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
option space PXE;
option client-system-arch code 93 = unsigned integer 16;
allow booting;
allow bootp;
option root-path "192.168.1.100:/data/share/html/workstation/";
subnet 192.168.1.0 netmask 255.255.255.0 {range 192.168.1.101 192.168.1.239;option broadcast-address 192.168.1.255;option routers 192.168.1.1;default-lease-time 600;max-lease-time 7200;next-server 192.168.1.100;if option client-system-arch = 00:07 or option client-system-arch = 00:09 {filename "efi/grub_kl.efi";} elsif option client-system-arch = 00:0B {filename  "efi/grubnetaa64.efi";}
}

2.2、修改tftp配置

/etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{socket_type             = dgramprotocol                = udpwait                    = yesuser                    = rootserver                  = /usr/sbin/in.tftpdserver_args             = -s /var/lib/tftpbootdisable                 = noper_source              = 11cps                     = 100 2flags                   = IPv4
}

2.3、修改nfs

nfs配置

3、启动、开启启动和重启

#启动
systemctl start dhcpd
systemctl start xinetd
systemctl start tftp
systemctl start nfs-server
systemctl start rpcbind
#开机启动
systemctl enable dhcpd
systemctl enable xinetd
systemctl enable tftp
systemctl enable nfs-server
systemctl enable rpcbind
#重启
systemctl restart dhcpd
systemctl restart xinetd
systemctl restart tftp
systemctl restart nfs-server
systemctl restart rpcbind

4、系统准备

## 虚拟机安装麒麟系统然后把系统放到/data/system下
rsync -Pa / /data/system --exclude=/media/* --exclude=/sys/* --exclude=/proc/* --exclude=/mnt/* --exclude=/tmp/* --exclude=/data/*

5、配置启动菜单

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#### BEGIN /etc/grub.d/00_header ###
set is_preload=true
###grub-password begin
###grub-password end
set have_grubenv=true
load_env
set timeout="1"
font=$prefix/fonts/unicode.pf2
insmod font
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/01_sw_settings ###
### END /etc/grub.d/01_sw_settings ###### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###### BEGIN /etc/grub.d/06_ubuntukylin_theme ###
insmod part_gpt
insmod ext2
insmod gfxmenu
insmod png
export theme
insmod gzio
### END /etc/grub.d/06_ubuntukylin_theme ###### BEGIN /etc/grub.d/10_linux ###
menuentry 'Kylin V10 SP1 5.4.18-85-generic' --unrestricted --class kylin --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0701d1e8-c29c-4bad-b96a-e02af022085f' {set gfxpayload=keepecho    'Loading Linux menuentry 5.4.18-85-generic ...'linux   /vmlinuz boot=nfs netboot=nfs nfsroot=192.168.1.100:/data/system rootwait rw locale=zh_CN KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet splash ip=dhcp  audit=0 liveinitrd  /initrd.lz
}

5.1、initrd.lz 和vmlinuz地址

# initrd.lz地址
mkdir ./kylin/data/
mount Kylin-Desktop-V10-SP1-General-Release-2303-ARM64.iso ./kylin/data/
cp ./kylin/data/casper/initrd.lz /var/lib/tftpboot/
# vmlinuz地址,TODO 在虚拟机系统上执行
sudo cp /boot/vmlinuz-`uname -r` ~/vmlinuz
#然后在把vmlinuz 放到192.168.1.100服务器下 /var/lib/tftpboot/下 重启tftp
systemctl restart tftp

6、客户端

设置boot 
boot Manage 设置UEFI PXEv4启动
http://www.lryc.cn/news/372056.html

相关文章:

  • SpringBoot 实现 阿里云语音通知(SingleCallByTts)
  • IDEA 连接GitHub仓库并上传项目(同时解决SSH问题)
  • vue/react/js 常用的原生获取当前页面的url网址的相关方法
  • java-final 关键字
  • ARM32开发--IIC软实现
  • 在有向无环图(DAG)中实现拓扑排序与最短路径和最长路径算法
  • SQLServer按照年龄段进行分组查询数据
  • 开放式耳机哪个品牌质量比较好?2024高性价比机型推荐!
  • Blender骨骼创建
  • DevExpress WPF中文教程:Grid - 如何完成列和编辑器配置(设计时)?
  • 高考完的三个月想自学点编程,有没有什么建议
  • 运维开发(DevOps):加速软件交付的关键方法
  • Vue前端环境搭建:从四个方面、五个方面、六个方面和七个方面深度解析
  • 农业领域科技查新点提炼方法附案例!
  • 【Bazel入门与精通】 rules之属性
  • Elementor无需第三方插件实现高级下拉菜单/巨型菜单
  • 【数学】什么是傅里叶变换?什么是离散傅里叶变换?什么是拉普拉斯变换?
  • opencv安装笔记 各种平台
  • 前端开发中的热更新原理
  • unix环境高级编程第2版:深入探索UNIX编程的奥秘
  • 力扣42 接雨水
  • 【代码随想录】【算法训练营】【第35天】[134]加油站 [135]分发糖果 [860]柠檬水找零 [406]根据身高重建队列
  • Talk|新加坡国立大学贾鑫宇:适用于高自由度机器人的运动控制器
  • 【npm】console工具(含胶囊,表格,gif图片)
  • OpenCV读取图片
  • HBase中的CRUD
  • C/C++学习笔记 C语言中的\0以及查找字符串中字符出现的频率
  • 在C#中,有多种方式可以实现每天在指定的时间清空数据库数据。下面列出几种常用的方法,并提供简要的实现思路:
  • 深入理解java设计模式之单例模式
  • 程序员自由创业周记#36:Gap Year