无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 5074|回复: 33
打印 上一主题 下一主题

[已解决] G4E引导Archlinux内核6.2.1失败

[复制链接]
跳转到指定楼层
1#
发表于 2023-3-7 09:13:56 | 显示全部楼层 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 sunsea 于 2023-3-13 08:17 编辑

如图,G4E版本是http://bbs.wuyou.net/forum.php?mod=redirect&goto=findpost&ptid=434037&pid=4804015&fromuid=416965 29楼版本。



引导Archlinux失败,内核版本6.2.1,疑似已经干掉了EFI Handover Protocol了,目前引导LTS版6.1.15内核还是正常的……
早就听说这个东西已经被废弃了,Google了一下似乎从6.2开始EFI Handover Protocol就彻底废弃了……

2#
 楼主| 发表于 2023-3-7 10:21:52 | 显示全部楼层
本帖最后由 sunsea 于 2023-3-7 10:28 编辑
wintoflash 发表于 2023-3-7 09:26
http://bbs.wuyou.net/forum.php?m ... 3224&fromuid=487838

目前可以用 chainloader 来启动内核,不过  ...

好的感谢,不知道G4E是否有计划把kernel命令的实现机制改了……chainloader总感觉怪怪的……不过生产环境应该没人有64bit环境启动32bit需求。
以及有多个initrd该怎么写呢?(需要上微码更新)

回复

使用道具 举报

3#
 楼主| 发表于 2023-3-7 11:44:21 | 显示全部楼层
本帖最后由 sunsea 于 2023-3-7 11:56 编辑
wintoflash 发表于 2023-3-7 11:23
在考虑。主要是造成很多不兼容。

那就没办法了。还有initrd=后面路径用 / 还是 \ 我忘了。

生产环境应该32bit内核不是主流了吧。或者留一个切换参数,或者来个自动探测,优先EFI handover,不行再别的办法。kernel命令服务的是linux,那么也跟着主线走就是了……
回复

使用道具 举报

4#
 楼主| 发表于 2023-3-7 15:20:15 | 显示全部楼层
妈呀,一个反馈问题的帖子怎么一个个都是感谢分享的,都是机器人么?
回复

使用道具 举报

5#
 楼主| 发表于 2023-3-8 17:49:11 | 显示全部楼层
本帖最后由 sunsea 于 2023-3-8 17:51 编辑
wintoflash 发表于 2023-3-7 22:17
试试,暂时删了 EFI Handover Protocol 相关的东西,使用 LoadFile2 Protocol 提供 initrd。
我用 Manja ...

真机测试结果是直接死在configfile上。屏幕提示只有Will load external menu...没有Has entered the external menu...

内置菜单:
  1. debug 3
  2. find --set-root /EFI/grub/mydisk.sig
  3. echo Will load external menu...
  4. configfile /EFI/grub/menu.lst
  5. ########
复制代码


