LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-12-2012, 04:12 PM   #16
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600

Well done!
I would just loop mount the partition and see if you can read it:
Code:
# Just to be safe:
chmod 0440 /path/to/p1
# Link the rescued partition to a loop device:
losetup /dev/loop3 /path/to/p1
# Create a temporary mount point:
mkdir /mnt/temp
# See if the mount works (probably not):
mount /dev/loop3 0t ext4 /mnt/temp -o ro,norecovery,noload
if that doesn't work (and not due to not recognizing "norecovery,noload") see if you can get the location of an alternative superblock (man 'fsck' wrt mke2fs; 'man mke2fs') and run fsck.ext4 on it with "-f -v -n" (but never with "-a" or "-p"!). If you have testdisk you could try
Code:
testdisk /debug /log /dev/loop3
and see if you can "browse" the file system: ( Proceed > Choose partition table type ("none" because its a partition) > Advanced > Undelete). If that doesn't work look at "testdisk.log" for clues.
 
1 members found this post helpful.
Old 11-12-2012, 04:53 PM   #17
ununun
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Code:
mount /dev/loop3 0t ext4 /mnt/temp -o ro,norecovery,noload
fails with usual bad superblock | wrong fs type .
Quote:
If you have testdisk you could try
Code:
testdisk /debug /log /dev/loop3
and see if you can "browse" the file system: ( Proceed > Choose partition table type ("none" because its a partition) > Advanced > Undelete). If that doesn't work look at "testdisk.log" for clues.
after Advanced i dont get Undelete option but it does give my partition.it does gives alternate locations of the superblock.
there also a list option. and it works.
testdisk.log
Code:
Using locale 'C'.


Tue Nov 13 09:32:09 2012
Command line: TestDisk /debug /log p1

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.4.5-1-ARCH (#1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012) x86_64
Compiler: GCC 4.7
Compilation date: 2012-11-05T15:00:38
ext2fs lib: 1.42.4, ntfs lib: libntfs-3g, reiserfs lib: 0.3.0.5, ewf lib: none
Hard disk list
Disk p1 - 943 GB / 878 GiB - CHS 114734 255 63, sector size=512

Partition table type (auto): None
Disk p1 - 943 GB / 878 GiB
Partition table type: None

Interface Advanced
recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
   P ext4                     0   0  1 114733 227 54 1843200000 [wd]
     EXT4 Large file Sparse superblock Backup superblock, 943 GB / 878 GiB

Interface Advanced
recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
   P ext4                     0   0  1 114733 227 54 1843200000 [wd]
     EXT4 Large file Sparse superblock Backup superblock, 943 GB / 878 GiB
search_superblock

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 262144 (block=32768, blocksize=4096)

block_group_nr 3

recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=3/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 262144 (block=32768, blocksize=4096)

block_group_nr 3

recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=3/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 786432 (block=98304, blocksize=4096)

block_group_nr 5

recover_EXT2: "e2fsck -b 163840 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=5/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 1310720 (block=163840, blocksize=4096)

block_group_nr 7

recover_EXT2: "e2fsck -b 229376 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=7/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 1835008 (block=229376, blocksize=4096)

block_group_nr 9

recover_EXT2: "e2fsck -b 294912 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=9/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 2359296 (block=294912, blocksize=4096)

block_group_nr 25

recover_EXT2: "e2fsck -b 819200 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=25/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 6553600 (block=819200, blocksize=4096)

block_group_nr 27

recover_EXT2: "e2fsck -b 884736 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=27/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 7077888 (block=884736, blocksize=4096)

block_group_nr 49

recover_EXT2: "e2fsck -b 1605632 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=49/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 12845056 (block=1605632, blocksize=4096)

block_group_nr 81

recover_EXT2: "e2fsck -b 2654208 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=81/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 21233664 (block=2654208, blocksize=4096)

block_group_nr 125

recover_EXT2: "e2fsck -b 4096000 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=125/7031, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 230399999
recover_EXT2: part_size 1843199992
Ext2 superblock found at sector 32768000 (block=4096000, blocksize=4096)
  ext4                     0   0  1 114733 227 46 1843199992 [wd]
superblock 32768, blocksize=4096 [wd]
superblock 98304, blocksize=4096 [wd]
superblock 163840, blocksize=4096 [wd]
superblock 229376, blocksize=4096 [wd]
superblock 294912, blocksize=4096 [wd]
superblock 819200, blocksize=4096 [wd]
superblock 884736, blocksize=4096 [wd]
superblock 1605632, blocksize=4096 [wd]
superblock 2654208, blocksize=4096 [wd]
superblock 4096000, blocksize=4096 [wd]

To repair the filesystem using alternate superblock, run
fsck.ext4 -p -b superblock -B blocksize device


SIGINT detected! TestDisk has been killed.
Quote:
if that doesn't work (and not due to not recognizing "norecovery,noload") see if you can get the location of an alternative superblock (man 'fsck' wrt mke2fs; 'man mke2fs') and run fsck.ext4 on it with "-f -v -n" (but never with "-a" or "-p"!).
i am bit confused here.

should i run mke2fs or e2fsck (fsck.ext4 does not have all these options) ? or both if yes in what order ?

anyway i did run e2fsk. it just keep outputing lots of dash seprated numbers .

Last edited by ununun; 11-12-2012 at 05:24 PM.
 
Old 11-12-2012, 05:32 PM   #18
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ununun View Post
i am bit confused here.
should i run mke2fs or e2fsck (fsck.ext4 does not have all these options) ? or both if yes in what order ?
My reply was in this order:
- try loop mounting, or else
- find an alternative superblock (using 'mke2fs -n') and
- run fsck "-v -t -n", or else
- run testdisk.


Quote:
Originally Posted by ununun View Post
anyway i did run e2fsk. it just keep outputing lots of dash seprated numbers .
Did you mount the partiton read-only? What was the fsck command line you used? Did you run fsck with the arguments that testdisk.log suggested?
 
Old 11-12-2012, 06:03 PM   #19
ununun
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Did you run fsck with the arguments that testdisk.log suggested?
yes done now. i got it all back, everything. thanks unSpawn

for the hd, i will run wd's lifeguard diagnostic tool, try to repair it.

thanks again
 
Old 11-12-2012, 06:32 PM   #20
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ununun View Post
yes done now. i got it all back, everything.
Well done. Please mark this thread "solved".
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I need help converting a vfat extended partition into a ext4 partition zorro70 Linux - General 6 02-15-2011 08:55 PM
[SOLVED] Space missing from ext4 filesystem Ubuntu 10.10 Intiakel Linux - Software 2 12-26-2010 11:19 PM
missing bootup messages after conversion to ext4 Andy Alt Slackware 1 07-04-2009 08:44 PM
Ext4 partition corrupted by resized NTFS Vista C:\ partition? graviton-boson Linux - Newbie 2 03-16-2009 01:26 PM
Does linux really writes to vfat partition? dodgethis Linux - General 14 09-16-2004 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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