Debian Bug report logs - #706112
debian-installer: Wheezy installer always install bootloader in /dev/sda

version graph

Package: grub-installer; Maintainer for grub-installer is Debian Install System Team <debian-boot@lists.debian.org>;

Reported by: Schloss <schloss.kirchlauter@yandex.ru>

Date: Wed, 24 Apr 2013 19:57:02 UTC

Severity: serious

Tags: wheezy-ignore

Found in version grub-installer/1.85

Fixed in version grub-installer/1.86

Done: Cyril Brulebois <kibi@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package debian-installer. (Wed, 24 Apr 2013 19:57:06 GMT) (full text, mbox, link).


Acknowledgement sent to Schloss <schloss.kirchlauter@yandex.ru>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 24 Apr 2013 19:57:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Schloss <schloss.kirchlauter@yandex.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 02:54:55 +0700
Package: debian-installer
Severity: serious

Default x86_64 Installation CD of Wheezy has next bug:
- while it is asking to install bootloader it isn't asking where to
install bootloader

In this case, when I install Debian from usb-flash-drive on another
usb-hard-drive and those names are, for example, /dev/sdb and /dev/sdc,
I need to install bootloader to /dev/sdc (or /dev/sdb). But installer
always install bootloader to /dev/sda. Of course, I already had another
system on /dev/sda, and it was CentOS, so I needed resque disk to
recover my bootloader from /dev/sda.

Going further, when I need to install Debian on a dozen of
usb-hard-drives, each time I need to resque my bootloader on main system
on /dev/sda.

-- System Information:
Debian Release: 7.0
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package debian-installer. (Thu, 25 Apr 2013 04:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to 706112@bugs.debian.org:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 04:57:04 GMT) (full text, mbox, link).


Message #10 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Christian PERRIER <bubulle@debian.org>
To: Schloss <schloss.kirchlauter@yandex.ru>, 706112@bugs.debian.org
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 06:55:28 +0200
[Message part 1 (text/plain, inline)]
reassign 706112 grub-installer
thanks

Quoting Schloss (schloss.kirchlauter@yandex.ru):
> Package: debian-installer
> Severity: serious
> 
> Default x86_64 Installation CD of Wheezy has next bug:
> - while it is asking to install bootloader it isn't asking where to
> install bootloader
> 
> In this case, when I install Debian from usb-flash-drive on another
> usb-hard-drive and those names are, for example, /dev/sdb and /dev/sdc,
> I need to install bootloader to /dev/sdc (or /dev/sdb). But installer
> always install bootloader to /dev/sda. Of course, I already had another
> system on /dev/sda, and it was CentOS, so I needed resque disk to
> recover my bootloader from /dev/sda.


It's not always but, yes, there are cases (not clearly identified yet)
where grub-installer does the wrong thing.

Sadly, this issue will probably be in wheezy as nobody digged enough
to tackle this down and we get rid of it before the last version of
D-I is released.

Let's reassign this bug to where it belongs: grub-installer.


[signature.asc (application/pgp-signature, inline)]

Bug reassigned from package 'debian-installer' to 'grub-installer'. Request was from Christian PERRIER <bubulle@debian.org> to control@bugs.debian.org. (Thu, 25 Apr 2013 04:57:07 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Thu, 25 Apr 2013 06:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 06:30:04 GMT) (full text, mbox, link).


Message #17 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: 706112@bugs.debian.org
Cc: bubulle@debian.org
Subject: re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 16:15:21 +1000
> Sadly, this issue will probably be in wheezy as nobody digged enough
> to tackle this down and we get rid of it before the last version of
> D-I is released.


Please see my working (for me), tested, waiting-for-review patch [1]
sent to the -boot list yesterday.

Cheers
Vince

[1] https://lists.debian.org/debian-boot/2013/04/msg00396.html



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Thu, 25 Apr 2013 07:36:07 GMT) (full text, mbox, link).


Acknowledgement sent to Gaudenz Steinlin <gaudenz@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 07:36:07 GMT) (full text, mbox, link).


Message #22 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Gaudenz Steinlin <gaudenz@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 09:33:01 +0200
Hi Vince


Vincent McIntyre <vincent.mcintyre@csiro.au> writes:

>> Sadly, this issue will probably be in wheezy as nobody digged enough
>> to tackle this down and we get rid of it before the last version of
>> D-I is released.
>
>
> Please see my working (for me), tested, waiting-for-review patch [1]
> sent to the -boot list yesterday.

Do you know how the problem can be triggerd. As far as I remember only
some installation from USB are affected and I don't know if the
difference between those affected and those unaffected has ever been
identified. If I know that I'm testing the right test case, I'm willing
to try your patch.

Gaudenz

-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Thu, 25 Apr 2013 10:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 10:15:04 GMT) (full text, mbox, link).


