Ubuntu 20.10 autoinstall does not reorder uefi boot order

Bug #1901397 reported by Rui Lopes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
Invalid
Undecided
Unassigned

Bug Description

I'm trying to autoinstall an Ubuntu 20.10 using packer qemu/kvm in UEFI mode at https://github.com/rgl/ubuntu-vagrant/blob/20.10-wip/autoinstall-cloud-init-data/user-data but after the installation completes successfully the system is rebooted into the live installer instead of the installed ubuntu.

This might be related with https://bugs.launchpad.net/subiquity/+bug/1845543 where the installer is not able to eject the cdrom and as such the firmware will continue booting from it.

I've browsed the https://curtin.readthedocs.io/en/latest/topics/config.html?highlight=reorder_uefi#grub documentation and it seems curtin has a way to reconfigure the uefi boot manager with the reorder_uefi and update_nvram options, but I didn't find a way to set those from autoinstall cloud-config. So those settings might help too, thou, their default values should have worked, so subiquity seems to be changing those somehow (I didn't find any evidence of this in the subiquity source code, so, I'm not really sure about this; but something if off, because things are not working).

I was able to workaround this using efibootmgr:

  late-commands:
    - |
      if [ -d /sys/firmware/efi ]; then
        apt-get install -y efibootmgr
        efibootmgr -o $(efibootmgr | perl -n -e '/Boot(.+)\* ubuntu/ && print $1')
      fi

But it would be better not doing that.

Revision history for this message
Tom Kivlin (tomkivlin) wrote :

You can set `reorder_uefi: False` in the storage section of autoinstall cloud-config. From https://ubuntu.com/server/docs/install/autoinstall-reference:

action-based config
For full flexibility, the installer allows storage configuration to be done using a syntax which is a superset of that supported by curtin, described at https://curtin.readthedocs.io/en/latest/topics/storage.html.

If the “layout” feature is used to configure the disks, the “config” section will not be used.

As well as putting the list of actions under the ‘config’ key, the grub and swap curtin config items can be put here.

However, as per bug I just raised (https://bugs.launchpad.net/subiquity/+bug/1952926), the grub and swap sections are only used if you use config in the storage section - not used if you use layout in the storage section.

Revision history for this message
Rui Lopes (rgl) wrote :

Setting grub: reorder_uefi: false did work for me.

Thank You!

Changed in subiquity:
status: New → Invalid
Revision history for this message
LoOoD (gman) wrote :

I'm seeing a similar issue with 22.04.3. Our autoinstall config uses the layout feature. Using the posted workaround for now, it works!

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.