A couple questions regarding graduate studies
In addition to ensuring that you get high grades on your retake (as stated by scaaahu), I would recommend that you get involved with research projects early on and try to get publications out of them-this might compensate for any poor performances in your undergraduate studies. Since you've mentioned this is impossible in your country, perhaps you might want to try and do this abroad during your holidays. Also it might still be possible for you to attend conferences and submit abstracts or posters. It is not the end of the world if you've failed some courses in your first year. In some universities, the first year doesn't count towards your overall GPA. I would advise that you check this with your university.

Generally speaking, the higher the ranking of the university is, the better your career prospects. Of course, if you work with "important people" or highly respected research groups in your field, it might not matter so much.