Message #27 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Gaudenz Steinlin <gaudenz@debian.org>
Cc: 706112@bugs.debian.org
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 20:01:28 +1000
On Thu, Apr 25, 2013 at 09:33:01AM +0200, Gaudenz Steinlin wrote:
> 
> Hi Vince
> 
> >
> > Please see my working (for me), tested, waiting-for-review patch [1]
> > sent to the -boot list yesterday.
> 
> Do you know how the problem can be triggerd. As far as I remember only
> some installation from USB are affected and I don't know if the
> difference between those affected and those unaffected has ever been
> identified. If I know that I'm testing the right test case, I'm willing
> to try your patch.
> 

As I try to explain in the patch it seems to me that the issue is this:
 - the program tries to make an intelligent guess about which device the
   installer is mounted on and avoid that device. But in the case of USB
   sticks it is quite difficult to tell. There is discussion of this in
   #696877.
 - in the 'while' loop starting at line 593 it typically asks the question
   grub-installer/only-debian or grub-installer/with-other-os.
   If it gets a 'true' ('yes') answer, it sets bootdev=$default_bootdev
   and exits the loop with no further questions to the user.
   If it gets a 'false' ('no') answer it should ask grub-installer/bootdev
   ie give the user a chance to input the device name they want.

I'm assuming that this affects some installs and not others because there
are different enumeration orders on different systems.

It's entirely possible this patch is not the full resolution of the various
issues people have reported but I'm posting it to get feedback on the
approach and get some help with correctly integrating it into d-i.
It also needs tests on arches other than amd64/i386 and probably with
systems that require EFI.

Hope you can find time to apply the patch, build grub-installer and test.
I didn't rebuild the entire installer image when testing. I built the udeb
and after tasksel was done I scp'd it onto the test machine and installed
it with udpkg. I ran 'sh /usr/bin/grub-installer /target' on tty2, for some
reason I could not get it to work with the main menu on tty1.

Cheers
Vince



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Thu, 25 Apr 2013 12:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 12:33:04 GMT) (full text, mbox, link).


Message #32 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joeyh@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Cc: Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 08:28:27 -0400
[Message part 1 (text/plain, inline)]
Vincent McIntyre wrote:
> It's entirely possible this patch is not the full resolution of the various
> issues people have reported but I'm posting it to get feedback on the
> approach and get some help with correctly integrating it into d-i.

This adds a new translatable template, which it is far too late in the
release process to get translated. I think this problem could be
finessed by copying the text of the short description and first paragraph of
the grub-installer/bootdev template.
(Ideally into a common template that is SUBSTED into both to avoid bloat.)

There are also some hardcoded user-visible strings embedded in the code,
which need to be a) moved to the template and b) somehow translated
3 months ago. I don't think that "(An entry dialog will appear)" adds
anything to the  $manual_entry string ("Enter device manually").
There is an "enter information manually" string in choose-mirror that
could be copied, with full translations.


device_list() builds a comma-delimited list; it could be that the
description of a device contains a comma (eg, "Foo Corp, Inc. mega super drive"),
and so it needs to be sanitized.


+# make sure this question is displayed at least once
+db_fset  grub-installer/choose_bootdev seen false

That is unncessary in d-i; d-i always re-asks seen questions.
(And it's very bad style to ever mess with seen flags, in any use of
debconf. You will cause bugs that are hard to find.)

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Thu, 25 Apr 2013 12:36:10 GMT) (full text, mbox, link).


Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Thu, 25 Apr 2013 12:36:10 GMT) (full text, mbox, link).


Message #37 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joeyh@debian.org>
To: Gaudenz Steinlin <gaudenz@debian.org>, 706112@bugs.debian.org
Cc: Vincent McIntyre <vincent.mcintyre@csiro.au>
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Thu, 25 Apr 2013 08:31:29 -0400
[Message part 1 (text/plain, inline)]
Gaudenz Steinlin wrote:
> Do you know how the problem can be triggerd. As far as I remember only
> some installation from USB are affected and I don't know if the
> difference between those affected and those unaffected has ever been
> identified. If I know that I'm testing the right test case, I'm willing
> to try your patch.

Well, the patch always prompts with a menu, so essentially you don't
need to reproduce the problem case to test it.

I'd be more concerned about testing it on different architectures.
Particularly ones without a /dev/disk/by-id/

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Fri, 26 Apr 2013 11:06:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 26 Apr 2013 11:06:04 GMT) (full text, mbox, link).


Message #42 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Joey Hess <joeyh@debian.org>
Cc: 706112@bugs.debian.org, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Fri, 26 Apr 2013 21:03:28 +1000
Hi Joey

thank you for your helpful comments. I'm working on fixing the issues.
I do have one question because I'm completely new to the translation
side of things...

On Thu, Apr 25, 2013 at 08:28:27AM -0400, Joey Hess wrote:
> 
> There are also some hardcoded user-visible strings embedded in the code,
> which need to be a) moved to the template and b) somehow translated
> 3 months ago. I don't think that "(An entry dialog will appear)" adds
> anything to the  $manual_entry string ("Enter device manually").
> There is an "enter information manually" string in choose-mirror that
> could be copied, with full translations.
> 

