When I try to boot the usb flash drive the text that appears is garbled.It works in legacy mode but not in UEFI.
How could I install Ubuntu in UEFI mode ?
This is how the bootscreen looks.
First, are you saying that this is what happens after you select the boot option in GRUB, or that GRUB itself looks this way?
That looks like a video firmware or driver bug to me. I have several suggestions, but none is a sure-fire solution: