This states that in your BIOS Settings, Secure Boot is enabled.
This can easily lead to an NVRAM is locked error.
Please disable Secure Boot in your BIOS / EFI Settings.
Run
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck --debug /dev/sdb1
Once complete, run
sudo update-grub