9

I am trying to do a fully automated ubuntu preseed installation. I am stuck because I cannot preseed the answer to installing grub on a device other than /dev/sda without having to manually hit "enter" to continue the installation.

It says:

[!] Install Grub boot loader on a hard disk

And correctly selects the device I am attempting to install the boot loader onto, but it still requires me to manually hit enter.

You can see an image of it here:

https://i.stack.imgur.com/paqyU.png

I've tried various combinations of the following values in my preseed, all of them have the same end result:

# 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

Regardless of these settings I get the prompt.

I turned on the logs to verbose during installation. The logs show this when I am stopped with the prompt:

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

If I hit enter and the installations continues, it goes on to this:

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
...

It's not clear to me exactly what the prompt is. Is it this?

Dec  9 07:37:20 debconf: <-- 0 ok

If that's the case, how do I input an "ok"?

Any help is greatly appreciated.

2 Answers 2

2

Higher up in your preseed file, this line should appear:

d-i debconf/priority string critical

This should ensure that only 'critical' questions are asked

This line alone seems sufficient to provide enough info for the bootloader to be put on /dev/sda;

alter to suit your needs

d-i grub-installer/bootdev string /dev/sda

As for your other question, the line <-- 0 ok is merely a return value (success); you can ignore it.

Hope this helps.

1
  • Having debconf/priority=critical is not sufficient. It should be, but there seems to be a bug in the installer, see also bug 1012629.
    – RolKau
    Oct 5, 2014 at 16:16
0

I would also be happy if I could find out how to answer Yes on that question automatically meaning I am happy with whatever it suggests. Often it is the same as you used to partition and to install the operating system in (device used by partman).

For Stephen question. If it is okay for you to hard code where to install grub. If this does not work:

d-i grub-installer/bootdev string /dev/sdb

Try:

grub-pc grub-pc/install_devices string /dev/sdb

My hope was to find out how to automatically answer Yes to the grub qeustion without having to put a static name to where to installa grub. Just automatically hit enter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .