Yes, he definitely knows. Unicron made a deal with him for a new body and new troops, not a new personality. Why make a deal with someone just to erase their memory? Megatrons experience and knowlege was valuable to the cause so it would have been counter productive. Besides that, and the hint he gives Starscream, the line 'First Prime, then Ultra Magnus and now you' shows very clearly that he sees no distinction between the actions of Megatron and Galvatron. I think while he expects everyone knows he was Megatron he will never publicly admit it because doing so would mean accepting Megatrons defeat and failure at Autobot City as his own. He prefers to focus on his new sense of power and purpose.