Connect with a terminal program (like hyperterminal or putty)
connect with these settings:
8 bits
no parity
1 stop bit
9600 baud (the FortiGate-300 uses 115,000 baud)
Flow Control = None
log in as admin (perhaps with no password - perhaps with a password you set)
run this from the CLI:
exec factoryreset
ref: http://t-solve.blogspot.hk/2010/06/setting-fortigate-back-to-factory.html