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.
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 reconfigure' , 'grub-efi-amd64'], ['update-grub'], ['/usr/ lib/grub/ grub-multi- install' ], ['efibootmgr', '-v']] j3sjq8/ target/ dev'] with allowed return codes [0] (capture=False) j3sjq8/ target/ proc'] with allowed return codes [0] (capture=False) j3sjq8/ target/ run'] with allowed return codes [0] (capture=False) j3sjq8/ target/ sys'] with allowed return codes [0] (capture=False) efi/efivars' , '/tmp/tmpp_ j3sjq8/ target/ sys/firmware/ efi/efivars' ] with allowed return codes [0] (capture=False) j3sjq8/ target' , 'efibootmgr', '-v'] with allowed return codes [0] (capture=True) j3sjq8/ target' , 'dpkg-reconfigure', 'grub-efi-amd64'] with allowed return codes [0] (capture=True) j3sjq8/ target' , 'update-grub'] with allowed return codes [0] (capture=True) j3sjq8/ target' , '/usr/lib/ grub/grub- multi-install' ] with allowed return codes [0] (capture=True) j3sjq8/ target/ sys/firmware/ efi/efivars' ] with allowed return codes [0] (capture=False) j3sjq8/ target/ sys'] with allowed return codes [0] (capture=False) j3sjq8/ target/ run'] with allowed return codes [0] (capture=False) j3sjq8/ target/ proc'] with allowed return codes [0] (capture=False) j3sjq8/ target/ dev'] with allowed return codes [0] (capture=False) stage-curthooks /builtin/ cmd-curthooks/ install- grub: FAIL: installing grub to target devices stage-curthooks /builtin/ cmd-curthooks/ configuring- bootloader: FAIL: configuring target system bootloader stage-curthooks /builtin/ cmd-curthooks: FAIL: curtin command curthooks curtin/ commands/ main.py" , line 202, in main curtin/ commands/ curthooks. py", line 1884, in curthooks curthooks( cfg, target, state) curtin/ commands/ curthooks. py", line 1849, in builtin_curthooks curtin/ commands/ curthooks. py", line 809, in setup_grub grub(instdevs, target, uefi=uefi_bootable, grubcfg=grubcfg) curtin/ commands/ install_ grub.py" , line 376, in install_grub chroot. subp(cmd, env=env, capture=True) curtin/ util.py" , line 708, in subp curtin/ util.py" , line 275, in subp curtin/ util.py" , line 139, in _subp nError( stdout= out, stderr=err, util.ProcessExe cutionError: Unexpected error while running command. j3sjq8/ target' , '/usr/lib/ grub/grub- multi-install' ]
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.
Grub install cmds:
[['efibootmgr', '-v'], ['dpkg-
Running command ['mount', '--bind', '/dev', '/tmp/tmpp_
Running command ['mount', '--bind', '/proc', '/tmp/tmpp_
Running command ['mount', '--bind', '/run', '/tmp/tmpp_
Running command ['mount', '--bind', '/sys', '/tmp/tmpp_
Running command ['mount', '--bind', '/sys/firmware/
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_
Running command ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED subp(['udevadm', 'settle']): 0.021
Running command ['umount', '/tmp/tmpp_
Running command ['umount', '/tmp/tmpp_
Running command ['umount', '/tmp/tmpp_
Running command ['umount', '/tmp/tmpp_
Running command ['umount', '/tmp/tmpp_
finish: cmd-install/
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/curtin/
ret = args.func(args)
File "/curtin/
builtin_
File "/curtin/
setup_grub(cfg, target, osfamily=osfamily,
File "/curtin/
install_
File "/curtin/
in_
File "/curtin/
return subp(*args, **kwargs)
File "/curtin/
return _subp(*args, **kwargs)
File "/curtin/
raise ProcessExecutio
curtin.
Command: ['unshare', '--fork', '--pid', '--', 'chroot', '/tmp/tmpp_
Exit code: 1
Reason: -
Stdout: ''
Stderr: Installing grub to /boot/efi.
Installing for x86_64-efi platform.
Unexpected error while running command.