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

Bug#666974: installs to /dev/sda when grub-installer/bootdev = /dev/sdb



On 19 February 2014 20:02, Guilhem Moulin <guilhem@guilhem.org> wrote:
> Package: grub-installer
> Version: 1.85
> Followup-For: Bug #666974
> Tags: patch
>
> Dear Maintainer,
>
> The bug is still present in Wheezy's installer.  The enclosed (naive)
> patch makes sure grub-installer jumps to state 2 (hence ignores
> $default_bootdev) if grub-installer/bootdev is known.  It has been
> successfully tested on manual and automated installations with and
> without preseeding grub-installer/bootdev.
>
>

I agree with below patch. I've had to deal with a few support cases
where this was the end goal.

Similarly, a very comparable patch was proposed to me not so long ago

https://launchpadlibrarian.net/165315548/lp1012629.trusty.debdiff

With essentially the same spirit -> if grub-installer/bootdev is
preseeded it must be used and nothing else.

I'll compare the logic of the two, but by memory, they appear
equivalent to me. I'd be inclined to take the Guilhem's version as I
prefer one-liners better ;-)

> -8<------------------------------------------------------------------>8-
>
> diff -ru a/grub-installer b/grub-installer
> --- a/grub-installer
> +++ b/grub-installer
> @@ -599,7 +599,7 @@
>             exit 10
>         fi
>         db_get $q
> -       if [ "$RET" = true ]; then
> +       if [ "$RET" = true ] && ! db_get grub-installer/bootdev; then
>             bootdev="$default_bootdev"
>             break
>         else
>
> -8<------------------------------------------------------------------>8-
>


Thanks a lot.

-- 
Regards,

Dimitri.


Reply to: