LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-18-2015, 06:40 PM   #1
nramirez
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
Stuck at the GNU GRUB cmd, all partitions were deleted


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!!!
 
Old 10-19-2015, 11:43 AM   #2
albinard
Member
 
Registered: Jan 2011
Location: New Mexico
Distribution: Xubuntu Core
Posts: 183

Rep: Reputation: 58
I'm sorry to tell you that if you indeed deleted both partitions there is nothing for your bootloader to access (no UUIDs to identify start points).
 
1 members found this post helpful.
Old 10-19-2015, 07:19 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Just boot from a DVD/USB and install the next system you want to install - it will overwrite the old grub and allow you to re-allocate partition(s).
 
1 members found this post helpful.
Old 10-19-2015, 07:27 PM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by nramirez View Post
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.
 
1 members found this post helpful.
Old 10-19-2015, 11:25 PM   #5
nramirez
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi guys! Thanks for your support and advice. I really appreciate you took time to help me or at least to comment about it. I invested some time trying to recover the partition but was unable to do it so, I ended up creating a USB boot and installing the system again. Good thing about it was that it was a new install and did not invested much time in the configuration and I know for a fact that I need to be more careful in the future with this kind of stuff... Again thanks everyone for all your help and time. Lesson learned
 
Old 10-19-2015, 11:40 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
If this happens again (lost partitions) have a look at Testdisk - designed just for this.
Wasn't obvious (to me) this is what you wanted to do.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Deleted partition with deepin on it, now stuck in grub rescue please help. Cirrick Linux - Newbie 12 03-13-2015 05:13 PM
deleted partitions and stuck in gnu grub (only Linux as OS) Cheburgens Linux - Newbie 8 08-06-2008 12:46 PM
deleted the GRUB and linux partitions kinnth Linux - Newbie 5 09-14-2007 03:28 AM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 05:53 PM
Deleted partitions, stuck in grub Linux_n00b Linux - Newbie 1 11-30-2001 02:31 PM


All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration