I followed below steps that should worked all the time :
1. Connect the console cable to switch and Turn off the switch.
2. Press Mode button
3. On the prompt, enter the following command: flash_init
4. delete config.text and vlan.dat from flash
5. boot
after boot you should see :
Would you like to enter the initial configuration dialog? [yes/no]: