LVM Storage Template breaks Installation on 20.04


I don’t know why, but If I assign the LVM storage template to a server that will be installed with 20.04 hwe kernel, the installation process fails with:

finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Traceback (most recent call last):
  File "/curtin/curtin/commands/", line 202, in main
    ret = args.func(args)
  File "/curtin/curtin/commands/", line 1886, in curthooks
    builtin_curthooks(cfg, target, state)
  File "/curtin/curtin/commands/", line 1851, in builtin_curthooks
    setup_grub(cfg, target, osfamily=osfamily,
  File "/curtin/curtin/commands/", line 804, in setup_grub
    install_grub(instdevs, target, uefi=uefi_bootable, grubcfg=grubcfg)
  File "/curtin/curtin/commands/", line 398, in install_grub
    in_chroot.subp(cmd, env=env, capture=True)
  File "/curtin/curtin/", line 780, in subp
    return subp(*args, **kwargs)
  File "/curtin/curtin/", line 275, in subp
    return _subp(*args, **kwargs)
  File "/curtin/curtin/", line 139, in _subp
    raise ProcessExecutionError(stdout=out, stderr=err,
curtin.util.ProcessExecutionError: Unexpected error while running command.
Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpi6ddcgfl/target', '/usr/lib/grub/grub-multi-install']
Exit code: 1
Reason: -
Stdout: ''
Stderr: Installing grub to /boot/efi.
        Installing for x86_64-efi platform.
        Installation finished. No error reported.
        Installing grub to /var/lib/grub/esp.
        Installing for x86_64-efi platform.
        grub-install: error: /var/lib/grub/esp doesn't look like an EFI partition.
Unexpected error while running command.

I have other servers like this one (slight previous HW version) installed with 18.04.

Any idea why this could be happening?

don’t even know why is trying to install to /var/lib/grub/esp

I can see this bug report, perhaps is related…

I think removing the boot flag form /boot, which I believe is used for legacy boot, would fix the issue.

However I cannot see flags in UI partitions,

@rvallel, did you ever figure this one out?