Ste*_*ood 8 installation grub2 preseed
我正在尝试进行全自动的 ubuntu preseed 安装。我被卡住了,因为我无法预先确定在 /dev/sda 以外的设备上安装 grub 的答案,而不必手动点击“enter”继续安装。
它说:
[!] 在硬盘上安装 Grub 引导加载程序
并正确选择我试图安装引导加载程序的设备,但它仍然需要我手动按 Enter。
你可以在这里看到它的图像:
http://i.imgur.com/lWvAHWV.png
我在 preseed 中尝试了以下值的各种组合,它们都有相同的最终结果:
# Option 1 (works when installing to /dev/sda. Prompts with sdm)
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
# Option 2
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sdm
# Option 3
d-i grub-installer/only_debian boolean false
d-i grub-installer/with_other_os boolean false
d-i grub-installer/bootdev string /dev/sdm
# Option 2
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sdm
I've also tried adding the following:
d-i grub-pc/install_devices multiselect /dev/sdm
Run Code Online (Sandbox Code Playgroud)
无论这些设置如何,我都会收到提示。
我在安装过程中将日志打开为详细。当我被提示停止时,日志会显示这一点:
Dec 9 07:30:35 debconf: --> SET grub-installer/bootdev /dev/sdm
Dec 9 07:30:35 debconf: <-- 0 value set
Dec 9 07:30:35 debconf: --> PROGRESS STEP 1
Dec 9 07:30:35 debconf: <-- 0 OK
Dec 9 07:30:35 debconf: --> PROGRESS INFO grub-installer/progress/step_bootdev
Dec 9 07:30:35 debconf: <-- 0 OK
Dec 9 07:30:35 debconf: --> INPUT critical grub-installer/bootdev
Dec 9 07:30:35 debconf: <-- 0 question will be asked
Dec 9 07:30:35 debconf: --> GO
Run Code Online (Sandbox Code Playgroud)
如果我按回车键并继续安装,它会继续:
Dec 9 07:30:35 debconf: --> SET grub-installer/bootdev /dev/sdm
Dec 9 07:30:35 debconf: <-- 0 value set
Dec 9 07:30:35 debconf: --> PROGRESS STEP 1
Dec 9 07:30:35 debconf: <-- 0 OK
Dec 9 07:30:35 debconf: --> PROGRESS INFO grub-installer/progress/step_bootdev
Dec 9 07:30:35 debconf: <-- 0 OK
Dec 9 07:30:35 debconf: --> INPUT critical grub-installer/bootdev
Dec 9 07:30:35 debconf: <-- 0 question will be asked
Dec 9 07:30:35 debconf: --> GO
Dec 9 07:37:20 debconf: <-- 0 ok
Dec 9 07:37:20 debconf: --> GET grub-installer/bootdev
Dec 9 07:37:20 debconf: <-- 0 /dev/sdm
Dec 9 07:37:20 debconf: --> PROGRESS STEP 1
Dec 9 07:37:20 debconf: <-- 0 OK
Dec 9 07:37:20 debconf: --> SUBST grub-installer/progress/step_install_loader BOOTDEV /dev/sdm
Dec 9 07:37:20 debconf: Adding [BOOTDEV] -> [/dev/sdm]
Dec 9 07:37:20 debconf: <-- 0
Dec 9 07:37:20 debconf: --> PROGRESS INFO grub-installer/progress/step_install_loader
Dec 9 07:37:20 debconf: <-- 0 OK
Dec 9 07:37:20 grub-installer: info: Installing grub on '/dev/sdm'
Dec 9 07:37:20 grub-installer: info: grub-install supports --no-floppy
Dec 9 07:37:20 grub-installer: info: Running chroot /target grub-install --no-floppy --force "/dev/sdm"
Dec 9 07:37:22 grub-installer: Installation finished. No error reported.
Dec 9 07:37:22 grub-installer: info: grub-install ran successfully
...
Run Code Online (Sandbox Code Playgroud)
我不清楚提示是什么。是这个吗?
Dec 9 07:37:20 debconf: <-- 0 ok
Run Code Online (Sandbox Code Playgroud)
如果是这种情况,我该如何输入“ok”?
任何帮助是极大的赞赏。
小智 2
在您的预置文件的较高位置,应出现以下行:
d-i debconf/priority string critical
Run Code Online (Sandbox Code Playgroud)
这应该确保只提出“关键”问题
仅这一行似乎就足以为要安装的引导加载程序提供足够的信息/dev/sda;
改变以满足您的需要
d-i grub-installer/bootdev string /dev/sda
Run Code Online (Sandbox Code Playgroud)
至于你的其他问题,行 <-- 0 ok 只是一个返回值(成功);你可以忽略它。
希望这可以帮助。
小智 0
如果我能找到如何自动回答该问题的“是”,我也会很高兴,这意味着我对它的建议感到满意。通常它与您用于分区和安装操作系统的方式相同(partman 使用的设备)。
对于斯蒂芬的问题。如果您可以硬编码安装 grub 的位置。如果这不起作用:
d-i grub-installer/bootdev string /dev/sdb
Run Code Online (Sandbox Code Playgroud)
尝试:
grub-pc grub-pc/install_devices string /dev/sdb
Run Code Online (Sandbox Code Playgroud)
我的希望是找出如何自动对 grub 问题回答“是”,而不必在安装 grub 的位置添加静态名称。只需自动按 Enter 键即可。
| 归档时间: |
|
| 查看次数: |
14145 次 |
| 最近记录: |