[Bug 1012629] Re: grub-installer ignores "bootdev" setting in preseed file
David Partain
david.partain at ericsson.com
Fri Jul 25 07:17:02 UTC 2014
Hi Dave,
I've been working with Canonical on this issue since I posted all of my
information.
I have the following as part of my preseed:
d-i partman/early_command string \
USBDEV=$(list-devices usb-partition | sed "s/\(.*\)./\1/");\
BOOTDEV=$(list-devices disk | grep -v "$USBDEV" | head -1);\
debconf-set partman-auto/disk $BOOTDEV;\
debconf-set grub-installer/bootdev $BOOTDEV;
During installation, this becomes:
Jun 19 12:31:20 debconf: --> SET partman-auto/disk /dev/sdb
Jun 19 12:31:20 debconf: <-- 0 value set
Jun 19 12:31:20 debconf: --> SET grub-installer/bootdev /dev/sdb
(which is right) but still I get this:
Jun 19 12:45:03 debconf: --> SETTITLE debian-installer/grub-installer/title
Jun 19 12:45:03 debconf: <-- 0 OK
Jun 19 12:45:03 debconf: --> GET grub-installer/bootdev
Jun 19 12:45:03 debconf: <-- 0 /dev/sdb
Jun 19 12:45:03 debconf: --> GET cdrom-detect/hybrid
Jun 19 12:45:03 debconf: <-- 10 cdrom-detect/hybrid doesn't exist
Jun 19 12:45:03 debconf: --> PROGRESS STEP 1
Jun 19 12:45:03 debconf: <-- 0 OK
Jun 19 12:45:03 debconf: --> PROGRESS INFO grub-installer/progress/step_bootdev
Jun 19 12:45:03 debconf: <-- 0 OK
Jun 19 12:45:03 debconf: --> FGET grub-installer/bootdev seen
Jun 19 12:45:03 debconf: <-- 0 false
Jun 19 12:45:03 debconf: --> INPUT high grub-installer/only_debian
Jun 19 12:45:03 debconf: <-- 30 question skipped
Jun 19 12:45:03 debconf: --> GO
Jun 19 12:45:03 debconf: <-- 0 ok
Jun 19 12:45:03 debconf: --> GET grub-installer/only_debian
Jun 19 12:45:03 debconf: <-- 0 true
Jun 19 12:45:03 debconf: --> PROGRESS STEP 1
Jun 19 12:45:03 debconf: <-- 0 OK
Jun 19 12:45:03 debconf: --> SUBST grub-installer/progress/step_install_loader BOOTDEV /dev/sda
Jun 19 12:45:03 debconf: Adding [BOOTDEV] -> [/dev/sda]
which is wrong. I asked for sdb :-)
The only workaround so far seems to be to have:
d-i grub-installer/only_debian boolean false
which then pops up a question if I really want it on sdb, which I can
confirm. This, however, sorta defeats the purpose of a fully-automated
installation with users who don't know what sdb is :-)
How can I ensure that there's a valid partition table on /dev/sdb in a
fully-automated install? I'm doing this for partitioning:
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/method string crypto
d-i partman-auto-lvm/new_vg_name string somename
d-i partman-auto-lvm/guided_size string max
d-i partman-lvm/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman-auto/expert_recipe string \
(recipe deleted)
d-i partman/default_filesystem string ext4
Can I add something to ensure that the partition table is there?
Thanks.
David
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1012629
Title:
grub-installer ignores "bootdev" setting in preseed file
Status in “grub-installer” package in Ubuntu:
Fix Released
Status in “grub-installer” source package in Precise:
Confirmed
Status in “grub-installer” source package in Trusty:
Fix Released
Status in “grub-installer” package in Debian:
Fix Released
Bug description:
I am installing an Ubuntu system with two disks attached; I want the
OS to be installed on the second disk /dev/sdb; the first disk
/dev/sda is currently completely empty (not even partitioned). The
install process works fine, but then GRUB ignores the line:
d-i grub-installer/bootdev string /dev/sdb
and complains that it cannot write to /dev/sda (because it does not
even have a partition table).
Same happens if I use GRUB's own notation "(hd1)" instead of /dev/sdb
in the preseed file.
If I omit the "grub-installer/bootdev" line in the preseed, then D-I
stops to ask me if I want to install GRUB on sda or sdb.
The issue can be replicated with virtual machines: add two disks (one
of the empty / zeroed out), and instruct the preseed to install on the
second one.
I think this is the same as Debian bug #666974, but I'm filing it
separately as I'm not sure what/how much is changed in Ubuntu's
version of D-I. See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666974
Preseed options used for partitioning / target selection:
### Partitioning
d-i partman-auto/method string lvm
d-i partman-auto/choose_recipe select atomic
# do not ask for confirmation, ever
d-i partman-basicfilesystem/no_swap boolean false
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/confirm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/exception_handler select Retry
GRUB-related preseed options:
### Boot loader installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sdb
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1012629/+subscriptions
More information about the foundations-bugs
mailing list