Oh I did the same hard way. Especially without windows. Here is the workflow (the only one). Adb and fastboot tools needed.
- Get your stockfirmware with xperifirm.
- Extract all.
- Search newflasher from xda.
- Put newflasher script in the firmware folder.
- Start the script with plugged phone in flashmode (not fastboot).
- Now you are back to stock rom.
From here you are free to flash any custom roms. It is the only way, because without reverting to stock a custom rom would be a mess.
here is the link to newflasher. Check all the questions in the flashing progress carefully.