外置菜单:
  1. !BAT
  2. echo Has entered the external menu...
  3. terminal console
  4. debug 3
  5. echo set menu...
  6. setmenu --u
  7. setmenu --string=
  8. set prefix=%@root%
  9. echo loading graphics...
  10. font
  11. graphicsmode -1 1920
  12. splashimage /efi/grub/splash.hd.bmp.lzma
  13. font /efi/grub/unifont.hex.lzma

  14. echo 加载各种文件系统驱动,请稍后……
  15. #load /efi/grub/ntfs_x64_rw.efi
  16. #echo ntfs加载完成。
  17. #load /efi/grub/udf_x64.efi
  18. #echo udf加载完成。
  19. load /efi/grub/ext2_x64.efi
  20. echo ext加载完成。
  21. #load /efi/grub/iso9660_x64.efi
  22. #echo iso9660加载完成。
  23. #load /efi/grub/exfat_x64.efi
  24. #echo exfat加载完成。

  25. set sig_file=
  26. set wim_file=

  27. #设置中文菜单按键帮助
  28. setmenu --lang=zh
  29. #设置自动菜单编号
  30. setmenu --auto-num-on
  31. #设置日期时间
  32. #setmenu --string=215=65=0xffff66="date&time=yyyy-MM-dd HH:mm:ss"
  33. #设置菜单框
  34. #setmenu --box w=149 h=115 l=2

  35. default 1

  36. title -------启动菜单,不要选这里------
  37. find --set-root %sig_file%
  38. uuid %@root%
  39. kernel %prefix%/efi/grub/ntloader/ntloader uuid=%?% file=%wim_file% hires=1 minint=1
  40. initrd %prefix%/efi/grub/ntloader/initrd.lz1
  41. boot

  42. title 正常渠道启动Windows
  43. find --set-root /EFI/Microsoft/Boot/myharddisk.txt
  44. chainloader /EFI/Microsoft/Boot/bootmgfw.efi
  45. root %@root%
  46. boot

  47. title 加载本地Archlinux的Grub2菜单
  48. find --set-root /EFI/Microsoft/Boot/myharddisk.txt
  49. chainloader /EFI/arch/grubx64.efi
  50. root %@root%
  51. boot

  52. title 直入Archlinux 正常内核
  53. find --set-root /boot/intel-ucode.img
  54. uuid ()
  55. kernel /boot/vmlinuz-linux root=UUID=%?_UUID% rw splash loglevel=3 splash
  56. initrd /boot/intel-ucode.img /boot/initramfs-linux.img
  57. #chainloader /boot/vmlinuz-linux root=UUID=%?_UUID% rw splash loglevel=3 splash initrd=/boot/intel-ucode.img initrd=/boot/initramfs-linux.img
  58. #上面这句话好像能带多个initrd

  59. title 直入Archlinux 正常内核 恢复模式
  60. find --set-root /boot/intel-ucode.img
  61. uuid ()
  62. kernel /boot/vmlinuz-linux root=UUID=%?_UUID% rw single splash
  63. initrd /boot/intel-ucode.img /boot/initramfs-linux-fallback.img

  64. title 直入Archlinux LTS
  65. find --set-root /boot/intel-ucode.img
  66. uuid ()
  67. kernel /boot/vmlinuz-linux-lts root=UUID=%?_UUID% rw splash loglevel=3 splash
  68. initrd /boot/intel-ucode.img /boot/initramfs-linux-lts.img

  69. title 直入Archlinux LTS 恢复模式
  70. find --set-root /boot/intel-ucode.img
  71. uuid ()
  72. kernel /boot/vmlinuz-linux-lts root=UUID=%?_UUID% rw single splash
  73. initrd /boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img

  74. title HHH333 PE Win11 x64
  75. set sig_file=/BOOT/H3_1164.WIM
  76. set wim_file=%sig_file%
  77. fallback 0
  78. kernel


  79. title HHH333 PE Win10 x64
  80. set sig_file=/BOOT/H3_1064.WIM
  81. set wim_file=%sig_file%
  82. fallback 0
  83. kernel


  84. title HHH333 PE Win8.1 x64
  85. set sig_file=/BOOT/H3_8164.WIM
  86. set wim_file=%sig_file%
  87. fallback 0
  88. kernel


  89. title HHH333 PE Win8 x64
  90. set sig_file=/BOOT/H3_864.WIM
  91. set wim_file=%sig_file%
  92. fallback 0
  93. kernel


  94. title 0PE Win10 PE 64 (EFI)
  95. set sig_file=/0PE/0PENB.LZMA
  96. set wim_file=/efi/boot.wim
  97. fallback 0
  98. kernel



  99. title Grub2FM 万能文件管理与启动器 By a1ive
  100. map %prefix%/efi/grub/grubfm.iso (0xff)
  101. chainloader (0xff)
  102. boot

  103. title Sltiaz 便携Linux \n root密码root。用户tux,密码tux
  104. find --set-root /IMGs/slitaz-core64.iso
  105. map /IMGs/slitaz-core64.iso (0xff)
  106. chainloader (0xff)
  107. boot

  108. title StartOS (不保存数据) \n root密码:Loongson,其他普通用户如live均为live
  109. find --set-root /startos/boot/initramfs.img
  110. uuid ()
  111. kernel /startos/boot/vmlinuz squashfs=UUID=%?%:/startos/sfs ro splash _tmpfs=y
  112. initrd /startos/boot/initramfs-fallback.img

  113. title 试图查找本地的Windows x64并启动
  114. find --set-root /Windows/System32/Boot/winload.efi
  115. uuid %@root%
  116. kernel %prefix%/efi/grub/ntloader/ntloader uuid=%?% hires=1
  117. initrd %prefix%/efi/grub/ntloader/initrd.lz1
  118. boot


  119. title 试图查找本地的Windows 7 x64并启动(WIN7专用入口!)
  120. find --set-root /Windows/System32/Boot/winload.efi
  121. uuid %@root%
  122. kernel %prefix%/efi/grub/ntloader/ntloader uuid=%?% hires=1 win7
  123. initrd %prefix%/efi/grub/ntloader/initrd.lz1
  124. boot

  125. title H3PE 原版grub2菜单
  126. find --set-root /EFI/boot/g2bootx64.efi
  127. chainloader /EFI/boot/g2bootx64.efi
  128. boot

  129. title H3PE 原版grub4efi菜单
  130. find --set-root /EFI/boot/g4bootx64.efi
  131. configfile ()/EFI/grub/menu.lst

  132. title USM 启动Windows_11PE_64位_全能娱乐版(支持声、显、网卡)
  133. set sig_file=/boot/usm1pe6F.wim
  134. set wim_file=%sig_file%
  135. fallback 0
  136. kernel

  137. title USM 启动Windows_11PE_64位_精简维护版
  138. set sig_file=/boot/usm1pe6L.wim
  139. set wim_file=%sig_file%
  140. fallback 0
  141. kernel


  142. title USM 启动Windows_8PE__64位_全能娱乐版(支持声、显、网卡)
  143. set sig_file=/boot/usm8pe6F.wim
  144. set wim_file=%sig_file%
  145. fallback 0
  146. kernel


  147. title USM 启动Windows_8PE__64位_精简维护版
  148. set sig_file=/boot/usm8pe6L.wim
  149. set wim_file=%sig_file%
  150. fallback 0
  151. kernel

  152. title USM 启动Windows_7PE__64位_精简维护版
  153. set sig_file=/boot/USM7PE6L.WIM
  154. set wim_file=/boot/USM7PE6L.WIM win7
  155. fallback 0
  156. kernel

  157. title 查找Archlinux-monthly.iso并启动
  158. find --ignore-floppies --set-root /archlinux-monthly.iso
  159. uuid ()
  160. map /archlinux-monthly.iso (0xff)
  161. kernel (0xff)/arch/boot/x86_64/vmlinuz-linux img_dev="/dev/disk/by-uuid/%?_UUID%" img_loop="/archlinux-monthly.iso" earlymodules=loop
  162. initrd (0xff)/arch/boot/intel-ucode.img (0xff)/arch/boot/amd-ucode.img (0xff)/arch/boot/x86_64/initramfs-linux.img
  163. boot

  164. title 进入BIOS固件设置
  165. command %prefix%/efi/grub/ext/fwsetup

  166. title UEFI Shell
  167. chainloader /efi/grub/uefishell.efi

  168. title 退出grub4dos
  169. exit_g4d

  170. title 命令行
  171. commandline

  172. title 重启计算机
  173. reboot

  174. title 关闭计算机
  175. halt
复制代码

点评

你有gcc4.8环境吗?有的话可以打上压缩包里面的补丁自己编译试试(删掉configure里面那行我乱改的东西)  详情 回复 发表于 2023-3-8 17:53
回复

使用道具 举报

6#
 楼主| 发表于 2023-3-8 17:56:02 | 显示全部楼层
wintoflash 发表于 2023-3-8 17:53
你有gcc4.8环境吗?有的话可以打上压缩包里面的补丁自己编译试试(删掉configure里面那行我乱改的东西)

显然是没有的(悲)
回复

使用道具 举报

7#
 楼主| 发表于 2023-3-8 18:08:33 | 显示全部楼层
wintoflash 发表于 2023-3-8 17:53
你有gcc4.8环境吗?有的话可以打上压缩包里面的补丁自己编译试试(删掉configure里面那行我乱改的东西)
...

手动命令行进linux成功了。干掉外置菜单的!BAT那一行也能顺利进入菜单。不过你的ntloader不打算更新一下吗?

点评

ntloader 也更新了一下 https://github.com/grub4dos/ntloader/releases/tag/latest 没啥问题我就推送了  详情 回复 发表于 2023-3-11 11:59
那就好。 这就有点奇葩了。得找熟悉GCC的埃及老哥研究一下。 原来搞的都忘光了,那得重新从wimboot改了。  详情 回复 发表于 2023-3-8 20:40
回复

