码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • Why does PXE boot with grub2 and UEFI fails with error “File not found“ ?


    环境

    • Red Hat Enterprise Linux 7
    • Red Hat Enterprise Linux 8

    问题

    Installation of UEFI system using PXE boot with grub2 bootloader grubx64.efi fails with error File not found.

    1. error: ../../grub-core/net/tftp.c:281:File not found.
    2. error: ../../grub-core/loader/i386/efi/linux.c:93:you need to load the kernel first.
    3. Press any key to continue..._

    决议

    This error indicates that the grub bootloader was able to load the grub configuration file but it has not found either the kernel or the initramfs files paths which are defined in it.

    Verify the tree of the tftp home directory which is usually /var/lib/tftpboot to check the path of the kernel and the intramfs files with respect to the tftp home directory.

    1. # tree /var/lib/tftpboot/
    2. /var/lib/tftpboot/
    3. └── uefi
    4. ├── grub.cfg
    5. ├── grubx64.efi
    6. ├── images
    7. │ ├── initrd.img
    8. │ └── vmlinuz
    9. └── shimx64.efi
    10. # ls -lanR uefi/
    11. uefi/:
    12. total 3412
    13. drwxr-xr-x. 3 0 0 74 Jul 28 11:28 .
    14. drwxr-xr-x. 4 0 0 33 Jul 28 11:27 ..
    15. -rw-r--r--. 1 0 0 1503 Jul 28 11:28 grub.cfg
    16. -r-xr-xr-x. 1 0 0 2285512 Jul 28 11:28 grubx64.efi
    17. drwxr-xr-x. 2 0 0 39 Jul 28 11:27 images
    18. -r-xr-xr-x. 1 0 0 1202928 Jul 28 11:28 shimx64.efi
    19. uefi/images:
    20. total 83556
    21. drwxr-xr-x. 2 0 0 39 Jul 28 11:27 .
    22. drwxr-xr-x. 3 0 0 74 Jul 28 11:28 ..
    23. -rw-r--r--. 1 0 0 75530980 Jul 28 11:27 initrd.img
    24. -rwxr-xr-x. 1 0 0 10026352 Jul 28 11:27 vmlinuz

    In the above example the path for vmlinuz file relative to tftp home directory is uefi/images/vmlinuz and the path of the initramfs file with respect to tftp home directory is uefi/images/initrd.img. Setting these appropriate paths grub should be able to find the paths and start the installation.

    1. menuentry 'PXE Install Red Hat Enterprise Linux 8.4' --class fedora --class gnu-linux --class gnu --class os {
    2. linuxefi uefi/images/vmlinuz inst.stage2=http:///
    3. initrdefi uefi/images/initrd.img
    4. }

    根源

    • The grub bootloader for UEFI for UEFI based systems grubx64.efi takes the arguments for filepaths with relative to the tftp home directory.
  • 相关阅读:
    Echarts 问题解决 —— 图表数据过多导致浏览器卡顿
    用《斗破苍穹》的视角打开C#3 标签与反射(人物创建与斗技使用)
    【云原生 | 从零开始学Kubernetes】十二、k8spod的生命周期与容器钩子
    2015 CCPC 个人题解
    【升职加薪秘籍】我在服务监控方面的实践(7)-业务维度的redis监控
    互联网摸鱼日报(2023-11-08)
    【深度学习】卷积层填充和步幅以及其大小关系
    React高级特性之受控和非受控组件
    算法训练营第十三天 | 239. 滑动窗口最大值、347.前 K 个高频元素
    HT513 I2S输入的音频功放的应用场景
  • 原文地址:https://blog.csdn.net/taoxicun/article/details/126137747
  • 最新文章
  • 【FHE】我们如何实现同态加密推理(八):SiLU 的密文化——两条路径,和一个 8 字节的开关
    SQLcl 中 c/old/new 替换变量为何失效?先定位再替换
    不让模型写作文,直接从它脑子里读答案:Jev 决策在 .NET 的两条路线
    Halo插件:支持GitHub的图床附件策略
    电视投屏界的“一股清流”!SimpleTVCast 6.0.0-beta 抢先体验:无需TV端App,界面大换血!✨
    华三VXLAN集中式网关实战指南:Spine多活网关 + 双活接入(M-LAG)
    软件更好写之后口碑会更重要
    大 O、大 Omega、大 Theta 的区别,O(n) 复杂度是什么意思
    Java标签跳转:一个鲜为人知但却很实用的小技巧
    多智能体系统论文速读
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号