I found the string, in po/sublevel1, here's the templates.po
#. Type: select
#. Choices
#: ../choose-mirror-bin.templates.http-in:2001
#: ../choose-mirror-bin.templates.ftp.sel-in:2001
msgid "enter information manually"
msgstr ""

Is it the case that I need to
a) give a unique number to the new question in grub-installer/po/templates.pot

b) modify po/sublevel1/template.po to point to the new question like this:
 #. Type: select
 #. Choices
 #: ../choose-mirror-bin.templates.http-in:2001
 #: ../choose-mirror-bin.templates.ftp.sel-in:2001
+#: ../grub-installer.templates:29001
 msgid "enter information manually"
 msgstr ""

Cheers
Vince



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Fri, 26 Apr 2013 11:30:09 GMT) (full text, mbox, link).


Acknowledgement sent to Thorsten Glaser <t.glaser@tarent.de>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 26 Apr 2013 11:30:09 GMT) (full text, mbox, link).


Message #47 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Thorsten Glaser <t.glaser@tarent.de>
To: 706112@bugs.debian.org
Subject: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Fri, 26 Apr 2013 13:26:58 +0200 (CEST)
Hi,

just another how-to-reproduce: run d-i on a system with
/boot on RAID 1 and / on LVM on RAID 10 on five discs.

d-i (priority=low) asks whether to install grub2 to the
MBR, I say yes, and it installs to /dev/sda, so I’ll have
to, later, in the installed system, reconfigure it to tell
it to install to all discs.

Why isn’t the normal postinst of the grub-pc run in-target
with debconf pass-through instead? That one WFM…

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Fri, 26 Apr 2013 14:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 26 Apr 2013 14:57:05 GMT) (full text, mbox, link).


Message #52 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Joey Hess <joeyh@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Cc: Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Fri, 26 Apr 2013 10:53:02 -0400
[Message part 1 (text/plain, inline)]
Vincent McIntyre wrote:
> I found the string, in po/sublevel1, here's the templates.po
> #. Type: select
> #. Choices
> #: ../choose-mirror-bin.templates.http-in:2001
> #: ../choose-mirror-bin.templates.ftp.sel-in:2001
> msgid "enter information manually"
> msgstr ""
> 
> Is it the case that I need to
> a) give a unique number to the new question in grub-installer/po/templates.pot

A cron job should take care of this, as long as an identical string is
used in the templates file.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Fri, 26 Apr 2013 22:57:13 GMT) (full text, mbox, link).


Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 26 Apr 2013 22:57:13 GMT) (full text, mbox, link).


Message #57 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Christian PERRIER <bubulle@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Cc: Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Fri, 26 Apr 2013 18:39:18 +0200
[Message part 1 (text/plain, inline)]
Quoting Vincent McIntyre (vincent.mcintyre@csiro.au):

> b) modify po/sublevel1/template.po to point to the new question like this:
>  #. Type: select
>  #. Choices
>  #: ../choose-mirror-bin.templates.http-in:2001
>  #: ../choose-mirror-bin.templates.ftp.sel-in:2001
> +#: ../grub-installer.templates:29001
>  msgid "enter information manually"
>  msgstr ""


That isn't needed, as long as you take care to use the very exact same
string.

template.pot files are anyway automatically generated and PO files are
updated accordingly. Then the PO files *in the package* will be
updated during the same daily cron job.


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Sat, 27 Apr 2013 13:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 27 Apr 2013 13:33:04 GMT) (full text, mbox, link).


Message #62 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Schloss <schloss.kirchlauter@yandex.ru>, 706112@bugs.debian.org
Subject: Re: Bug#706112: debian-installer: Wheezy installer always install bootloader in /dev/sda
Date: Sat, 27 Apr 2013 15:31:22 +0200
[Message part 1 (text/plain, inline)]
Hi,

Schloss <schloss.kirchlauter@yandex.ru> (25/04/2013):
> Package: debian-installer
> Severity: serious
> 
> Default x86_64 Installation CD of Wheezy has next bug:
> - while it is asking to install bootloader it isn't asking where to
> install bootloader
> 
> In this case, when I install Debian from usb-flash-drive on another
> usb-hard-drive and those names are, for example, /dev/sdb and /dev/sdc,
> I need to install bootloader to /dev/sdc (or /dev/sdb). But installer
> always install bootloader to /dev/sda. Of course, I already had another
> system on /dev/sda, and it was CentOS, so I needed resque disk to
> recover my bootloader from /dev/sda.
> 
> Going further, when I need to install Debian on a dozen of
> usb-hard-drives, each time I need to resque my bootloader on main system
> on /dev/sda.

for the record:
  http://www.debian.org/devel/debian-installer/errata

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Sun, 28 Apr 2013 23:57:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 28 Apr 2013 23:57:04 GMT) (full text, mbox, link).


Message #67 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Christian PERRIER <bubulle@debian.org>
Cc: 706112@bugs.debian.org, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Mon, 29 Apr 2013 09:52:57 +1000
Hi,
Thanks for the comments I've received on this patch.
I did some reading to see how other packages handle the issues raised.
I found grub-pc and iso-scan particularly helpful.
Hopefully this attempt is better. Less than a week from release,
I expect it is too late to include this but perhaps it could be
considered for r1.

Kind regards
Vince

-----------------------------------------------------------------------
Support user selection of grub boot disk from a list of
disks via a new question, grub-installer/choose_bootdev.
Check for a mismatch between a preseeded value of
grub-installer/bootdev and the guess at the default boot
disk made by grub-installer, and prompt the user to choose
the correct disk.

This should help the user avoid grub-installer writing to the MBR
of the wrong device (e.g. #696877,#706112) and fix the issue with
preseeded values of bootdev being ignored (e.g. #666974).

v2:
 - try harder to avoid introducing new translatable strings
   - recycle question & first paragraph of grub-install/bootdev
   - use iso-scan/ask_device text for "manual entry" text
 - drop device_list() function; try to reuse existing functions
   and follow the methods in grub-pc & iso-scan
 - don't abuse the 'seen' flag

Signed-off-by: Vincent McIntyre <vincent.mcintyre@csiro.au>
---
 debian/grub-installer.templates |   13 +++++
 grub-installer                  |   99 +++++++++++++++++++++++++++++++++++++--
 2 files changed, 109 insertions(+), 3 deletions(-)

diff --git a/debian/grub-installer.templates b/debian/grub-installer.templates
index 888a656..e439ad0 100644
--- a/debian/grub-installer.templates
+++ b/debian/grub-installer.templates
@@ -86,6 +86,19 @@ _Description: Device for boot loader installation:
     drive;
   - "/dev/fd0" will install GRUB to a floppy.
 
+Template: grub-installer/choose_bootdev
+Type: select
+Choices-C: manual, ${DEVICES_LIST}
+#flag:translate!:2
+__Choices: Enter device manually, ${DESCRIPTIONS}
+# :sl2:
+_Description: Device for boot loader installation:
+ You need to make the newly installed system bootable, by installing
+ the GRUB boot loader on a bootable device. The usual way to do this is to
+ install GRUB on the master boot record of your first hard drive. If you
+ prefer, you can install GRUB elsewhere on the drive, or to another drive,
+ or even to a floppy.
+
 Template: grub-installer/password
 Type: password
 # :sl2:
diff --git a/grub-installer b/grub-installer
index f01eda1..71e10c8 100755
--- a/grub-installer
+++ b/grub-installer
@@ -1,5 +1,6 @@
 #! /bin/sh
 
+# export DEBCONF_DEBUG=5
 set -e
 . /usr/share/debconf/confmodule
 #set -x
@@ -590,7 +591,81 @@ esac
 db_progress STEP 1
 db_progress INFO grub-installer/progress/step_bootdev
 
+select_bootdev() {
+	[ "X" = "X${DEBCONF_DEBUG}" ] || log "select_bootdev: arg='$1'"
+
+	local dev_list dev_descr grubdev devices disk_id dev descr
+	local default_choice chosen result
+
+	result=""
+	default_choice="$1"
+
+	# /dev/disk/by-id has multiple links for the same physical disk.
+	# Let's trust grub-mkdevicemap to select the most suitable ones
+	# and correctly handle systems with no /dev/disk/by-id.
+	# Use disk id string as a shortcut way to describe it.
+	# FIXME switch to grub-pc's far more elegant disk_descriptions()
+	dev_list=
+	dev_descr=
+	devices="$($chroot $ROOT grub-mkdevicemap --no-floppy -m - | cut -f2)"
+	for grubdev in $devices; do
+		disk_id="$(device_to_id $grubdev)"
+		dev="$(readlink -f "$disk_id")"
+		dev_list="${dev_list:+$dev_list, }$dev"
+		descr="$(echo $disk_id |sed -e 's+^.*/++' |sed -e 's+,+\\,+g')"
+		if [ "$dev" = "$disk_id" ]; then
+			dev_descr="${dev_descr:+$dev_descr, }$dev"
+		else
+			#/dev/sdX (id)
+			dev_descr="${dev_descr:+$dev_descr, }$dev  ($descr)"
+		fi
+	done
+
+	[ "X" = "X${DEBCONF_DEBUG}" ] || log "Bootdev Choices: '$dev_list'"
+	[ "X" = "X${DEBCONF_DEBUG}" ] || log "Bootdev Descriptions: '$dev_descr'"
+
+	db_subst grub-installer/choose_bootdev DEVICES_LIST "$dev_list"
+	db_subst grub-installer/choose_bootdev DESCRIPTIONS "$dev_descr"
+	# set initial selection
+	if [ -n "$default_choice" ] ; then
+		chosen="$(readlink -f "$default_choice")"
+		if [ -n "$chosen" ] ;then
+			db_set grub-installer/choose_bootdev "$chosen"
+		fi
+	fi
+
+	db_input high grub-installer/choose_bootdev || true
+	if ! db_go; then
+		log "Returning to menu"
+		db_progress STOP
+		exit 10
+	fi
+
+	db_get grub-installer/choose_bootdev || true
+	# Choices-C (not shown to user) can be set to 'manual'
+	if [ "$RET" = "manual" ] ; then
+		result=""
+	else
+		result="$(echo "$RET" | cut -d' ' -f1)"
+	fi
+
+	[ "X" = "X${DEBCONF_DEBUG}" ] || log "select_bootdev: result='$result'"
+	echo "$result"
+}
+
+if [ "$bootdev" != "dummy" ] && [ ! "$frdev" ]; then
+	# check for a preseeded value
+	db_get grub-installer/bootdev || true
+	if [ -n "$RET" ] ; then
+		bootdev="$RET"
+	fi
+fi
+
 while : ; do
+
+	[ "X" = "X${DEBCONF_DEBUG}" ] || \
+	    log "q='$q' state='$state' defbd='$default_bootdev' bd='$bootdev'"
+
 	if [ "$state" = 1 ]; then
 		db_input high $q || true
 		if ! db_go; then
@@ -600,8 +675,18 @@ while : ; do
 		fi
 		db_get $q
 		if [ "$RET" = true ]; then
-			bootdev="$default_bootdev"
-			break
+			# default_bootdev can be guessed incorrectly.
+			# If the user supplied a value for bootdev,
+			# ask them to resolve any conflict.
+			if [ "$bootdev" != "$default_bootdev" ] ; then
+				bootdev="$(select_bootdev "$bootdev")"
+				previous_state=1
+			fi
+			if [ -e "$bootdev" ] ; then
+			    break
+			else
+			    state=2
+			fi
 		else
 			# Exit to menu if /boot is on SATA RAID/multipath; we
 			# don't support device selection in that case
@@ -612,7 +697,15 @@ while : ; do
 			state=2
 		fi
 	elif [ "$state" = 2 ]; then
-		db_input critical grub-installer/bootdev || true
+
+		if [ "$previous_state" != "1" ]; then
+			bootdev="$(select_bootdev "$bootdev")"
+			unset previous_state
+		fi
+
+		if [ ! -e "$bootdev" ]; then
+		    db_input critical grub-installer/bootdev || true
+		fi
 		if ! db_go; then
 			if [ "$q" ]; then
 				state=1
-- 
<vincent.mcintyre@csiro.au>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 05:48:04 GMT) (full text, mbox, link).


Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 05:48:04 GMT) (full text, mbox, link).


