The Need I was recently using multiple machines for work (Lab machines, friend’s laptop, etc) and I needed Linux. I own a 128GB MacBook Air I could’nt install Linux on it as storage was tiny. I did have a USB 3.0 flash drive which had speeds comparable to some(not-so-fast) harddrives. It struck me that if I install Linux on my flash drive it would make my life a hell lot easier. It was later that I realised it wasn’t so straight forward mainly because of EFI boot and Mac ‘quirks’. I did a lot of googling but could’nt find anything that worked. After reading multiple sources I deduced what was the problem.
Even if you're a Windows user, you've probably thought about trying the Mac OS X. Maybe you'd like to test OS X before buying a Mac or building a Hackintosh, or maybe you just want to run an app on your Windows machine which is only exclusive for the Mac OS X. Then install the Mac boot loader again on your disk. This will allow you to boot to Mac OS by default, but also select to boot into Windows 10. You can then modify the boot configuration to make Windows 10 default if you want. Or you can just boot into Windows 10 and use EasyBCD to add a boot entry for Mac OS.
Since I got it figured out I decided to write this post so that other people can benefit from it. The problem. Modern Macs boot using EFI and their bootloader expects boot partition to be HFS+ or APFS(High Sierra) not EXT4. Ubuntu installer is buggy and always installs bootloader in EFI partition of internal HDD despite being instructed to install it on EFI partition of flash drive.