Ran into a problem today on a clean install of the latest macOS, High Sierra. The glitch goes like this: format your drive (mine was a 3rd party SSD from Crucial) using the correct GUID Partition Scheme and APFS file system, and you won’t be able to install High Sierra, it just gets stuck in a loop.
Not only that but you can’t even reformat the drive from the GUI, even in target disk mode from another Mac. Run these terminal commands to format the drive, replacing disk0 with whatever the actual drive is (Hint: you can find out by running
diskutil unmountDisk /dev/disk0
diskutil eraseDisk JHFS+ Emptied /dev/disk0
After that, begin the High Sierra installation on the standard Journaled HFS+ file system. It will automatically reformat the Flash-based drive to the APFS file system and this time finish installation!