Message #72 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Christian PERRIER <bubulle@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Cc: Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Mon, 29 Apr 2013 06:44:28 +0200
[Message part 1 (text/plain, inline)]
Quoting Vincent McIntyre (vincent.mcintyre@csiro.au):
> Hi,
> Thanks for the comments I've received on this patch.
> I did some reading to see how other packages handle the issues raised.
> I found grub-pc and iso-scan particularly helpful.
> Hopefully this attempt is better. Less than a week from release,
> I expect it is too late to include this but perhaps it could be
> considered for r1.


Hell Vincent,

I applied and pushed your patch. The maint point is that PO files get
updated by the daily l10n-sync script.

Then, I propose we upload 1.86 immediately to unstable so that it's
tested at least by those people who install unstable with D-I. 

Cyril, others, do you think there would be a risk that it interacts
badly with the release preparation?  The point is not trying to get
1.86 in testing before the release, of course...bt just have the patch
to receive more testing.



[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 08:27:07 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 08:27:07 GMT) (full text, mbox, link).


Message #77 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Christian PERRIER <bubulle@debian.org>, 706112@bugs.debian.org
Cc: Vincent McIntyre <vincent.mcintyre@csiro.au>, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Mon, 29 Apr 2013 10:23:24 +0200
[Message part 1 (text/plain, inline)]
Christian PERRIER <bubulle@debian.org> (29/04/2013):
> I applied and pushed your patch. The maint point is that PO files
> get updated by the daily l10n-sync script.
> 
> Then, I propose we upload 1.86 immediately to unstable so that it's
> tested at least by those people who install unstable with D-I.
> 
> Cyril, others, do you think there would be a risk that it interacts
> badly with the release preparation?  The point is not trying to get
> 1.86 in testing before the release, of course...bt just have the
> patch to receive more testing.

While I haven't reviewed the patch yet, having the l10n bits in sync
was a point I had in mind this very morning, so I'm glad you did
that. And indeed, some feedback ASAP would be nice. I'll try to look
into this patch in a few hours at most.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Cyril Brulebois <kibi@debian.org>:
You have taken responsibility. (Mon, 29 Apr 2013 12:06:09 GMT) (full text, mbox, link).


Notification sent to Schloss <schloss.kirchlauter@yandex.ru>:
Bug acknowledged by developer. (Mon, 29 Apr 2013 12:06:09 GMT) (full text, mbox, link).


Message #82 received at 706112-close@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: 706112-close@bugs.debian.org
Subject: Bug#706112: fixed in grub-installer 1.86
Date: Mon, 29 Apr 2013 12:03:20 +0000
Source: grub-installer
Source-Version: 1.86

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

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

Debian distribution maintenance software
pp.
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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 29 Apr 2013 13:53:27 +0200
Source: grub-installer
Binary: grub-installer
Architecture: source amd64
Version: 1.86
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
Description: 
 grub-installer - Install GRUB on a hard disk (udeb)
Closes: 706112
Changes: 
 grub-installer (1.86) unstable; urgency=low
 .
   [ Vincent McIntyre ]
   * Support menu selection of GRUB boot disk. Closes: #706112
Checksums-Sha1: 
 ed5cc1d1a7f67752906ceab949f5d6381cf8eed7 1259 grub-installer_1.86.dsc
 3722b8acefa720d822dd520536d8181036708ff1 222856 grub-installer_1.86.tar.gz
 7e3fd0d5098c57182b40f3fdde92ac15dde74d6d 223032 grub-installer_1.86_amd64.udeb
Checksums-Sha256: 
 a46a70f76b30625be11c8a091d7649260f690fc434d61334a185dbe4984bac3d 1259 grub-installer_1.86.dsc
 82d3e80001196b0b27a40fdc9db4490ed39d0d98d7aa21ba7f99e4a2a1741d07 222856 grub-installer_1.86.tar.gz
 5de4b3797b0080b793e385fce6007566947af87eaf357293ed4b4d69d7768f28 223032 grub-installer_1.86_amd64.udeb
Files: 
 55d7f4d2c7687823f4620c801eb49aec 1259 debian-installer standard grub-installer_1.86.dsc
 318476f86485d3d5d0e89e11cd960b7b 222856 debian-installer standard grub-installer_1.86.tar.gz
 fd4059aaa909e1469a919d5b1dfb53e8 223032 debian-installer standard grub-installer_1.86_amd64.udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlF+YC8ACgkQeGfVPHR5Nd2yewCfQUY3Fy0YuK2Mypy2cSMKj6FF
ndYAnivat0kisgzj+cs35yyEYrAdNQpn
=N4/z
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 12:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 12:09:04 GMT) (full text, mbox, link).


Message #87 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Christian PERRIER <bubulle@debian.org>, 706112@bugs.debian.org
Cc: Vincent McIntyre <vincent.mcintyre@csiro.au>, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Mon, 29 Apr 2013 14:04:58 +0200
[Message part 1 (text/plain, inline)]
Cyril Brulebois <kibi@debian.org> (29/04/2013):
> While I haven't reviewed the patch yet, having the l10n bits in sync
> was a point I had in mind this very morning, so I'm glad you did
> that. And indeed, some feedback ASAP would be nice. I'll try to look
> into this patch in a few hours at most.

Uploaded in time for the 1352 dinstall. Let's see if tests are
successful.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 21:36:04 GMT) (full text, mbox, link).


Acknowledgement sent to Christian PERRIER <bubulle@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 21:36:04 GMT) (full text, mbox, link).


Message #92 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Christian PERRIER <bubulle@debian.org>
To: Cyril Brulebois <kibi@debian.org>, 706112@bugs.debian.org
Cc: Vincent McIntyre <vincent.mcintyre@csiro.au>, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Mon, 29 Apr 2013 19:16:42 +0200
[Message part 1 (text/plain, inline)]
Quoting Cyril Brulebois (kibi@debian.org):
> Cyril Brulebois <kibi@debian.org> (29/04/2013):
> > While I haven't reviewed the patch yet, having the l10n bits in sync
> > was a point I had in mind this very morning, so I'm glad you did
> > that. And indeed, some feedback ASAP would be nice. I'll try to look
> > into this patch in a few hours at most.
> 
> Uploaded in time for the 1352 dinstall. Let's see if tests are
> successful.

Of course, you're aware that translations are currently not in the git
tree, as I committed the modified templates this morning, and the sync
will happen in the upcoming night?

So, in short, if the patch is OK, we need another upload to get the
new template translated.


[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 22:27:07 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 22:27:07 GMT) (full text, mbox, link).


Message #97 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Christian PERRIER <bubulle@debian.org>
Cc: Cyril Brulebois <kibi@debian.org>, 706112@bugs.debian.org, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Tue, 30 Apr 2013 08:23:50 +1000
On Mon, Apr 29, 2013 at 07:16:42PM +0200, Christian PERRIER wrote:
> Quoting Cyril Brulebois (kibi@debian.org):
> > Cyril Brulebois <kibi@debian.org> (29/04/2013):
> > > While I haven't reviewed the patch yet, having the l10n bits in sync
> > > was a point I had in mind this very morning, so I'm glad you did
> > > that. And indeed, some feedback ASAP would be nice. I'll try to look
> > > into this patch in a few hours at most.
> > 
> > Uploaded in time for the 1352 dinstall. Let's see if tests are
> > successful.
> 
> Of course, you're aware that translations are currently not in the git
> tree, as I committed the modified templates this morning, and the sync
> will happen in the upcoming night?
> 
> So, in short, if the patch is OK, we need another upload to get the
> new template translated.
> 
> 

gah. The patch was not ok. My apologies for such a gross error.
I caught this by testing with 1.86 as downloaded from the archive.

