It seems that the second command is no longer necessary in version 2.5: https://hyperledger-fabric.readthedocs.io/en/release-2.5/create_channel/create_channel_participation.html#generate-the-genesis-block
Therefore, the first command should be updated to this:
configtxgen -profile MyChannel -outputBlock ./fabric/crypto-config/ordererOrganizations/org0/orderer/mychannel.pb -channelID MyChannel
Being mychannel.pb the channel genesis block.