[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#759737: marked as done (debian-installer: Need preseed entry to select default grub device)

Your message dated Mon, 29 Dec 2014 22:33:46 +0000
with message-id <E1Y5isk-0003g5-0X@franck.debian.org>
and subject line Bug#759737: fixed in grub-installer 1.103
has caused the Debian Bug report #759737,
regarding debian-installer: Need preseed entry to select default grub device
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

759737: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759737
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: grub-installer
Version: 1.95
Severity: whishlist
Tags: jessie, patch

I am trying to create a completely automated preseed.cfg file for
a jessie installation that will work on several systems. In my
case, both QEMU VMs and physical servers. Both of these types of
systems have only one possible boot device but have different
boot device files, e,g, /dev/vda and /dev/sda.  The normal way to
do this would be to use "grub-installer/bootdev string" config option.
This option does not work here because we need to specify the exact
device -- /dev/sda or /dev/vda instead of the "only" device.

If I don't use "grub-installer/bootdev", the installer will ask
me whether I want to install on the device found or "nothing", so
my automation fails.

I developed a patch that lets you use the string "default" for
grub-installer/bootdev. This option always picks the appropriate
device. Example:

    grub-installer/bootdev string default

Here is the patch:

Author: Andrew Patterson <andrew.patterson@hp.com>
Date:   Thu Aug 14 14:00:47 2014 -0600

    Using "default" for bootdev will install grub on default disk.

    The grub-install/bootdev configuration value is used in a
    file to automatically select the grub install device. It works
    fine if the disk is always the same, e.g., /dev/sda, but does
    not work well when using the same preseed file on systems withi
    different types of disks, e.g., /dev/vda and /dev/hda.

    Setting grub-installer/bootdev to "default" will automatically
    select the first disk for grug installation. It works as long
    as there is only one choice of disk to install on and thus
    avoids the "Please select /dev/... or none" question.

diff --git a/grub-installer b/grub-installer
index 50155a9..12f9a31 100755
--- a/grub-installer
+++ b/grub-installer
@@ -678,7 +678,11 @@ while : ; do
            log "q='$q' state='$state' defbd='$default_bootdev' bd='$bootdev'"
        db_fget grub-installer/bootdev seen
        if [ "$RET" = true ] && db_get grub-installer/bootdev && [ "$RET" ] ; then
-               bootdev=$RET
+               if  [ "$RET" = "default" ]; then
+                       bootdev=$default_bootdev
+               else
+                       bootdev=$RET
+               fi
        elif [ "$state" = 1 ]; then
                db_input high $q || true

--- End Message ---
--- Begin Message ---
Source: grub-installer
Source-Version: 1.103

We believe that the bug you reported is fixed in the latest version of
grub-installer, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 759737@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Cyril Brulebois <kibi@debian.org> (supplier of updated grub-installer package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)

Hash: SHA1

Format: 1.8
Date: Mon, 29 Dec 2014 23:20:16 +0100
Source: grub-installer
Binary: grub-installer
Architecture: source
Version: 1.103
Distribution: unstable
Urgency: medium
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
 grub-installer - Install GRUB on a hard disk (udeb)
Closes: 759737
 grub-installer (1.103) unstable; urgency=medium
   * Apply patch by Andrew Patterson (many thanks!) to support setting
     grub-installer/bootdev=default so that the default boot device that
     was determined is used automatically, skipping the prompt
     (Closes: #759737).
 85eff5c109b46eaae9e524c09f516ce67db4bd6a 1936 grub-installer_1.103.dsc
 bfd9ae69f32f39f93b4e168f057aa475f309c220 193792 grub-installer_1.103.tar.xz
 9f1babe83c539131b2b94476174497e299f6c2cb90fedaed3e0e45f06835adf2 1936 grub-installer_1.103.dsc
 2fee60b172a5a8ad931163e7ed3009617ea493f4ef764081a0cb982a04c03939 193792 grub-installer_1.103.tar.xz
 db7d481dcd9070f0752138094ead2a01 1936 debian-installer standard grub-installer_1.103.dsc
 57fcf8fab26b41b41e24c9060aaade56 193792 debian-installer standard grub-installer_1.103.tar.xz

Version: GnuPG v1


--- End Message ---

Reply to: