ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
60.28k stars 3.94k forks source link

[issue]: How do I attach vhd while booting Windows? 请问如何在boot Windows的同时附加vhd #2896

Closed SGL23187 closed 1 day ago

SGL23187 commented 2 days ago

Requirements: I want to use multiple vhd deployments when using Windows, so that the system is in the vhd_1 to facilitate differential recovery, and the files stored in the vhd_2 are not affected by the system recovery. Since attaching vhd after booting Windows may happen in the future: the file cannot be found on startup and it will fail, so I would like to be able to attach other vhds when I boot Windows with ventoy

I'd like to ask if this is achievable with ventoy (or grub2).

I can't find a problem or a solution about it, I'm trying to read the source code of ventoy and implement it myself, but the comments in the source code are not clear enough for me to understand. After two days of trying, I decided to ask if it could be achieved and in what way. I thought it would give me more motivation to keep reading the source code if it can be done.

需求:我希望在使用Windows的时候使用多个vhd部署,这样系统存在vhd_1中便于使用差分恢复,而存放在vhd_2中的文件则不因系统恢复而被影响。由于启动Windows之后再附加vhd可能在未来发生:启动时找不到文件而出现故障,因此,我希望在使用ventoy启动Windows的时候能同时附加其他vhd

我想询问这是否可以通过ventoy(或grub2)实现

我无法找到有关的问题和解决方案,我正在尝试读懂ventoy的源代码自行实现,但是源码中的注释不够清晰地让我看懂。在学习了两天过后我决定来提问是否能实现,使用什么方式。我想,如果的确能实现会给我更大的动力继续阅读源代码

a1ive commented 1 day ago

Windows 本身就支持从差分vhd上启动啊。

SGL23187 commented 1 day ago

Windows 本身就支持从差分vhd上启动啊。

我希望在从vhd_1上启动,顺便挂载vhd_2。(注意,vhd_1和vhd_2没有差分关系,是完全不同的文件。我提到差分是说我希望差分vhd_1)

我了解到启动vhd_1时,vhd_1是根据BCD挂载的,具体是如何挂载的我不是很清楚,我希望能找到vhd_1被挂载的方式,并用同样的方式去挂载vhd_2。

a1ive commented 1 day ago

Windows 本身就支持从差分vhd上启动啊。

我希望在从vhd_1上启动,顺便挂载vhd_2。(注意,vhd_1和vhd_2没有差分关系,是完全不同的文件。我提到差分是说我希望差分vhd_1)

我了解到启动vhd_1时,vhd_1是根据BCD挂载的,具体是如何挂载的我不是很清楚,我希望能找到vhd_1被挂载的方式,并用同样的方式去挂载vhd_2。

那你问错地方了。Ventoy 本身没有启动 Windows VHD 的功能,只是给 Windows Boot Manager 套了个壳,自动修改 BCD 菜单里面预置启动项的 VHD 路径,跟你用 bcdedit 之类的工具手动生成一个启动项没什么区别。 你需要自己逆向下微软的 Windows Boot Manager 之类的东西。

SGL23187 commented 1 day ago

Windows 本身就支持从差分vhd上启动啊。

我希望在从vhd_1上启动,顺便挂载vhd_2。(注意,vhd_1和vhd_2没有差分关系,是完全不同的文件。我提到差分是说我希望差分vhd_1) 我了解到启动vhd_1时,vhd_1是根据BCD挂载的,具体是如何挂载的我不是很清楚,我希望能找到vhd_1被挂载的方式,并用同样的方式去挂载vhd_2。

那你问错地方了。Ventoy 本身没有启动 Windows VHD 的功能,只是给 Windows Boot Manager 套了个壳,自动修改 BCD 菜单里面预置启动项的 VHD 路径,跟你用 bcdedit 之类的工具手动生成一个启动项没什么区别。 你需要自己逆向下微软的 Windows Boot Manager 之类的东西。

十分感谢