Sunroof Grinding noise, Won't Open

Just purchased used 2003 Type S for $2,500. There are 100,252 miles on odometer. I have 2 main problems. 1st. is Check Engine light on, because of “Slight Engine Miss”, 2nd. problem is, non-operating sunroof. When button pushed I hear what sounds like Gears grinding. Also water damage on passenger side sunshade. Material is completely gone. Headliner is loose at windshield. Headliner not billowing, needs replacing.
Any help and advice on Sunroof, I will be appreciative.:+1: