I have a dell inspiron 1545 laptop with a 500GB harddisk and 3GB RAM. There were two operating systems on it 1. windows 7 and Ubuntu 12. Due to the hartd disk space requirement I deleted the Ubuntu partition and two 500 MB partitions unknown to me. It was done when I was using windows operating system. I switched off the laptop and when i started it next day, it start showing a black screen after the dell logo screen with text as
error: no such partition
grub rescue>

also I tried to reinstall ubuntu from the DVD containing bootable ubuntu but the system not even detected the DVD in the CD-ROM DVD Drive. I don't want to loose my data from any partition, its very much important for me.
Also i tried following:
error: no such partition
grub rescue>ls
(hd0),(hd0,msdos5),(hd0,msdos4),(hd0,msdos3),(hd0,msdos1)

grub rescue>set root=(hd0,msdos5)/boot 
Enjoy!!!!!!!!!!!!!