LinuxQuestions.org
Help answer threads with 0 replies.
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-29-2004, 04:37 AM   #1
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Rep: Reputation: 15
reiserfs partition lost, any way to recover?


Hello ALL.
So heres long story short.
My drive was partitioned this way:
1) ext2, primary, boot
2) reiserfs, primary
3) extended
4) swap, logical
5) fat32, logical
6) reiserfs, logical
7) swap, logical

I needed to delete partition 4(swap) and resize partition 5(fat32).
Ive booted with knoppix, deleted the 4th partition with qtparted. But i
left the second swap partition(7) used by knoppix when doing that. So
the drive was busy. Well the partition was deleted and a message window
popped out saying that because drive was busy reboot is needed or
smth(sorry, was kinda tired at that moment, dont recall exactly).
Well, after reboot the partition 4 was gone and so was free space.
Ive grabbed a bootable version of Partition Magic. It sayed that theres
something wrong with my logical partition, error #114(im googling right
now on it) and suggested to fix it and i pressed "YES" (yeah... i
know...). As a result the drive now looks this way:

1) ext2, primaty, boot
2) reiserfs, primary
3) extended
4) free space
5) fat32, logical
6) free space

Is there any way to recover lost partition 6? it was my slack install
together with my ~/ ...

Any help would be very much appreciated!

edit: fdisk /dev/hda gives:
Code:
The number of cylinders for this disk is set to 9964.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
omitting empty partition (5)

Last edited by kostian; 10-29-2004 at 04:40 AM.
 
Old 10-29-2004, 07:49 AM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
hi,

can you post the output of : " fdisk -l /dev/hda " ?
i think you can repair the hda6 by using " reiserfsck --rebuild-sb " and " reiserfsck --rebuild-tree "
see " man reiserfsck " to read all details on this.

egag
 
Old 10-29-2004, 08:22 AM   #3
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Original Poster
Rep: Reputation: 15
hi egag, thank you for reply.
i could use reiserfsck but theres just no /dev/hda6(ex reiser) and /dev/hda7(ex swap) anymore. its just free space.
output of fdisk -l:

Code:
omitting empty partition (5)

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1           7       56196   83  Linux
/dev/hda2               8         346     2723017+  83  Linux
/dev/hda3             347        9964    77256585    f  W95 Ext'd (LBA)
/dev/hda5             383        8571    65778111    b  W95 FAT32
right now a am trying to use "testdisk" utility http://www.cgsecurity.org/testdisk.html but first i need to "recompile with progsreiserfs libs" it and lol I am having trouble here. Im on debian right now (my /dev/hda2), bean using it like since this morning and need some time to figure out its packaging system
 
Old 10-29-2004, 08:52 AM   #4
kostason
Member
 
Registered: Aug 2004
Location: Greece
Distribution: Fedora Core 2, DeLi Linux 0.6.1, Slackware 10.0
Posts: 105

Rep: Reputation: 15
hi
you may want to give a try to the following utility
TestDisk


NOTE: I never used TestDisk so use it on your own risk
 
Old 10-29-2004, 11:43 AM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
so, it was this way before :

Device Boot Start End Blocks Id System
/dev/hda1 * 1 7 56196 83 Linux
/dev/hda2 8 346 2723017+ 83 Linux
/dev/hda3 347 9964 77256585 f W95 Ext'd (LBA)
/dev/hda4 348 382 ------------ 82 linuxswap
/dev/hda5 383 8571 65778111 b W95 FAT32
/dev/hda6 8572 ? ------------- 83 ---
/dev/hda7 ? 9946 -----------------------------------------
(----------- = "etc.")

if you remember the value of " ? " you can make a linuxpartition there( with " fdisk "),
and use the rebuild-tools.

egag

Last edited by egag; 10-29-2004 at 11:44 AM.
 
Old 10-29-2004, 12:18 PM   #6
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Original Poster
Rep: Reputation: 15
You know, egag, ive just thought about it to.
Yes I know the size of my last partition(swap). so just need to create a new partition from the end of the disk of that size and a second one of whats left. I think i will go for it because i just dont see a way to recovere it with TestDisk.
testdisk.log :
Code:
Fri Oct 29 18:16:40 2004
TestDisk command line : /log /debug
TestDisk 5.3, Data Recovery Utility, May 2004
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Linux version
Failed to set locale, using default 'C'.
/dev/hda number of cylinders 16 !=  158816 (calculated)
file_read(4,1,buffer,160087535(158816/15/63)) seek err Invalid argument
Hard disk list
Disk /dev/hda - CHS 158816 16 63 - 78167 MB


Analyse Disk /dev/hda - CHS 158816 16 63 - 78167 MB
Geometry from MBR: head=255 sector=63
Current partitions:
 1 * Linux                    0   1  1   111   8 63     112392
Bad ending head
 2 P Linux                  111   9  1  5514   5 63    5446035
Bad ending head
 3 E extended LBA          5514   6  1 158801   3 63  154513170
Bad ending head

search_part()
Disk /dev/hda - CHS 158816 16 63 - 78167 MB

recover_EXT2: s_block_group_nr=0/5, s_mnt_count=18/28, s_blocks_per_group=8192
recover_EXT2: boot_sector=0, s_blocksize=1024
recover_EXT2: s_blocks_count 48160
recover_EXT2: part_size 96320
   D Linux                    0   1  1    95   9 56      96320
     EXT2 Sparse superblock 

ReiserFS Marker at 158/1/1

recover_rfs
block_count=680752
block_size=4096
   D Linux                  158   1  1  5560  13 44    5446016
     ReiserFS 2
get_geometry_from_list_part_aux head=255 nbr=1

Results
   * Linux                    0   1  1    95  15 63      96705
     EXT2 Sparse superblock 
   L Linux                  158   1  1  5560  15 63    5446161
     ReiserFS 2

   L Linux                  158   1  1  5560  15 63    5446161
     ReiserFS 2
Couldn't open reiser filesystem 
Couldn't open reiser filesystem

interface_write()
 1 * Linux                    0   1  1    95  15 63      96705
 2 E extended LBA           158   0  1  5560  15 63    5446224
 5 L Linux                  158   1  1  5560  15 63    5446161

search_part()
Disk /dev/hda - CHS 158816 16 63 - 78167 MB

recover_EXT2: s_block_group_nr=0/5, s_mnt_count=18/28, s_blocks_per_group=8192
recover_EXT2: boot_sector=0, s_blocksize=1024
recover_EXT2: s_blocks_count 48160
recover_EXT2: part_size 96320
   D Linux                    0   1  1    95   9 56      96320
     EXT2 Sparse superblock 

block_group_nr 3

recover_EXT2: e2fsck -b 24577 device may be needed
recover_EXT2: s_block_group_nr=3/5, s_mnt_count=0/28, s_blocks_per_group=8192
recover_EXT2: boot_sector=24577, s_blocksize=1024
recover_EXT2: s_blocks_count 48160
recover_EXT2: part_size 96320
   D Linux                    0   1  1    95   9 56      96320
     EXT2 Sparse superblock Backup superblock 

ReiserFS Marker at 120/1/1

recover_rfs
block_count=680752
block_size=4096
   D Linux                  120   1  1  5522  13 44    5446016
     ReiserFS 2

ReiserFS Marker at 158/1/1

recover_rfs
block_count=680752
block_size=4096
   D Linux                  158   1  1  5560  13 44    5446016
     ReiserFS 2

FAT32 at 6088/2/7
FAT32
FAT1 : 32-9426
FAT2 : 9427-18821
start_rootdir : 18822 root cluster : 2
Data : 18822-153934725
sectors : 153934830
cluster_size : 128
no_of_cluster : 1202468 (2 - 1202469)
fat_length 9395 calculated 9395
FAT differs, FAT sectors=0-8/9395
heads/cylinder 255 (FAT) != 16 (HD)
set_FAT_info: name from BS used
   D FAT32 LBA             6088   2  1 158801   3 63  153934830 [NO NAME]
     FAT found using backup sector!
get_geometry_from_list_part_aux head=255 nbr=2

Results
   * Linux                    0   1  1    95  15 63      96705
     EXT2 Sparse superblock 
   D Linux                  120   1  1  5522  15 63    5446161
     ReiserFS 2
   D Linux                  158   1  1  5560  15 63    5446161
     ReiserFS 2
   L FAT32 LBA             6088   2  1 158801  15 63  153935586 [NO NAME]
     FAT found using backup sector!

interface_write()
 1 * Linux                    0   1  1    95  15 63      96705
 2 E extended LBA          6088   1  1 158801  15 63  153935649
 5 L FAT32 LBA             6088   2  1 158801  15 63  153935586 [NO NAME]
simulate write!

write_mbr: starting...
write_all_log: starting...
write_all_log: CHS: 6088/1/1,lba=6136767

TestDisk exited normally.
 
Old 10-29-2004, 12:53 PM   #7
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Original Poster
Rep: Reputation: 15
WOOOHO!

It works! didnt even had to rebuild the tree and superblock. but still i will check for errors just to be sure.

Thank you wery much egag and thank you kostason
 
Old 10-29-2004, 04:31 PM   #8
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
well...i'm happy to hear you succeeded.

egag
 
  


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
rm -R, lost my files, any way to recover? mm.. :) brynjarh Linux - General 1 05-10-2005 06:39 AM
Data Lost! Is It Possible To Recover? rddreamz Linux - Newbie 3 11-17-2003 10:15 PM
Recover Data in Dead ReiserFS Filesystem Schultz Linux - Newbie 4 10-15-2003 04:18 PM
possible to recover corrupted reiserfs partition???? hollywoodb Linux - Newbie 1 10-10-2003 05:44 PM
Recover a lost partition!!!!! Caveman Linux - Newbie 4 09-26-2003 01:10 PM


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