I have jail broken my iphone with black ra1n, version is 3.1.2, and whenever I'm asked to reboot my device, it obviously goes into restoring mode. I need help or any advise how to avoid this problem...thnxx
there is no way to avoid this, if you're on a new 3gs. What you have is a tethered jailbreak, that's the only jailbreak option available for the newer 3gs' and new bootrom associated with them.
You will have to run blackra1n again. (and everytime you power down or restart the device) Don't restore.