LinuxQuestions.org
Visit Jeremy's Blog.
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 07-24-2012, 11:13 PM   #1
travix
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Rep: Reputation: Disabled
I erased my partition and now get this error:


error: no such partition.
grub rescue>

I was running Windows7 and installed Ubuntu Desktop 12.04 LTS as a dual boot system. This is what I did...

First, I downloaded Ubuntu and the installer file to a thumb drive and installed it from the boot menu. Near the end of the process it asked me to set the partition size and I left it the way it was presented. When I restarted the session, it didn't seem to take. I couldn't access Ubuntu but through the thumb drive. So, I installed it again.

This time when it asked me to set the partition size the available space was smaller. So I concluded that it took the first install. Again, I left the setting for the partition alone. This time it worked when I restarted it and was using Ubuntu for a couple days, on a dual boot system.

Knowing that I installed it twice and there were two different partitions with the same OS, I went into Windows Disk Manager and deleted what I thought was the partition with the extra OS. When I restarted I got this message:

error: no such partition.
grub rescue>

Can I recover my old OS's? Or do I need to reinstall both? It won't accept the USB, it gives me the same message.
 
Old 07-24-2012, 11:23 PM   #2
austintx
Member
 
Registered: Jul 2012
Location: Austin, Texas
Distribution: Linux Mint 17 Cinnamon
Posts: 34

Rep: Reputation: 4
I am surprised that you didn't determine for certain which partition Ubuntu was on before you deleted one.
I would use the Disk Manager to delete the other ubuntu partition that you did not already delete, and then use all the unused space to create a bigger partition to install Ubuntu on.
 
Old 07-25-2012, 12:37 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,834

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Quote:
Originally Posted by travix View Post
Can I recover my old OS's? Or do I need to reinstall both? It won't accept the USB, it gives me the same message.
It should be pretty easy to recover everything (if Ubuntu is actually still there), but you have to get that USB (or CD or whatever) booting.
Go carefully through the BIOS options to see if you can get it to work, then post back.
 
Old 07-25-2012, 06:44 AM   #4
austintx
Member
 
Registered: Jul 2012
Location: Austin, Texas
Distribution: Linux Mint 17 Cinnamon
Posts: 34

Rep: Reputation: 4
syg00 is correct that the first step is to get it booting.
if grub rescue gave you the message "no such partition", is it possible that you installed grub to the partition that you deleted instead of installing grub to the MBR?
In that case, all you would have to do is reinstall grub.
When you say
Quote:
It won't accept the USB, it gives me the same message.
please make sure that you have it set to boot off the USB, not the hard drive.
 
Old 07-25-2012, 09:14 AM   #5
guyonearth
Member
 
Registered: Jun 2012
Location: USA
Distribution: Mint
Posts: 410

Rep: Reputation: 82
When you installed it the second time you should have replaced the first install. What you did is changed the partition count by deleting that partition (or you actually deleted the partition where grub was, hard to say), which is why you're getting the error, but I suspect it's the first case. You should be able to reinstal grub and get it working again.
 
Old 07-25-2012, 10:19 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
It's possible that the OP erased the first installation which means like guyonearth said partition count changed & also /etc/fstab. You can go thru grub rescue prompt get it booted & change the /etc/fstab, then update-grub.
http://karuppuswamy.com/wordpress/20...-cd-for-grub2/
 
Old 07-27-2012, 09:36 PM   #7
travix
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
EDDY1, the link that you posted seems to apply, although I'm not sure what my hard disk #'s were or my partition numbers. I think that Windows7 was on sda3 and sda4. When I type ls in response to the grub rescue> prompt, this what I get:

grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos4) (hd0,msdos2) (hd0,msdos1)

and that's all I get and that's all I can make it do. So I don't want to enter the wrong partition number and screw it up even more. Though, I am pretty sure Windows7 is on sda3 and sda4, and I could boot fully from either one.
 
Old 07-27-2012, 11:44 PM   #8
austintx
Member
 
Registered: Jul 2012
Location: Austin, Texas
Distribution: Linux Mint 17 Cinnamon
Posts: 34

Rep: Reputation: 4
You are getting the grub error because the partition you deleted was the default operating system, and that is where the grub config files were. Now it does not boot because it can't find the config files.
All you have to do is reinstall grub.
 
Old 07-28-2012, 07:43 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
"
Quote:
Originally Posted by travix View Post
EDDY1, the link that you posted seems to apply, although I'm not sure what my hard disk #'s were or my partition numbers. I think that Windows7 was on sda3 and sda4. When I type ls in response to the grub rescue> prompt, this what I get:

grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos4) (hd0,msdos2) (hd0,msdos1)

and that's all I get and that's all I can make it do. So I don't want to enter the wrong partition number and screw it up even more. Though, I am pretty sure Windows7 is on sda3 and sda4, and I could boot fully from either one.
You can get grub to list partitions using "ls"
http://www.gnu.org/software/grub/man...cue-shell.html
 
Old 08-01-2012, 10:37 AM   #10
travix
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
EDDY1,
As you can see from the quote you listed, I used ls to list the partitions. But how do I determine which of those partitions to use?
 
Old 08-01-2012, 04:16 PM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by travix View Post
EDDY1,
As you can see from the quote you listed, I used ls to list the partitions. But how do I determine which of those partitions to use?
Can you somehow give us the list of partitions even if you have to write it down manually?
 
Old 08-02-2012, 01:07 AM   #12
travix
LQ Newbie
 
Registered: Jul 2012
Posts: 11

Original Poster
Rep: Reputation: Disabled
So I'm guessing here but I think I must've deleted the partition containing grub or the mbr.
 
Old 08-02-2012, 11:45 AM   #13
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by travix View Post
So I'm guessing here but I think I must've deleted the partition containing grub or the mbr.
Not necessarily true, if you erase partitions within the logical/extended partitions that are before your linux installation then the partition #'s within the logical change, which affects your fstab.
If you boot the right partition then you can correct your fstab after boot.
 
Old 08-02-2012, 12:18 PM   #14
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Quote:
Originally Posted by travix View Post
So I'm guessing here but I think I must've deleted the partition containing grub or the mbr.
Did you already boot in your liveCD or USB and run fdisk -l on terminal? that will tell you what partition is controlling the booting of your OS.

you can identify the partition because it usually has a * next to it.

Good luck to you!
 
Old 08-03-2012, 12:28 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
ls
will list partitions at grub prompt
 
  


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
accidentally erased partition with gparted? rabbit2345 Linux - Software 1 01-28-2012 02:47 PM
Help! Accidentally erased the partition table on one of my Hard Disks xnomad Linux - Software 2 09-28-2010 01:53 AM
Oops! Erased mbr, no more partition table. Any way to reconstruct? kinematic Linux - General 14 08-16-2010 06:17 PM
logical drives in extended partition got erased after installation arunp Solaris / OpenSolaris 7 01-15-2009 10:16 AM
Partition erased -> Grub f****d up :( marty25 Linux - Newbie 2 05-19-2004 06:18 PM


All times are GMT -5. The time now is 06:40 AM.

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