注意:我在这里使用预置,此步骤应从预置配置中自动完成
这是完成安装前的最后一步,将 grub 安装到 MBR:
我不确定这里应该使用哪个 debconf 选项来绕过此屏幕;安装后,我尝试获取所有可能使用的 debconf 字符串,但没有包含mbr
答案1
如果未检测到其他操作系统:
d-i grub-installer/only_debian boolean true
如果检测到其他操作系统:
d-i grub-installer/with_other_os boolean true
答案2
建议在安装后将 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
如果你不想安装在 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)
这些配置取自 Debian Lenny 的预置文件这里