Move bootloader or remove efi partition in second drive

Solution 1:

Facing the very same problem with Ubuntu 18.04, I followed PrakashS's answer while making sure the new EFI partition was mounted at /boot/efi before installing grub into it.

I first created a new fat32 partition with GParted on the Ubuntu disk, with the boot flag. (GParted automatically adds the esp flag when checking boot.)

The instructions below use sdb1 for the new EFI parition to match the device name in your question.

  1. Find the UUID of sdb1:
    sudo blkid | grep /dev/sdb1

  2. Change the UUID of the /boot/efi entry in /etc/fstab with that of sdb1:
    sudo nano /etc/fstab

  3. Unmount Windows EFI from and mount Ubuntu EFI to /boot/efi:
    sudo umount /boot/efi && sudo mount /boot/efi

  4. Confirm sdb1 is mounted at /boot/efi:
    lsblk | grep /boot/efi

  5. Install grub on sdb (without part number):
    sudo grub-install /dev/sdb

  6. Generate initramfs image:
    sudo update-initramfs -u -k all

  7. Generate grub2 config file:
    sudo update-grub

  8. Reboot.

  9. Confirm sdb1 is still mounted at /boot/efi:
    lsblk | grep /boot/efi

Solution 2:

Follow this procedure to move the boot loader:

  1. Find the UUID of /dev/sdb1 using sudo blkid (copy it)
  2. Change the UUID of boot/efi entry in /etc/fstab with that of sdb1
  3. sudo grub-install /dev/sdb
  4. sudo update-initramfs -u -k all
  5. sudo update-grub
  6. Reboot

Check with lsblk whether /dev/sdb1 be mounted in /boot/efi.