Late 2009 21.5" iMac only boots in safe mode. Thick (inch wide) vertical lines on screen
I have a 21.5 inch iMac from late 2009. 3.06ghz processor, 8gb ram, and an ATI Raedon HD 4670 with 256mb for graphics. It's running OS X 10.8.5
A few days ago the power was unplugged on accident, and I tried to turn it on again. The startup noise sounded but the normal white startup screen was covered almost entirely by strange glitchy lines which did no move. Eventually the lines disappeared and the screen only showed a white screen. This happens every time I try to start my computer unless I hold shift and boot in safe mode. Then it starts up and goes to the login screen, but all the time there are thick vertical lines (which don't move) on the screen. Also, around the mouse pointer is a box of the same thing the lines are made of. This box moves with the mouse pointer. Graphical movements like minimizing windows also seem to be choppy.
I can only start the computer in safe mode. I tried starting up holding the D key to do a hardware test and nothing happened, just the same white screen appeared after the "glitchy" white screen went away. I also tried to do an SMC reset but nothing happened.
Here are some pictures of what I see when I try to use it:
My warranty has expired. Since I must start the computer in safe mode, can I back it up?
I'm hoping its a software issue, but it seems like the problem may be the graphics card. Any ideas?
And any fix besides taking it to an apple store, the nearest of which is almost two hours away.
Thanks
Edit*
Another thing I forgot to mention is that for the past few months before this my iMac has been shutting down randomly overnight. When i turn it back on, it says something along the lines of "your computer restarted because of a problem." I don't know if this is related, just thought I'd mention it
iMac, OS X Mountain Lion (10.8.5), null