Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct EFI chainloader image device path #2397

Merged
merged 1 commit into from May 19, 2023
Merged

Correct EFI chainloader image device path #2397

merged 1 commit into from May 19, 2023

Conversation

a1ive
Copy link
Contributor

@a1ive a1ive commented May 19, 2023

使用 chainloader 加载 EFI 文件时,DevicePath 中的磁盘分区应当设为文件所在的磁盘分区,而不是 $root 分区。
另外,根据 UEFI Spec,DevicePath 可以为空。
Snipaste_2023-05-19_21-58-41

http://bbs.wuyou.net/forum.php?mod=redirect&goto=findpost&ptid=423940&pid=4923455

大佬,请教一下我拿 ventoy 的 grub2.04 通过 chainloader 引导 ntloader,会报错:Could not open simple file system。其中,ntloader 和 initlz1 在 Fat32 分区,vhd 镜像在 ntfs 分区。
我的引导指令如下:
set root=(hd1, 3)
probe -u --set=dev_uuid (hd1,3)
chainloader (hd1,1)/ntloader initrd=/initrd.lz1 uuid=${dev_uuid} file=/win7.vhd
boot
其中,(hd1,3) 为 存放 vhd 镜像的 ntfs 分区,(hd1,1) 为存放 ntloader 和 initrd.lz1 的 fat32 分区
使用该指令,在 Ubuntu18.06(grub2.04) 和 ubuntu 22.04(grub2.06) 上都可以正常引导,但是在 ventoy 中就报错了。
是不是需要打什么 patch 或者做什么修改呢?

必须在 chainloader 之前执行 set root=(hd1, 1) ,这有点让人迷惑。
Ubuntu, RedHat 等主流发行版的 GRUB 2 都已经修复了这个问题。

@ventoy ventoy merged commit 35c952d into ventoy:master May 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants