Comment 1 for bug 1898550

Revision history for this message
David van der Spek (vanderspek-david) wrote :

I believe I am facing a similar situation, but with MAAS 2.9.1 and the latest grub. I also noticed that sudo apt-get upgrade on my nodes is having issues with installing the latest grub. I have also tried the above fix of using gparted and clearing everything of the disks and recomissioning, but the issue remains. Here are the MAAS logs for the deployment:

Using grub install command: /usr/lib/grub/grub-multi-install
Grub install cmds:
[['efibootmgr', '-v'], ['dpkg-reconfigure', 'grub-efi-amd64'], ['update-grub'], ['/usr/lib/grub/grub-multi-install'], ['efibootmgr', '-v']]
Running command ['mount', '--bind', '/dev', '/tmp/tmpp_j3sjq8/target/dev'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/proc', '/tmp/tmpp_j3sjq8/target/proc'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/run', '/tmp/tmpp_j3sjq8/target/run'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/sys', '/tmp/tmpp_j3sjq8/target/sys'] with allowed return codes [0] (capture=False)
Running command ['mount', '--bind', '/sys/firmware/efi/efivars', '/tmp/tmpp_j3sjq8/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'efibootmgr', '-v'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'dpkg-reconfigure', 'grub-efi-amd64'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', 'update-grub'] with allowed return codes [0] (capture=True)
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', '/usr/lib/grub/grub-multi-install'] with allowed return codes [0] (capture=True)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED subp(['udevadm', 'settle']): 0.021
Running command ['umount', '/tmp/tmpp_j3sjq8/target/sys/firmware/efi/efivars'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/sys'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/run'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/proc'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpp_j3sjq8/target/dev'] with allowed return codes [0] (capture=False)
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/install-grub: FAIL: installing grub to target devices
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks/configuring-bootloader: FAIL: configuring target system bootloader
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: FAIL: curtin command curthooks
Traceback (most recent call last):
  File "/curtin/curtin/commands/main.py", line 202, in main
    ret = args.func(args)
  File "/curtin/curtin/commands/curthooks.py", line 1884, in curthooks
    builtin_curthooks(cfg, target, state)
  File "/curtin/curtin/commands/curthooks.py", line 1849, in builtin_curthooks
    setup_grub(cfg, target, osfamily=osfamily,
  File "/curtin/curtin/commands/curthooks.py", line 809, in setup_grub
    install_grub(instdevs, target, uefi=uefi_bootable, grubcfg=grubcfg)
  File "/curtin/curtin/commands/install_grub.py", line 376, in install_grub
    in_chroot.subp(cmd, env=env, capture=True)
  File "/curtin/curtin/util.py", line 708, in subp
    return subp(*args, **kwargs)
  File "/curtin/curtin/util.py", line 275, in subp
    return _subp(*args, **kwargs)
  File "/curtin/curtin/util.py", line 139, in _subp
    raise ProcessExecutionError(stdout=out, stderr=err,
curtin.util.ProcessExecutionError: Unexpected error while running command.
Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_j3sjq8/target', '/usr/lib/grub/grub-multi-install']
Exit code: 1
Reason: -
Stdout: ''
Stderr: Installing grub to /boot/efi.
        Installing for x86_64-efi platform.
        grub-install: warning: Cannot set EFI variable Boot0006.
        grub-install: warning: efivarfs_set_variable: writing to fd 7 failed: Invalid argument.
        grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: Invalid argument.
        grub-install: error: failed to register the EFI boot entry: Invalid argument.

Unexpected error while running command.