Due to a problem during the installation (due, it seems, to the Ubuntu installer) in a Win 10/Ubuntu 18.04 multiboot system on separate drives, the bootloader was installed in the ESP partition of the Windows 10 drive. This is done by Ubuntu 18.04 so after boot the ESP partition of Windows 10 is mounted in /boot/efi.
The system still boots correctly but I would like to correct this situation by installing the bootloader in the ESP partition of the Ubuntu 18.04 drive by mounting the correct ESP partition in /boot/efi. In my case this is the to-do-list:
remove Ubuntu entry in UEFI:
sudo efibootmgr -b 0001 -B
remove Ubuntu folder in the ESP partition in the Windows 10 drive:
sudo rm -rv /boot/efi/EFI/ubuntu
sudo mount the Ubuntu drive ESP partition:
sudo mount -v /dev/sda1 /boot/efi
grub install:
sudo grub-install
sudo update-grub
Edit /etc/fstab file, inserting the correct Ubuntu drive ESP partition UUID
Reboot
To avoid making a mess, do I have to "unmount" that partition before proceeding to mount the new ESP partition in /boot/efi or does mounting the correct partition replace the current one?