|
|
本帖最后由 a66 于 2025-11-15 16:17 编辑
可自行手动编译 ntboot.mod,以下是从 GRUB 2 源码中提取并编译该模块的方法,供参考:
需要一个 Linux 系统(如 Deepin、Ubuntu 等),并安装以下依赖:
bash
sudo apt update
sudo apt install build-essential autoconf automake bison flex libopts25-dev
获取 GRUB 源码
bash
git clone https://git.savannah.gnu.org/git/grub.git
cd grub
配置并编译 ntboot 模块
bash
./autogen.sh
./configure --with-platform=pc --target=i386
make
这个过程可能需要几分钟,取决于你的机器性能。
提取 ntboot.mod
编译完成后,ntboot.mod 文件会在以下路径中:
shell
build-i386-pc/grub/i386-pc/ntboot.mod
可将它复制出来,用于 GRUB 的自定义配置
使用 ntboot.mod
将 ntboot.mod 放入 GRUB 的模块目录(通常是 /boot/grub/i386-pc/)。
在你的 grub.cfg 中添加类似如下内容来引导 .wim 文件:
bash
menuentry "Boot from install.wim" {
set root=(hd0,1)
ntboot /sources/install.wim
} |
|