哪个 debconf preseed 选项可以将 GRUB 自动安装到 MBR?

dai*_*isy 2 grub2 preseed debconf

注意:我在这里使用 preseed ,这一步应该从 preseed 配置自动完成

这是完成安装前的最后一步,将grub安装到MBR:

在此处输入图片说明

我不确定这里应该使用哪个 debconf 选项来绕过这个屏幕;安装后,我尝试获取所有可能使用过的 debconf 字符串,但没有包含任何内容mbr

Rah*_*ara 5

建议安装后将 GRUB 引导加载程序安装到 MBR(这将替换 MBR 中的当前引导加载程序)。因为 MBR 告诉 GRUB 在系统启动时加载。

我发现这是如何让它对 MBR 做出反应

# This is fairly safe to set, it makes grub install automatically to the MBR
# if no other operating system is detected on the machine.
d-i grub-installer/only_debian boolean true

# This one makes grub-installer install to the MBR if it also finds some other
# OS, which is less safe as it might not be able to boot that other OS.
d-i grub-installer/with_other_os boolean true
Run Code Online (Sandbox Code Playgroud)

如果您不想在 MBR 中安装

# Alternatively, if you want to install to a location other than the mbr,
# uncomment and edit these lines:
#d-i grub-installer/only_debian boolean false
#d-i grub-installer/with_other_os boolean false
#d-i grub-installer/bootdev  string (hd0,0)
# To install grub to multiple disks:
#d-i grub-installer/bootdev  string (hd0,0) (hd1,0) (hd2,0)
Run Code Online (Sandbox Code Playgroud)

这些配置取自 Debian Lenny 的 preseed 文件here

这对其他示例很有帮助


ish*_*ish 5

如果未检测到其他操作系统:

d-i grub-installer/only_debian boolean true

如果检测到其他操作系统:

d-i grub-installer/with_other_os boolean true