Is it possible to convert external Ubuntu installation from CSM to EUFI?

I'm dual booting Windows 10 (on internal SSD) and Ubuntu 21.04 (on external SSD). Grub is only installed on external SSD, so when it's unplugged PC boots directly into Windows.

I switched from CSM to UEFI booting (this was required to enable SAM on my AMD GPU) and Ubuntu does not boot anymore. However, if I run Ubuntu live from USB stick, it tells me it's is already installed on my external SSD.

Is there a way to boot my external Ubuntu installation? I wouldn't want to reinstall because everything is set up the way I like it.


You can reinstall Grub2 using your Ubuntu live stick.

Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is usually a EXT4 Partition. Replace sda1 with the drive and partition number your installation is on, for example:

sudo mount -t ext4 /dev/sda1 /mnt

Now bind the directories that grub needs access to to detect other operating systems, like so.

sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys

Now we need to mount chroot:

sudo chroot /mnt

Now install, check, and update grub.

This time you only need to add the drive letter (usually a) to replace , for example:

grub-install /dev/sda grub-install –recheck /dev/sda update-grub

Now grub is back, all that is left is to exit the chrooted system and unmount everything.

exit && sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt

Shut down, take out the usb-stick and turn your computer back on, and you will be met with the default Grub2 screen.

If you want to put grub on your internal SSD ( where your Windows is installed ) you need to set it to your internal drive. Although I don't see the point in this ( without the external disk it cannot boot into Ubuntu. ( see gparted ). In my case nvme0n1. see pictureenter image description here

If you want to put grub on your external SSD use that drivename. In my case sda ( external usb-stick ). see pictureenter image description here

If you put grub2 on your external disk and want to boot from it you have to change your settings in your ( what many people still call ) BIOS to boot from usb first.

And Nixie has a video on youtube about this: enter link description here

This should get you booting into Ubuntu again.