Originally Posted by nramirez
Hi guys.. Sorry to bother and I am sorry if I sound stupid with this question, I am very new in linux... I had a Centos machine with Freepbx installed. I wanted to format the system in order to install another version. The system was configured to use two partitions /dev/sda1 and /dev/sda2. I deleted both partitions using the fdisk and then reboot the system. I am now stuck at the grub command line and nothing seems to work. I read a couple of forum to rescue the system but was unable to do it. I tried to find all possible combinations for grub>root (hd0,1) but looks like there is nothing on the system. I tried the geometry and find grub conf commands and they displayed nothing. Thanks in advance!!!
If you want to install another version, there is no need to salvage your partitions. Just create new ones; this can be done automatically during the installation process.
If you need to recover the partitons, it's not entirely hopeless. The only thing that you destroyed on the disk is the partition tabled, a minuscule area in the first disk sector (sector = 512 bytes). The data itself is probably untouched. The challenge is creating a partition table identical to what you had before.
In case you know exactly what your partition table looked like, simply recreate it.
Otherwise, there are procedures and even tools for that task. While I can't advise you, search the internet for "find dos partition" or "fdisk recreate partition" or "parted recreate partition" etc. I found the description of a tool, http://findandmount.com
, but can't tell you if it works.
In the end, it depends on the value of your lost data how much you will invest to recover it.