LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-30-2007, 11:49 PM   #61
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116

Quote:
Originally Posted by Neo-Leper
Before I go to far here is the output of mke2fs -n

sudo mke2fs -n /dev/sda1
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
16285696 inodes, 32561739 blocks
1628086 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
994 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
So try the superblock that is stored at 32768 and see what happens.
 
Old 07-30-2007, 11:51 PM   #62
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Ok Doing that now. Whether it works or not thank you for taking the time to walk me through this.
 
Old 07-30-2007, 11:54 PM   #63
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Ok nothing there, here is this

sudo sfdisk -l /dev/sda

Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 16214 16215- 130246956 83 Linux
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty


Should I try other ones?
 
Old 07-30-2007, 11:55 PM   #64
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Neo-Leper
They where installed at different times though. BSD and the two Linux after that were never on the HD at the same time.
In that case you want sda2 to look like this:

P FreeBSD 16215 0 1 19456 254 63

Where I have removed the size number because I don't know.

Alternatively, if that partition isn't important, just use fdisk to make a brand new sda2 after recovering sda1.
 
Old 07-30-2007, 11:56 PM   #65
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jiml8
In that case you want sda2 to look like this:

P FreeBSD 16215 0 1 19456 254 63

Where I have removed the size number because I don't know.

Alternatively, if that partition isn't important, just use fdisk to make a brand new sda2 after recovering sda1.

No, partition sda2 is not important at all.
 
Old 07-30-2007, 11:57 PM   #66
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Neo-Leper
Ok nothing there, here is this
What do you mean "nothing there"? What command - exactly - did you use, and what is the result now?

You ARE mounting the drive to look at it, right?
 
Old 07-30-2007, 11:57 PM   #67
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jiml8
What do you mean "nothing there"? What command - exactly - did you use, and what is the result now?

You ARE mounting the drive to look at it, right?
lol, yes. I should have said the only thing there is the lost and found folder. Sudo mount /dev/sda1 /media/disk
 
Old 07-31-2007, 12:00 AM   #68
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
What was the EXACT e2fsck command you used???
 
Old 07-31-2007, 12:02 AM   #69
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
sudo e2fsck -f -b 32768 /dev/sda1


I just cut and pasted what you mentioned and then added the numbers
 
Old 07-31-2007, 12:05 AM   #70
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Actually, the partition IS recovered. What is not recovered at this point is the directory structure, and you say you already recovered the files. If the alternate superblocks are also clear, then the directory structure on the partition is gone. I don't know of any tools that will rebuild the directory structure by scanning the disk; I don't think this can be done.

If forcing e2fsck to run with an alternate superblock isn't working, then you'll just have to be satisfied with the recovery you already have.
 
Old 07-31-2007, 12:06 AM   #71
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Neo-Leper
sudo e2fsck -f -b 32768 /dev/sda1


I just cut and pasted what you mentioned and then added the numbers
Ok. You might as well try the other superblocks, but it doesn't look promising.
 
Old 07-31-2007, 12:10 AM   #72
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jiml8
Actually, the partition IS recovered. What is not recovered at this point is the directory structure, and you say you already recovered the files. If the alternate superblocks are also clear, then the directory structure on the partition is gone. I don't know of any tools that will rebuild the directory structure by scanning the disk; I don't think this can be done.

If forcing e2fsck to run with an alternate superblock isn't working, then you'll just have to be satisfied with the recovery you already have.

I will give the other superblocks a try. This would have worked yesterday but chances are with the lack of knowledge on my part concerning this, between then and now, I more then likely just messed something up.

Thanks again for walking me through this. I know how hard it is to try and walk someone through something on a forum or a phone when they are new to it. As I said I am going to save this thread for future reference if this ever happens again. All my knowledge from computers comes from hands on experiences. Sometimes the learning process is more then a little painful, lol.


EDIT: To sum this up. If I ever accidentally do a mkswap on a partition, which I will NEVER do again, what you where walking me through would get it back?

Last edited by Neo-Leper; 07-31-2007 at 12:15 AM.
 
Old 07-31-2007, 12:30 AM   #73
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
I tried other superblocks, with the same result. I am going to consider what I could save a small victory. But....

What I am going to do now is learn EVERYTHING about partitions, file systems, etc. I am not going to let this happen again. So can anyone recommend some good links for me to start at?
 
  


Reply



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
Recover lost data under Solaris10 intel (Urgent) dsids Solaris / OpenSolaris 4 07-06-2007 07:08 AM
urgent! how to recover files from os x? stairwayoflight Other *NIX 12 06-10-2007 06:55 PM
recover a missing partition pankaj99 Linux - General 5 06-03-2006 07:09 PM
Recover Partition??? HELP!!!! villusion Linux - Hardware 7 10-11-2005 04:34 PM
Recover a lost partition!!!!! Caveman Linux - Newbie 4 09-26-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:20 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
Open Source Consulting | Domain Registration