When I was installing El Capitan 10.11 using Clover USB flash boot, I got the “operation couldn’t be completed. Undefined Error: 0. Quit the installer to restart your computer and try again.
The reason is either the corrupted flash drive or missing all the hidden files in the InstallESD.dmg. I re-created the USB installer and copied all the hidden files to the root of the USB base and everything worked fine: BaseSystem.chunklist, BaseSystem.dmg, AppleDiagnostics.dmg, AppleDiagnostics.chunklist.