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 01-22-2012, 12:22 PM   #1
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Rep: Reputation: Disabled
Exclamation GRUB error: No such partition Fedora 16


I tried to boot into Fedora 16 this morning and I got this error:

GRUB error: No such partition

I think I MAY have deleted a partition using fdisk to test hard drives yesterday. I could really use help on how to restore files, fix the feodra installation, any recovery tips, but I cannot format the hard drive before getting certain files off of the hard drive. I am typing this from a fedora 16 Live CD.

I run a computer store off this computer and need the help ASAP.
 
Old 01-22-2012, 12:51 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,699
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Hi,

Okay, let's see now. What can you mount? If anything, is it your data? If so, copy that to a safe place (a USB stick, an external hard drive, an FTP server internally, dunnow) and re-install.
That is ONE option, the other one is to re-instate the lost partition with Fdisk, as long as no formatting happened, I think you're fine. Just make sure all the setting are the same as before.

Of course: I'd welcome any second opinion before jumping to it, if I were you...

And...good luck

I'll be watchin' this threat from up close!

Thor

PS - there is a trick to keep me from messing up my harddrive: I play some music on the "main" system while I tinker on the other one...
 
Old 01-22-2012, 12:54 PM   #3
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Original Poster
Rep: Reputation: Disabled
Preferably I would like to recreate the lost partition but I have no idea of how to do that.

I can mount the hard drive but no files are popping up in the home directory, it's just blank. And it's not just showing a "160GB Hard drive" as it should, it's two "_Fedora-16-x86_6" one that I can mount and one that I cannot mount, and "16mb filesystem" which after I try to mount dissapears, and a "8.2 KB Filesystem" that I can mount and it has a file named "OSMIN" inside of it.

If you could, walk me through the process of creating the needed partition.

And thanks a lot for the quick response!

Last edited by Clarence-Adams; 01-22-2012 at 12:58 PM. Reason: Added details and organization of ideas.
 
Old 01-22-2012, 12:55 PM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Oooopps!
May I tell you that it is not good to accidentally delete partitions? - Ok, you already know that...
(Sorry, just had to.. )
Now to the actual problem:
fdisk is a very good tool, one thing that is extremely good with fdisk is that it doesn't do anything more than you tell it to.
This means that if you delete a partition fdisk only writes the change in the partition table - no
data on disk is touched!
So if you know how the disk was partitioned before your accidental delete, simply run fdisk again and recreate the original partitions. I have tried this several times, always worked like a charm every time.
BUT!
To be on the safe side first take a copy of the disk, then you can fiddle around with the copy not risking to destroy anything on physical disk.
There are several ways to copy a disk, I prefer "dd_rescue".
Boot from a live-CD, install dd_rescue (the package might be called "ddrescue") and run it:
# dd_rescue if=/dev/sda of=/someplace/mydiskimage.iso
 
1 members found this post helpful.
Old 01-22-2012, 01:10 PM   #5
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,699
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
If you could, walk me through the process of creating the needed partition.
Sure, but, please take pingu's advice at heart: take (if possible) a backup...okay, here goes:

open a console
enter fdisk -l to list what's on the box, typically, you'd see something like this

Quote:
Device Boot Start End Blocks Id System
/dev/sda1 * 63 208844 104391 83 Linux
/dev/sda2 208845 738989 265072+ 82 Linux swap / Solaris
/dev/sda3 738990 16113194 7687102+ 83 Linux
/dev/sda4 16113195 488392064 236139435 83 Linux
This one's on one of my boxes. See the /dev/sda1? Well, sda is the name of the whole disk, this one is chopped up in four pieces, you'll have one missing.

Okay, now issue this : fdisk /dev/sda - no number, just the name
Once in fdisk, let's see what there is to see, hit "p" and enter. See? That's what fdisk sees
Okay, well, I assume that the lost partition was a primary one, so here goes,
hit "n" - new partition
hit "p" - primary
enter a number (1-4)
then, fdisk should suggest the right start and stop block. Just check with what you noted after fdisk -l

Good luck

Thor
 
Old 01-22-2012, 01:19 PM   #6
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Original Poster
Rep: Reputation: Disabled
I used fdisk to view all of the partitions and I have ZERO partitions! I can't believe that I deleted ALL of the partitions! This sounds like a disaster...

I tried to make a .ISO of the hard drive using just dd and here's what happened:

# dd if=/dev/sda of=/home/liveuser/Documents

and then my computer crashed.
 
Old 01-22-2012, 01:45 PM   #7
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 54
Quote:
tried to make a .ISO of the hard drive using just dd and here's what happened:

# dd if=/dev/sda of=/home/liveuser/Documents

