If I want to travel in mainland Greece and the islands, do I have to buy 2 passes?

Yes. The Eurail Greek Islands Pass is the only Pass that offers ferry trips in the Greek Islands. If you would like to also travel in mainland Greece or any other countries you should combine the Greek Islands Pass with an additional Pass that is valid for those countries.