1. Article 9 of the Labor Contract Law: When an employing unit recruits employees, it shall not detain the employee's resident identity card and other certificates, nor require the employee to provide a guarantee or collect property from the employee in other names.
So it's illegal for your boss to charge you a deposit in 511 yuan. Tell your boss clearly and ask him to return it to you, otherwise you will go to the local labor department to complain about him;
2. A private boss like this should never imagine that he will pay you two months' salary for nothing, so resign decisively! Article 37 of the Labor Contract Law: A laborer may terminate the labor contract by giving a written notice to the employer 31 days in advance. The employee may terminate the labor contract by notifying the employer three days in advance during the probation period.
Now it's the boss's renovation, which means that the conditions when your labor relations were established have changed, so you have the right to ask him to leave. If your boss refuses to approve your resignation and doesn't want to pay you two months' salary, you can sue him at the local labor department and defend your rights and interests by law. Good luck!