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

打印 上一主题 下一主题

主题 1046|帖子 1046|积分 3138

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
arm64架构 统信UOS搭建PXE无盘启动Linux体系(麒麟桌面为例) 搞了好久搞得头疼哎
  1、预备服务器UOS服务器

   预备服务IP 这里是192.168.1.100
  1.1、安装步伐

  1.     yum install -y dhcp tftp tftp-server xinetd nfs-utils rpcbind
复制代码
2、修改配置

2.1、修改dhcpd.conf

  1. vi /etc/dhcp/dhcpd.conf
复制代码
  1. #
  2. # DHCP Server Configuration file.
  3. #   see /usr/share/doc/dhcp-server/dhcpd.conf.example
  4. #   see dhcpd.conf(5) man page
  5. #
  6. #(DHCP-DNS互动)
  7. ddns-update-style none;
  8. #(忽略客户端更新)
  9. ignore client-updates;
  10. default-lease-time 600;
  11. max-lease-time 7200;
  12. log-facility local7;
  13. option space PXE;
  14. option client-system-arch code 93 = unsigned integer 16;
  15. allow booting;
  16. allow bootp;
  17. option root-path "192.168.1.100:/data/share/html/workstation/";
  18. subnet 192.168.1.0 netmask 255.255.255.0 {
  19.     range 192.168.1.101 192.168.1.239;
  20.     option broadcast-address 192.168.1.255;
  21.     option routers 192.168.1.1;
  22.     default-lease-time 600;
  23.     max-lease-time 7200;
  24.     next-server 192.168.1.100;
  25.     if option client-system-arch = 00:07 or option client-system-arch = 00:09 {
  26.         filename "efi/grub_kl.efi";
  27.     } elsif option client-system-arch = 00:0B {
  28.         filename  "efi/grubnetaa64.efi";
  29.     }
  30. }
复制代码
2.2、修改tftp配置

  1. vi /etc/xinetd.d/tftp
复制代码
  1. # default: off
  2. # description: The tftp server serves files using the trivial file transfer \
  3. #       protocol.  The tftp protocol is often used to boot diskless \
  4. #       workstations, download configuration files to network-aware printers, \
  5. #       and to start the installation process for some operating systems.
  6. service tftp
  7. {
  8.         socket_type             = dgram
  9.         protocol                = udp
  10.         wait                    = yes
  11.         user                    = root
  12.         server                  = /usr/sbin/in.tftpd
  13.         server_args             = -s /var/lib/tftpboot
  14.         disable                 = no
  15.         per_source              = 11
  16.         cps                     = 100 2
  17.         flags                   = IPv4
  18. }
复制代码
2.3、修改nfs

nfs配置
3、启动、开启启动和重启

  1. #启动
  2. systemctl start dhcpd
  3. systemctl start xinetd
  4. systemctl start tftp
  5. systemctl start nfs-server
  6. systemctl start rpcbind
  7. #开机启动
  8. systemctl enable dhcpd
  9. systemctl enable xinetd
  10. systemctl enable tftp
  11. systemctl enable nfs-server
  12. systemctl enable rpcbind
  13. #重启
  14. systemctl restart dhcpd
  15. systemctl restart xinetd
  16. systemctl restart tftp
  17. systemctl restart nfs-server
  18. systemctl restart rpcbind
复制代码
4、体系预备

  1. ## 虚拟机安装麒麟系统然后把系统放到/data/system下
  2. rsync -Pa / /data/system --exclude=/media/* --exclude=/sys/* --exclude=/proc/* --exclude=/mnt/* --exclude=/tmp/* --exclude=/data/*
复制代码
5、配置启动菜单

  1. cd /var/lib/tftpboot/
  2. mkdir efi
  3. vi efi/grub.cfg
复制代码
  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. # It is automatically generated by grub-mkconfig using templates
  5. # from /etc/grub.d and settings from /etc/default/grub
  6. #
  7. ### BEGIN /etc/grub.d/00_header ###
  8. set is_preload=true
  9. ###grub-password begin
  10. ###grub-password end
  11. set have_grubenv=true
  12. load_env
  13. set timeout="1"
  14. font=$prefix/fonts/unicode.pf2
  15. insmod font
  16. set locale_dir=$prefix/locale
  17. set lang=en_US
  18. insmod gettext
  19. ### END /etc/grub.d/00_header ###
  20. ### BEGIN /etc/grub.d/01_sw_settings ###
  21. ### END /etc/grub.d/01_sw_settings ###
  22. ### BEGIN /etc/grub.d/05_debian_theme ###
  23. set menu_color_normal=white/black
  24. set menu_color_highlight=black/light-gray
  25. ### END /etc/grub.d/05_debian_theme ###
  26. ### BEGIN /etc/grub.d/06_ubuntukylin_theme ###
  27. insmod part_gpt
  28. insmod ext2
  29. insmod gfxmenu
  30. insmod png
  31. export theme
  32. insmod gzio
  33. ### END /etc/grub.d/06_ubuntukylin_theme ###
  34. ### BEGIN /etc/grub.d/10_linux ###
  35. 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' {
  36.         set gfxpayload=keep
  37.         echo    'Loading Linux menuentry 5.4.18-85-generic ...'
  38.         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 live
  39.         initrd  /initrd.lz
  40. }
复制代码
5.1、initrd.lz 和vmlinuz地址

  1. # initrd.lz地址
  2. mkdir /kylin/data/
  3. mount Kylin-Desktop-V10-SP1-General-Release-2303-ARM64.iso /kylin/data/
  4. cp /kylin/data/casper/initrd.lz /var/lib/tftpboot/
  5. # vmlinuz地址,TODO 在虚拟机系统上执行
  6. sudo cp /boot/vmlinuz-`uname -r` ~/vmlinuz
  7. #然后在把vmlinuz 放到192.168.1.100服务器下 /var/lib/tftpboot/下 重启tftp
  8. systemctl restart tftp
复制代码
6、客户端

  1. 设置boot
  2. boot Manage 设置UEFI PXEv4启动
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

莫张周刘王

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表