使用道具 举报

8#
 楼主| 发表于 2023-3-11 20:19:37 | 显示全部楼层
wintoflash 发表于 2023-3-11 11:59
ntloader 也更新了一下
https://github.com/grub4dos/ntloader/releases/tag/latest
没啥问题我就推 ...

VHD没环境,带PE没有问题,应该没啥大问题。所以现在让人头疼的就一个事,尼玛怎么一句!BAT搞死机了……

点评

发布了 https://github.com/chenall/grub4dos/releases/tag/for_UEFI GitHub 上的是用 GCC4.8 编译的,应该没这些奇怪问题。  详情 回复 发表于 2023-3-11 20:21
回复

使用道具 举报

9#
 楼主| 发表于 2023-3-13 08:17:00 | 显示全部楼层
本帖最后由 sunsea 于 2023-3-13 08:33 编辑

!BAT行为正常了,感谢!所以尼玛怎么换了个GCC版本死在!BAT上了真的奇怪……以及我一直好奇,启动pe难道不传minint参数么……

点评

当然是要传递的。但是在不指定的情况下可以根据扩展名自动判断:  详情 回复 发表于 2023-3-13 09:39
回复

使用道具 举报

10#
 楼主| 发表于 2023-3-13 15:33:34 | 显示全部楼层
wintoflash 发表于 2023-3-8 20:40
那就好。

这就有点奇葩了。得找熟悉GCC的埃及老哥研究一下。

还有挺好奇chainloader途径加载linux内核走的是什么传参方式,我这试论坛里有人发的StartOS死机了(不过影响不大,主力不用这个,而且有点老了),但是chainloader就一直可以……

点评

目前 Linux 镜像就是标准的 PE 格式 EFI Application,使用 kernel 和 chainloader 启动方法是一样的。 只是加载 initrd 的方式不一样。 chainloader 是让 kernel 自己通过 UEFI Simple FileSystem Protocol 找  详情 回复 发表于 2023-3-13 18:58
回复

使用道具 举报

11#
 楼主| 发表于 2023-3-13 19:02:59 | 显示全部楼层
本帖最后由 sunsea 于 2023-3-13 19:04 编辑
wintoflash 发表于 2023-3-13 18:58
目前 Linux 镜像就是标准的 PE 格式 EFI Application,使用 kernel 和 chainloader 启动方法是一样的。
...

感谢解释!不过我自己有ntfs和ext的驱动所以也没问题了hhhh
回复

使用道具 举报

12#
 楼主| 发表于 2023-3-14 20:19:27 | 显示全部楼层
2011whp 发表于 2023-3-14 20:09
意思是 内核版本6.2.1的 Archlinux, 不支持legacy启动了
(或者说 支持的话 提供了 两个vmlinuz ,不是二 ...

legacy BIOS方式没有测试,我现在生产环境全是UEFI的。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-5-9 22:29

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表