Switch Debian from legacy to UEFI boot mode

I updated the Sea BIOS for my DELL Chromebook today, which only supports UEFI boot mode. I don't want to reinstall the system, I thought there must be a way I could convert the legacy mode to UEFI mode. Yes, I found it. this article and this answer helped me out.