/usr/lib/grub/grub-multi-install fails on noble-daily

Bug #2055294 reported by Olivier Gayot
388
This bug affects 48 people
Affects Status Importance Assigned to Milestone
subiquity
Invalid
Undecided
Unassigned
grub2 (Ubuntu)
Fix Released
Critical
Mate Kukri

Bug Description

I am using subiquity to install the current noble daily ISO (server).

Subiquity failed the step called "installing grub to target devices" and the logs show that /usr/lib/grub/grub-multi-install failed silently with exit status 10.

When running the script with `set -x`, we see the following, which seem to indicate that the absence of a debconf selection variable is causing trouble:

+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /usr/lib/grub/grub-multi-install
+ set -e
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
++ dpkg-query --control-path grub-common templates
+ db_x_loadtemplatefile /var/lib/dpkg/info/grub-common.templates grub-common
+ _db_cmd 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/grub-common.templates' grub-common
+ _db_internal_IFS='
'
+ IFS=' '
+ printf '%s\n' 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/grub-common.templates grub-common'
+ IFS='
'
+ read -r _db_internal_line
+ IFS='
'
+ RET=0
+ case ${_db_internal_line%%[ ]*} in
+ return 0
+ cached_available_ids=
+ db_get grub-efi/cloud_style_installation
+ _db_cmd 'GET grub-efi/cloud_style_installation'
+ _db_internal_IFS='
'
+ IFS=' '
+ printf '%s\n' 'GET grub-efi/cloud_style_installation'
+ IFS='
'
+ read -r _db_internal_line
+ IFS='
'
+ RET='10 grub-efi/cloud_style_installation doesn'\''t exist'
+ case ${_db_internal_line%%[ ]*} in
+ return 10

Related branches

Mate Kukri (mkukri)
Changed in grub2 (Ubuntu):
status: New → In Progress
assignee: nobody → Mate Kukri (mkukri)
importance: Undecided → Critical
tags: added: foundations-todo
Changed in grub2 (Ubuntu):
status: In Progress → Fix Committed
Dan Bungert (dbungert)
Changed in subiquity:
status: New → Invalid
Revision history for this message
Thiago Martins (martinx) wrote :

Hi! I was `do-release-upgrade -d` an Ubuntu 22.04 to Ubuntu 24.04 to test and got bitten by this bug too! lol

The command `/usr/lib/grub/grub-multi-install --target=x86_64-efi` returns 10, causing `dpkg --configure grub-efi-amd64-signed` to fail.

Revision history for this message
Mate Kukri (mkukri) wrote :

@martinx, apologies the fix is committed and is currently waiting on archive work to migrate to release.

In the meantime you can run:
```
echo grub-pc grub-efi/cloud_style_installation boolean false | sudo debconf-set-selections
```

before the upgrade as a workaround and it should succeed.

Revision history for this message
Alex Wang (alexwang-bkc) wrote :

looks like i am hitting the exact same issue, may i know what can i do to get the Ubuntu 24.04 daily build installation to complete successfully instead of trying new ISO? Thanks a lot.

Revision history for this message
corrado venturini (corradoventu) wrote :

just wait for the bug to be fixed on grub2

Revision history for this message
Alex Wang (alexwang-bkc) wrote :

Couple of questions:
1.sounds like this is a catastrophic issue that block fresh Ubuntu 24.04 Beta installation, isn't it?
2. so we have to wait for the new ISO image that includes the new grub2? If yes, when do we expect to get the new ISO image. Now we are doing some early evaluation work for Ubuntu 24.04 Beta with a tight schedule. It would be greatly helpful if there is a workaround. Thanks.

Revision history for this message
Olivier Gayot (ogayot) wrote :

Hello Alex,

I believe that as soon as grub2 is fixed in the archive, the installer should be able pick it up without requiring new ISOs, but we will have confirmation when the fix is out. For sure, if you are doing offline installations, a new ISO will be required though.

If you would like to do some testing, I can suggest the following workaround (I only tested it for installing Ubuntu Server but I think it should work for the desktop installer too)

1. Boot the installer
2. Create (as root) a file named /autoinstall.yaml and add this content:

version: 1
debconf-selections: |
  grub-pc grub-efi/cloud_style_installation boolean false
interactive-sections: ["*"]

3. Restart the installer
  * If you are using the desktop installer, run `sudo snap restart ubuntu-desktop-bootstrap` and then click on "Install Ubuntu 24.04"
  * If you are using the server installer, run `sudo snap restart subiquity`

NOTE: if you are already doing automated installs, you should be able to add the workaround to your existing autoinstall file, without requiring a restart of the installer.

As for the actual Beta release, please note that it is planned for early April. You can find the actual schedule at https://discourse.ubuntu.com/t/noble-numbat-release-schedule/35649

Thanks,
Olivier

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.12-1ubuntu4

---------------
grub2 (2.12-1ubuntu4) noble; urgency=medium

  * d/grub-multi-install: Treat missing `cloud_style_installation` debconf as
    false (LP: #2055294)

 -- Mate Kukri <email address hidden> Wed, 28 Feb 2024 15:55:10 +0000

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
corrado venturini (corradoventu) wrote :

The following packages have been kept back:
  grub-common grub2-common
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Revision history for this message
Alex Wang (alexwang-bkc) wrote :

hey Olivier Gayot,
The workaround you provided works like a charm, also thanks for the elaboration. I finally got Ubuntu 24.04 Beta installed successfully on my system. You are my lifesaver!

Revision history for this message
Alex Wang (alexwang-bkc) wrote :

hey Olivier Gayot,
One further question, we are indeed using "user-data" automated installer methodology, so we can simply append it(i did notice the last line is version :1) with the following to our user-data file to work around this issue, right?

debconf-selections: |
  grub-pc grub-efi/cloud_style_installation boolean false
interactive-sections: ["*"]

Revision history for this message
Mate Kukri (mkukri) wrote (last edit ):

The fix for this has migrated to release now and newly built ISOs should not need any workaround.

Revision history for this message
Leó Kolbeinsson (leok) wrote :

Confirm this now fixed in Ubuntu Noble daily ISO dated 09-03-2024

Revision history for this message
santinos09 (santinos09) wrote : Re: [Bug 2055294] Re: /usr/lib/grub/grub-multi-install fails on noble-daily

[image: image.png]
Dear Leo, sorry but the error is present also in the ISO of today 9/3.
attached print screen
rgds

Il giorno sab 9 mar 2024 alle ore 08:56 Leó Kolbeinsson <
<email address hidden>> ha scritto:

> Confirm this now fixed in Ubuntu Noble daily ISO dated 09-03-2024
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (2055833).
> https://bugs.launchpad.net/bugs/2055294
>
> Title:
> /usr/lib/grub/grub-multi-install fails on noble-daily
>
> Status in subiquity:
> Invalid
> Status in grub2 package in Ubuntu:
> Fix Released
>
> Bug description:
> I am using subiquity to install the current noble daily ISO (server).
>
> Subiquity failed the step called "installing grub to target devices"
> and the logs show that /usr/lib/grub/grub-multi-install failed
> silently with exit status 10.
>
> When running the script with `set -x`, we see the following, which
> seem to indicate that the absence of a debconf selection variable is
> causing trouble:
>
> + set -e
> + . /usr/share/debconf/confmodule
> ++ '[' '!' '' ']'
> ++ PERL_DL_NONLAZY=1
> ++ export PERL_DL_NONLAZY
> ++ '[' '' ']'
> ++ exec /usr/share/debconf/frontend /usr/lib/grub/grub-multi-install
> + set -e
> + . /usr/share/debconf/confmodule
> ++ '[' '!' 1 ']'
> ++ '[' -z '' ']'
> ++ exec
> ++ '[' '' ']'
> ++ exec
> ++ DEBCONF_REDIR=1
> ++ export DEBCONF_REDIR
> ++ dpkg-query --control-path grub-common templates
> + db_x_loadtemplatefile /var/lib/dpkg/info/grub-common.templates
> grub-common
> + _db_cmd 'X_LOADTEMPLATEFILE /var/lib/dpkg/info/grub-common.templates'
> grub-common
> + _db_internal_IFS='
> '
> + IFS=' '
> + printf '%s\n' 'X_LOADTEMPLATEFILE
> /var/lib/dpkg/info/grub-common.templates grub-common'
> + IFS='
> '
> + read -r _db_internal_line
> + IFS='
> '
> + RET=0
> + case ${_db_internal_line%%[ ]*} in
> + return 0
> + cached_available_ids=
> + db_get grub-efi/cloud_style_installation
> + _db_cmd 'GET grub-efi/cloud_style_installation'
> + _db_internal_IFS='
> '
> + IFS=' '
> + printf '%s\n' 'GET grub-efi/cloud_style_installation'
> + IFS='
> '
> + read -r _db_internal_line
> + IFS='
> '
> + RET='10 grub-efi/cloud_style_installation doesn'\''t exist'
> + case ${_db_internal_line%%[ ]*} in
> + return 10
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/subiquity/+bug/2055294/+subscriptions
>
>

Revision history for this message
Leó Kolbeinsson (leok) wrote :

@santinos09

I think your error is rather bug https://bugs.launchpad.net/ubuntu/+source/tracker-miners/+bug/2055761

However I may be wrong and sorry for comment if so.

Revision history for this message
santinos09 (santinos09) wrote : Fwd: [Bug 2055294] Re: /usr/lib/grub/grub-multi-install fails on noble-daily
Download full text (3.2 KiB)

Dear Leo,

i manage to install Ubuntu Noble 24.04,  by using ISO image of today
9-3-2024.

The workaround to avoid the below error is to rename the file :

ubuntu.sources    into  ubuntu.sources.old

into  directory "/etc/apt/sources.list.d/

then logout and login and i made installation  again and it worked !!!.

Now  i am using , the new istallation.

Rgds

Santino

-------- Messaggio Inoltrato --------
Oggetto: Re: [Bug 2055294] Re: /usr/lib/grub/grub-multi-install fails
on noble-daily
Data: Sat, 9 Mar 2024 14:28:11 +0000
Mittente: Santino Ruggeri <email address hidden>
A: Bug 2055294 <email address hidden>

image.png
Dear Leo,  sorry but the error is present also in the ISO of today 9/3.
attached print screen
rgds

Il giorno sab 9 mar 2024 alle ore 08:56 Leó Kolbeinsson
<email address hidden> ha scritto:

    Confirm this now fixed in Ubuntu Noble daily ISO dated 09-03-2024

    --
    You received this bug notification because you are subscribed to a
    duplicate bug report (2055833).
    https://bugs.launchpad.net/bugs/2055294

    Title:
       /usr/lib/grub/grub-multi-install fails on noble-daily

    Status in subiquity:
       Invalid
    Status in grub2 package in Ubuntu:
       Fix Released

    Bug description:
       I am using subiquity to install the current noble daily ISO (server).

       Subiquity failed the step called "installing grub to target devices"
       and the logs show that /usr/lib/grub/grub-multi-install failed
       silently with exit status 10.

       When running the script with `set -x`, we see the following, which
       seem to indicate that the absence of a debconf selection variable is
       causing trouble:

       + set -e
       + . /usr/share/debconf/confmodule
       ++ '[' '!' '' ']'
       ++ PERL_DL_NONLAZY=1
       ++ export PERL_DL_NONLAZY
       ++ '[' '' ']'
       ++ exec /usr/share/debconf/frontend /usr/lib/grub/grub-multi-install
       + set -e
       + . /usr/share/debconf/confmodule
       ++ '[' '!' 1 ']'
       ++ '[' -z '' ']'
       ++ exec
       ++ '[' '' ']'
       ++ exec
       ++ DEBCONF_REDIR=1
       ++ export DEBCONF_REDIR
       ++ dpkg-query --control-path grub-common templates
       + db_x_loadtemplatefile /var/lib/dpkg/info/grub-common.templates
    grub-common
       + _db_cmd 'X_LOADTEMPLATEFILE
    /var/lib/dpkg/info/grub-common.templates' grub-common
       + _db_internal_IFS='
       '
       + IFS=' '
       + printf '%s\n' 'X_LOADTEMPLATEFILE
    /var/lib/dpkg/info/grub-common.templates grub-common'
       + IFS='
       '
       + read -r _db_internal_line
       + IFS='
       '
       + RET=0
       + case ${_db_internal_line%%[     ]*} in
       + return 0
       + cached_available_ids=
       + db_get grub-efi/cloud_style_installation
       + _db_cmd 'GET grub-efi/cloud_style_installation'
       + _db_internal_IFS='
       '
       + IFS=' '
       + printf '%s\n' 'GET grub-efi/cloud_style_installation'
       + IFS='
       '
       + read -r _db_internal_line
       + IFS='
       '
       + RET='10 grub-efi/cloud_style_installation doesn'\''t exist'
       + case ${_db_internal_line%%[     ]*} in
       + return 10

    ...

Read more...

Revision history for this message
Devjyoti Ghosh (devjyoti567) wrote : Re: [Bug 2055294] Re: /usr/lib/grub/grub-multi-install fails on noble-daily
Download full text (6.7 KiB)

Dear Santino,

Thank you for sharing the workaround to avoid the error related to
/usr/lib/grub/grub-multi-install on Ubuntu Noble 24.04. It's great to hear
that renaming the file ubuntu.sources to ubuntu.sources.old in the
directory "/etc/apt/sources.list.d/", followed by logging out and logging
back in, helped you successfully complete the installation.

To address the error you encountered, I recommend checking the debconf
selection variable mentioned in the error logs. It seems that the absence
of this variable might be causing the issue with
/usr/lib/grub/grub-multi-install. You may need to ensure that the necessary
debconf selection variable is set correctly before running the installation
process.

If you encounter any further difficulties or need additional assistance,
please feel free to reach out. I'm here to help you resolve any issues you
may face during the installation process.

Best regards,

Devjyoti Ghosh

On Sat, 9 Mar 2024 at 20:45, santinos09 <email address hidden> wrote:

> Dear Leo,
>
> i manage to install Ubuntu Noble 24.04, by using ISO image of today
> 9-3-2024.
>
> The workaround to avoid the below error is to rename the file :
>
> ubuntu.sources into ubuntu.sources.old
>
> into directory "/etc/apt/sources.list.d/
>
> then logout and login and i made installation again and it worked !!!.
>
> Now i am using , the new istallation.
>
> Rgds
>
> Santino
>
>
> -------- Messaggio Inoltrato --------
> Oggetto: Re: [Bug 2055294] Re: /usr/lib/grub/grub-multi-install
> fails
> on noble-daily
> Data: Sat, 9 Mar 2024 14:28:11 +0000
> Mittente: Santino Ruggeri <email address hidden>
> A: Bug 2055294 <email address hidden>
>
>
> image.png
> Dear Leo, sorry but the error is present also in the ISO of today 9/3.
> attached print screen
> rgds
>
>
> Il giorno sab 9 mar 2024 alle ore 08:56 Leó Kolbeinsson
> <email address hidden> ha scritto:
>
> Confirm this now fixed in Ubuntu Noble daily ISO dated 09-03-2024
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (2055833).
> https://bugs.launchpad.net/bugs/2055294
>
> Title:
> /usr/lib/grub/grub-multi-install fails on noble-daily
>
> Status in subiquity:
> Invalid
> Status in grub2 package in Ubuntu:
> Fix Released
>
> Bug description:
> I am using subiquity to install the current noble daily ISO
> (server).
>
> Subiquity failed the step called "installing grub to target devices"
> and the logs show that /usr/lib/grub/grub-multi-install failed
> silently with exit status 10.
>
> When running the script with `set -x`, we see the following, which
> seem to indicate that the absence of a debconf selection variable is
> causing trouble:
>
> + set -e
> + . /usr/share/debconf/confmodule
> ++ '[' '!' '' ']'
> ++ PERL_DL_NONLAZY=1
> ++ export PERL_DL_NONLAZY
> ++ '[' '' ']'
> ++ exec /usr/share/debconf/frontend /usr/lib/grub/grub-multi-install
> + set -e
> + . /usr/share/debconf/confmodule
> ++ '[' '!' 1 ']'
> ++ '[' -z ...

Read more...

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/2055294

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.