[PATCH] Actually set bootdev.

After taking all the trouble to get the right value into
the $bootdev shell variable, ensure that we db_set
grub-installer/bootdev with that value.

Signed-off-by: Vincent McIntyre <vincent.mcintyre@csiro.au>
---
 grub-installer |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/grub-installer b/grub-installer
index 71e10c8..f3d62fe 100755
--- a/grub-installer
+++ b/grub-installer
@@ -683,6 +683,7 @@ while : ; do
 				previous_state=1
 			fi
 			if [ -e "$bootdev" ] ; then
+			    db_set grub-installer/bootdev $bootdev
 			    break
 			else
 			    state=2
@@ -703,9 +704,12 @@ while : ; do
 			unset previous_state
 		fi
 
-		if [ ! -e "$bootdev" ]; then
-		    db_input critical grub-installer/bootdev || true
+		if [ -e "$bootdev" ]; then
+		    db_set grub-installer/bootdev $bootdev
+		    break
 		fi
+
+		db_input critical grub-installer/bootdev || true
 		if ! db_go; then
 			if [ "$q" ]; then
 				state=1
-- 
<vincent.mcintyre@csiro.au>




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 29 Apr 2013 22:39:04 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 29 Apr 2013 22:39:04 GMT) (full text, mbox, link).


Message #102 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>
Cc: Christian PERRIER <bubulle@debian.org>, 706112@bugs.debian.org, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>, debian-release@lists.debian.org
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Tue, 30 Apr 2013 00:34:48 +0200
[Message part 1 (text/plain, inline)]
Vincent McIntyre <vincent.mcintyre@csiro.au> (30/04/2013):
> gah. The patch was not ok. My apologies for such a gross error.
> I caught this by testing with 1.86 as downloaded from the archive.
> 
> [PATCH] Actually set bootdev.
> 
> After taking all the trouble to get the right value into
> the $bootdev shell variable, ensure that we db_set
> grub-installer/bootdev with that value.
> 
> Signed-off-by: Vincent McIntyre <vincent.mcintyre@csiro.au>

Hi again Vincent,

I guess that settles it. My initial tests (with different VM configs,
with 1.85 and 1.86) were quite OK so far, but I see code still needs
refining. I don't think it's reasonable to push an updated (>> 1.85)
grub-installer into r0 (meaning a migration to testing by wednesday).
I had been struggling the whole day, trying to balance fixing a quite
common use case, and resisting rushing a new version into testing at
this point.

I suggest we work towards having a suitable grub-installer for
inclusion into r1 (which will possibly be released roughly 1 month
after r0), for which we'll have more time than a couple of hours/days
of testing. We'll be able to receive translation updates without
last-minute added pressure, which should nicely appease Christian. ;-)

Cc-ing debian-release@ to let them know we're skipping a (very late)
grub-installer update.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Tue, 30 Apr 2013 20:51:07 GMT) (full text, mbox, link).


Acknowledgement sent to "Adam D. Barratt" <adam@adam-barratt.org.uk>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 30 Apr 2013 20:51:07 GMT) (full text, mbox, link).


Message #107 received at 706112@bugs.debian.org (full text, mbox, reply):

From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
To: Cyril Brulebois <kibi@debian.org>, 706112@bugs.debian.org
Cc: Vincent McIntyre <vincent.mcintyre@csiro.au>, Christian PERRIER <bubulle@debian.org>, Joey Hess <joeyh@debian.org>, Gaudenz Steinlin <gaudenz@debian.org>, debian-release@lists.debian.org
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Tue, 30 Apr 2013 21:50:16 +0100
user release.debian.org@packages.debian.org
usertags 706112 + wheezy-can-defer
tags 706112 + wheezy-ignore
thanks

On Tue, 2013-04-30 at 00:34 +0200, Cyril Brulebois wrote:
> I suggest we work towards having a suitable grub-installer for
> inclusion into r1 (which will possibly be released roughly 1 month
> after r0), for which we'll have more time than a couple of hours/days
> of testing. We'll be able to receive translation updates without
> last-minute added pressure, which should nicely appease Christian. ;-)
> 
> Cc-ing debian-release@ to let them know we're skipping a (very late)
> grub-installer update.

Thanks; tagging appropriately.

Regards,

Adam




Added tag(s) wheezy-ignore. Request was from "Adam D. Barratt" <adam@adam-barratt.org.uk> to control@bugs.debian.org. (Tue, 30 Apr 2013 20:51:14 GMT) (full text, mbox, link).


Marked as found in versions grub-installer/1.85. Request was from Cyril Brulebois <kibi@debian.org> to control@bugs.debian.org. (Sat, 08 Jun 2013 23:45:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Sat, 08 Jun 2013 23:51:17 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sat, 08 Jun 2013 23:51:17 GMT) (full text, mbox, link).


Message #116 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Vincent McIntyre <vincent.mcintyre@csiro.au>, 706112@bugs.debian.org
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Sun, 9 Jun 2013 01:47:36 +0200
[Message part 1 (text/plain, inline)]
Vincent McIntyre <vincent.mcintyre@csiro.au> (30/04/2013):
> gah. The patch was not ok. My apologies for such a gross error.
> I caught this by testing with 1.86 as downloaded from the archive.

Thanks, Vincent.

Applied locally. I'll try and play with it, and see when that can be
pushed to unstable, and maybe into {the next,an upcoming} wheezy point
release.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Sun, 09 Jun 2013 01:24:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 09 Jun 2013 01:24:04 GMT) (full text, mbox, link).


Message #121 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Cyril Brulebois <kibi@debian.org>
Cc: 706112@bugs.debian.org
Subject: Re: Bug#706112: [PATCH v2] grub-installer: Support menu selection of grub boot disk
Date: Sun, 9 Jun 2013 11:08:55 +1000
On Sun, Jun 09, 2013 at 01:47:36AM +0200, Cyril Brulebois wrote:
> Vincent McIntyre <vincent.mcintyre@csiro.au> (30/04/2013):
> > gah. The patch was not ok. My apologies for such a gross error.
> > I caught this by testing with 1.86 as downloaded from the archive.
> 
> Thanks, Vincent.
> 
> Applied locally. I'll try and play with it, and see when that can be
> pushed to unstable, and maybe into {the next,an upcoming} wheezy point
> release.
> 

Okay, thanks for letting me know.
Since I posted that stuff I looked at thie code again and prepared
a patch series that includes the fix you've applied locally and
goes on to would bring the disk naming into line with the way grub-pc
does it. I'll send them off-list to avoid confusing the thread.
If you like them feel free to repost to the list.
It seems to me that there should be some kind of bug for this issue
to track progress on it, not sure how best to do that.

Cheers
Vince




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Sun, 09 Jun 2013 02:12:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent McIntyre <vincent.mcintyre@csiro.au>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 09 Jun 2013 02:12:04 GMT) (full text, mbox, link).


Message #126 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Vincent McIntyre <vincent.mcintyre@csiro.au>
To: Cyril Brulebois <kibi@debian.org>
Cc: 706112@bugs.debian.org
Subject: [PATCH 0/4] grub-installer: Support menu selection of grub boot disk
Date: Sun, 9 Jun 2013 11:55:52 +1000
[Message part 1 (text/plain, inline)]
On Sun, Jun 09, 2013 at 01:47:36AM +0200, Cyril Brulebois wrote:
> Vincent McIntyre <vincent.mcintyre@csiro.au> (30/04/2013):
> > gah. The patch was not ok. My apologies for such a gross error.
> > I caught this by testing with 1.86 as downloaded from the archive.
> 
> Thanks, Vincent.
> 
> Applied locally. I'll try and play with it, and see when that can be
> pushed to unstable, and maybe into {the next,an upcoming} wheezy point
> release.

Attached is a patch series I did a few weeks ago.
I haven't had time to test carefully but I should get them out there.

0001 of the series fixes the issue I raised earlier in the thread,
in a slightly different way. kibi suggests this should be considered
for inclusion in time for the wheezy point release.

0002 & 0003 are cleanups.

0004 introduces naming the disks in the same way as grub-pc.

All of the above will need testing, particular 0004.

[0001-Add-missing-break-in-bootdev-question-loop.patch (text/x-diff, attachment)]
[0002-Remove-unnecessary-else-clause.patch (text/x-diff, attachment)]
[0003-Same-line-in-both-branches-of-if-statement.patch (text/x-diff, attachment)]
[0004-Merge-describe_disks-from-grub-pc.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Mon, 13 Oct 2014 15:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Parent <math.parent@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Mon, 13 Oct 2014 15:45:04 GMT) (full text, mbox, link).


Message #131 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Mathieu Parent <math.parent@gmail.com>
To: 706112@bugs.debian.org, 763580@bugs.debian.org
Cc: Debian Install System Team <debian-boot@lists.debian.org>
Subject: grub-installer: defaults again to /dev/sda
Date: Mon, 13 Oct 2014 17:40:53 +0200
Hello,

For reference:
See also #607536, for a similar fix in partman-auto.

Regards
-- 
Mathieu



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#706112; Package grub-installer. (Tue, 14 Oct 2014 03:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Tue, 14 Oct 2014 03:54:04 GMT) (full text, mbox, link).


Message #136 received at 706112@bugs.debian.org (full text, mbox, reply):

From: Cyril Brulebois <kibi@debian.org>
To: Mathieu Parent <math.parent@gmail.com>
Cc: 706112@bugs.debian.org, 763580@bugs.debian.org, Debian Install System Team <debian-boot@lists.debian.org>
Subject: Re: grub-installer: defaults again to /dev/sda
Date: Tue, 14 Oct 2014 05:51:36 +0200
[Message part 1 (text/plain, inline)]
Mathieu Parent <math.parent@gmail.com> (2014-10-13):
> Hello,
> 
> For reference:
> See also #607536, for a similar fix in partman-auto.

Last I checked, there's no /cdrom.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 26 Apr 2015 07:29:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Tue May 21 13:59:21 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.