and then my computer crashed.
well, you've just tried to copy the whole hard disc, including unused space, deleted files, everything, on to something that is very much smaller. Don't know how big a live disc's ~/Documents is, or where it lives (RAM? swap?) but it obviously can't be big.
I'd suggest rebooting, then post the output of
Code:
fdisk -l
(little L, not one).
 
Old 01-22-2012, 01:51 PM   #8
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Original Poster
Rep: Reputation: Disabled
Here is the output of fdisk -l

"[root@localhost liveuser]# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

Disk /dev/mapper/live-rw: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/live-rw doesn't contain a valid partition table

Disk /dev/mapper/live-osimg-min: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/live-osimg-min doesn't contain a valid partition table
[root@localhost liveuser]# "
 
Old 01-22-2012, 01:57 PM   #9
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,699
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
maybe, just maybe??? This or that?

As far as titanic-size disaters go, you've got one right there

Last edited by ButterflyMelissa; 01-22-2012 at 01:59 PM.
 
Old 01-22-2012, 01:58 PM   #10
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Now what are you doing???
If you used fdisk before on that disk, then how can it suddenly have a GPT partition table?
How many disks do you have in this computer, are you sure you're messing with the right one?

Go back to the beginning.
Tell us what you know about the state of your disk before this started.
Exactly how many partitions did you have, primary / logical?
What did you do when you accidentally deleted a partition?
Did you use some other partitioning tool afterwards?

Please, let this take a little time and most important: don't do anything before you are sure it is the right thing to do! No trying out "just-in-case, maybe it works..."

Tell us,step by step, exactly what you had and what you did. Command by command, and pray be precise as to details!

Last edited by pingu; 01-22-2012 at 02:00 PM. Reason: Spelling
 
1 members found this post helpful.
Old 01-22-2012, 02:06 PM   #11
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
First thing to do, make a copy:
Get a usb hard drive same size or bigger than the faulty one.
Then boot from live-cd, mount the usb drive, install ddrescue and copy the entire disk to an image on the usb-drive.
It will take time - don't know how big the drive is but we're definitely talking several hours with modern disk sizes.
If you don't take a copy to work with, then every tried-but-failed-fix will render your disk even more ruined...
 
Old 01-22-2012, 02:19 PM   #12
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Original Poster
Rep: Reputation: Disabled
I really haven't altered the drive at all. I have tried to view my files on the drive, but I haven't tried to alter it in any way shape or form since it has been messing up. I'm going to make a copy of the drive following pingu's advice and then I will try Thor 2.0's advice and do the ubuntu Rescue me method. I will keep you all updated.

Once again, thank you all for helping me through this disaster.
 
Old 01-22-2012, 02:34 PM   #13
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
But you must have done something?
In your first post you said "I think I MAY have deleted a partition using fdisk" - so you did do something!
Anyway, you're doing the right thing now according to your latest post.
Just one thing: Thor_2.0:s disk layout contains only primary partitions. If you have logical volumes (and thus an extended partition) the numbering could be different. Logical volumes are always numbered from 5 and up and always in sequel whereas primary partitions don't have to be in sequel, so you could have like "sda1, sda3, sda5, sda6".

And a final tip on how to handle the copy:
1) To be able to try several things, take a copy of the copy - then if a fix doesn't work take a new copy of the copy etc.
This takes more time of course, but you only have to copy from real drive once which is very good!
2) You can mount the copy with
#mount -o loop /my-copy-of-disk.iso /mnt/mountpoint
3) If I remember correctly you should be able to use fdisk on the image itself. (Like #fdisk /my-copy-of-disk.iso )
 
Old 01-22-2012, 02:38 PM   #14
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,699
Blog Entries: 23

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Once again, thank you all for helping me through this disaster.
Hey, no sweat, this is what this site is for...but, you've got us glued to the screen , for sure! Take pingu's wise words as advice: proceed with caution.

Lookin' at ya!

Thor
 
Old 01-22-2012, 02:40 PM   #15
Clarence-Adams
Member
 
Registered: Nov 2011
Distribution: Archlinux
Posts: 31

Original Poster
Rep: Reputation: Disabled
"I think I MAY have deleted a partition using fdisk" was referring to what caused the problem, but after I messed the partitions up I haven't altered it. Sorry about the misleading information.
 
  


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
Grub Error 22 after deleting Fedora Partition on Vista Machine CSMajor2012 Fedora 4 03-21-2010 08:12 PM
Help deleting linux partition, GRUB ERROR, 'no such partition' TocketTmars Linux - Newbie 3 03-18-2010 09:46 AM
grub problem error 15 booting to another partition for fedora mehdiee Linux - Newbie 1 02-22-2008 02:11 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM
GRUB Section2 load error, partition error. Ryle Linux - General 1 06-27-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 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