A little late perhaps (this is 2017), but for all who come subsequently, you can install Ubuntu 16.04 (LTS) from a usb stick on a 5k iMac if you boot it, edit the grub entry (press "e" key) when entry comes up, and add "nomodeset" as a boot parameter on the line containing "quiet splash". This will allow you to run Ubuntu and install it, but you won't have control over the resolution and window movement will be a bit slow and jerky. However, this can be fixed if you then install the AMDGPU-Pro driver (currently version 17.40) on your installation. Once you do this, you no longer need the nomodeset parameter to boot, you have control over the resolution, and window movement is smooth. However, even then you only get 4k, not 5k resolution on you iMac. Apparently 5k resolution is only possible through the Mac OS; even Windows won't give it to you. Incidentally, you can install Ubuntu 17.10 on a 5k iMac, but the AMD driver won't work with it, so better to stick with 16.04, at least until the next LTS is released. Alternatively, use Linux Mint 18.3, which for some reason doesn't require the installation of the AMDGPU-Pro driver to operate smoothly. Once it is installed, it just works, at least the Cinnamon version works for me on my Late 2015 27" iMac. I also found that the 4.8 kernel installed by Mint works great, but updating to the 4.10 kernel does not. Note that my experience is based on the Late 2015 model with the 2gb Radeon card (R9 M395).