File sys repair or partition repair or both ?

Using TestDisk to repair the filesystem
Post Reply
Message
Author
loij
Posts: 2
Joined: 14 Oct 2017, 01:43

File sys repair or partition repair or both ?

#1 Post by loij » 14 Oct 2017, 03:31

Hi , I'm at a point where I'm not sure what the next right thing to do is.
I googled this line from my output

- The harddisk (500 GB / 465 GiB) seems too small! (< 2372 GB / 2209 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...


and was reading up on the issue ; that's what brought me here to your forum. So I was reading in your documentation and now I'm not sure what my next step should be . Without some help I have no idea how to repair the file system or do anything else with the partition but I'm doing a lot of searching etc.

I don't know if it's necessary but I'm attaching images of Gparted also so you can know my present configuration. I'm working out of dev/sdb and Linux Mint 18.1 serena thru my CLI with TestDisk.

I don't know if I should try to repair the file system or "continue " with test disk or, try to recover the partition first .
I don't think I should do anything without some guidance , I might just make things worse.

I am only interested in recovering the files from the linux partitions and repairing and repartitioning the drive to reinstall another linux distro in the future. I would like to remove all remnants of the Fat 16 and the NTFS partition from the drives and the computer. Hope I'm not complicating this too much .

Any help you could provide will be GREATLY appreciated ; thank you very much

I do understand that TestDisk is telling me that these 2 Linux partitions that I want to recover are unrecoverable . In that case I'm not sure , again, what's next in order to repair this partition . Move over to the Partition Recovery documentation and forum I guess.

https://imgur.com/a/bGnrw

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 3764
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: File sys repair or partition repair or both ?

#2 Post by cgrenier » 14 Oct 2017, 10:01

Please continue on next screen and post the whole testdisk.log file

loij
Posts: 2
Joined: 14 Oct 2017, 01:43

Re: File sys repair or partition repair or both ?

#3 Post by loij » 14 Oct 2017, 10:30

Fri Oct 13 16:26:33 2017
Command line: TestDisk

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 4.4.0-53-generic (#74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016) x86_64
Compiler: GCC 5.3
ext2fs lib: 1.42.13, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.0
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size 1953525168 sectors
/dev/sda: user_max 1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sda: dco 1953525168 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size 976773168 sectors
/dev/sdb: user_max 976773168 sectors
/dev/sdb: native_max 976773168 sectors
/dev/sdb: dco 976773168 sectors
/dev/sdc: LBA, HPA, LBA48, DCO support
/dev/sdc: size 976773168 sectors
/dev/sdc: user_max 976773168 sectors
/dev/sdc: native_max 976773168 sectors
/dev/sdc: dco 976773168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST1000LM014-1EJ164, S/N:W770D4DG, FW:SM28
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - ST9500325AS, S/N:S2W0TD5A, FW:0003SDM1
Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - ST3500418AS, S/N:9VMBX52X, FW:CC38

Partition table type default to Intel
Disk /dev/sdc - 500 GB / 465 GiB - ST3500418AS
Partition table type: Intel

Analyse Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:

Partition sector doesn't have the endmark 0xAA55
Inode is corrupt (70): Input/output error

search_part()
Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
NTFS at 0/32/33
filesystem size 976766976
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB

Results
* HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 976766976 linear /dev/sdc 2048" | dmsetup create test0
ntfs_device_testdisk_io_ioctl() unimplemented


dir_partition inode=5
* HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB
ntfs_readdir failed for cluster 5: Input/output error
Directory /
5 dr-xr-xr-x 0 0 0 24-Nov-2016 16:12 .
5 dr-xr-xr-x 0 0 0 24-Nov-2016 16:12 ..

interface_write()
1 * HPFS - NTFS 0 32 33 60801 15 14 976766976

search_part()
Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
NTFS at 0/32/33
filesystem size 976766976
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB

block_group_nr 5

recover_EXT2: "e2fsck -b 163840 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=5/1117, 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 36620800
recover_EXT2: part_size 292966400
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB

block_group_nr 7

recover_EXT2: "e2fsck -b 229376 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=7/1117, 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 36620800
recover_EXT2: part_size 292966400
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB

block_group_nr 9

recover_EXT2: "e2fsck -b 294912 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=9/1117, 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 36620800
recover_EXT2: part_size 292966400
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB

block_group_nr 25

recover_EXT2: "e2fsck -b 819200 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=25/1117, 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 36620800
recover_EXT2: part_size 292966400
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB

block_group_nr 27

recover_EXT2: "e2fsck -b 884736 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=27/1117, 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 36620800
recover_EXT2: part_size 292966400
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB
BAD_RS LBA=532107680 14135623
check_part_i386 failed for partition type 04
FAT16 <32M 33122 43 42 288386 72 6 4100817952
This partition ends after the disk limits. (start=532107680, size=4100817952, end=4632925631, disk end=976773168)

recover_EXT2: s_block_group_nr=0/2756, s_mnt_count=63/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 90331904
recover_EXT2: part_size 722655232
Linux 37571 134 4 82554 187 1 722655232
ext4 blocksize=4096 Large_file Sparse_SB Recover, 369 GB / 344 GiB
This partition ends after the disk limits. (start=603586560, size=722655232, end=1326241791, disk end=976773168)

recover_EXT2: s_block_group_nr=0/2756, s_mnt_count=63/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 90331904
recover_EXT2: part_size 722655232
Linux 37571 199 5 82554 252 2 722655232
ext4 blocksize=4096 Large_file Sparse_SB Recover, 369 GB / 344 GiB
This partition ends after the disk limits. (start=603590656, size=722655232, end=1326245887, disk end=976773168)

block_group_nr 2187

recover_EXT2: "e2fsck -b 71663616 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=2187/2890, 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 94726656
recover_EXT2: part_size 757813248
Linux 13130 37 28 60301 214 9 757813248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 388 GB / 361 GiB

block_group_nr 2187

recover_EXT2: "e2fsck -b 71663616 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=2187/2756, 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 90331904
recover_EXT2: part_size 722655232
Linux 15088 134 23 60071 187 20 722655232
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 369 GB / 344 GiB

block_group_nr 2401

recover_EXT2: "e2fsck -b 78675968 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=2401/2890, 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 94726656
recover_EXT2: part_size 757813248
Linux 13143 70 48 60314 247 29 757813248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 388 GB / 361 GiB

block_group_nr 2401

recover_EXT2: "e2fsck -b 78675968 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=2401/2756, 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 90331904
recover_EXT2: part_size 722655232
Linux 15088 134 23 60071 187 20 722655232
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 369 GB / 344 GiB

block_group_nr 2187

recover_EXT2: "e2fsck -b 71663616 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=2187/2384, 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 78125056
recover_EXT2: part_size 625000448
Linux 21154 64 31 60058 186 32 625000448
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 320 GB / 298 GiB
NTFS at 60799/254/63
filesystem size 976751937
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 1 1 60799 254 63 976751937
NTFS found using backup sector, blocksize=4096, 500 GB / 465 GiB
NTFS at 60799/254/63
filesystem size 976751937
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
NTFS: Can't read MFT
HPFS - NTFS 60799 254 63 121599 253 62 976751937
NTFS, blocksize=4096, 500 GB / 465 GiB
This partition ends after the disk limits. (start=976751999, size=976751937, end=1953503935, disk end=976773168)
NTFS at 60801/15/14
filesystem size 976766976
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS found using backup sector, blocksize=4096, 500 GB / 465 GiB
Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (500 GB / 465 GiB) seems too small! (< 2372 GB / 2209 GiB)
The following partitions can't be recovered:
FAT16 <32M 33122 43 42 288386 72 6 4100817952
Linux 37571 134 4 82554 187 1 722655232
ext4 blocksize=4096 Large_file Sparse_SB Recover, 369 GB / 344 GiB
Linux 37571 199 5 82554 252 2 722655232
ext4 blocksize=4096 Large_file Sparse_SB Recover, 369 GB / 344 GiB
HPFS - NTFS 60799 254 63 121599 253 62 976751937
NTFS, blocksize=4096, 500 GB / 465 GiB
get_geometry_from_list_part_aux head=255 nbr=2
get_geometry_from_list_part_aux head=8 nbr=2
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=32 nbr=2
get_geometry_from_list_part_aux head=64 nbr=2
get_geometry_from_list_part_aux head=128 nbr=2
get_geometry_from_list_part_aux head=240 nbr=2
get_geometry_from_list_part_aux head=255 nbr=2

Results
HPFS - NTFS 0 1 1 60799 254 63 976751937
NTFS found using backup sector, blocksize=4096, 500 GB / 465 GiB
Linux 0 32 33 18236 112 52 292966400
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 149 GB / 139 GiB
HPFS - NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB
Linux 13130 37 28 60301 214 9 757813248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 388 GB / 361 GiB
Linux 13143 70 48 60314 247 29 757813248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 388 GB / 361 GiB
Linux 15088 134 23 60071 187 20 722655232
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 369 GB / 344 GiB
Linux 21154 64 31 60058 186 32 625000448
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 320 GB / 298 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 976751937 linear /dev/sdc 63" | dmsetup create test0
echo "0 292966400 linear /dev/sdc 2048" | dmsetup create test1
echo "0 976766976 linear /dev/sdc 2048" | dmsetup create test2
echo "0 757813248 linear /dev/sdc 210935808" | dmsetup create test3
echo "0 757813248 linear /dev/sdc 211146752" | dmsetup create test4
echo "0 722655232 linear /dev/sdc 242397184" | dmsetup create test5
echo "0 625000448 linear /dev/sdc 339843072" | dmsetup create test6


dir_partition inode=2
Linux 21154 64 31 60058 186 32 625000448
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 320 GB / 298 GiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
Linux 15088 134 23 60071 187 20 722655232
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 369 GB / 344 GiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
Linux 13143 70 48 60314 247 29 757813248
ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 388 GB / 361 GiB
ext2fs_dir_iterate failed with error 1.
Directory /

interface_write()

No partition found or selected for recovery
simulate write!

write_mbr_i386: starting...
Store new MBR code
write_all_log_i386: starting...
No extended partition

Interface Advanced
New options :
Dump : No
Align partition: Yes
Expert mode : No
Partition table type default to Intel
Disk /dev/sdc - 500 GB / 465 GiB - ST3500418AS
Partition table type: None
Partition table type default to Intel
Disk /dev/sdc - 500 GB / 465 GiB - ST3500418AS
Partition table type: None

Interface Advanced
P Unknown 0 0 1 60801 80 63 976773168
Change partition type:
P Unknown 0 0 1 60801 80 63 976773168

Analyse Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
P Unknown 0 0 1 60801 80 63 976773168
Inode is corrupt (70): Input/output error

search_part()
Disk /dev/sdc - 500 GB / 465 GiB - CHS 60801 255 63
NTFS at 0/32/33
filesystem size 976766976
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=500104691712, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size 976766976
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 2
clusters_per_mft_record -10
clusters_per_index_record 1
NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB

Results
P NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 976766976 linear /dev/sdc 2048" | dmsetup create test0
ntfs_device_testdisk_io_ioctl() unimplemented


dir_partition inode=5
P NTFS 0 32 33 60801 15 14 976766976
NTFS, blocksize=4096, 500 GB / 465 GiB
ntfs_readdir failed for cluster 5: Input/output error
Directory /
5 dr-xr-xr-x 0 0 0 24-Nov-2016 16:12 .
5 dr-xr-xr-x 0 0 0 24-Nov-2016 16:12 ..

interface_write()
P NTFS 0 32 33 60801 15 14 976766976

Write isn't available because the partition table type "None" has been selected.
Partition table type (auto): Intel
Disk /dev/sda - 1000 GB / 931 GiB - ST1000LM014-1EJ164
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=255 sector=63
1 P Linux 0 32 33 60800 205 13 976762880
ext4 blocksize=4096 Large_file Sparse_SB, 500 GB / 465 GiB
2 * Linux 60800 205 14 121601 57 56 976758784
ext4 blocksize=4096 Large_file Sparse_SB, 500 GB / 465 GiB


dir_partition inode=2
1 P Linux 0 32 33 60800 205 13 976762880
ext4 blocksize=4096 Large_file Sparse_SB, 500 GB / 465 GiB
Directory /
2 drwxr-xr-x 0 0 4096 10-Oct-2017 20:34 .
2 drwxr-xr-x 0 0 4096 10-Oct-2017 20:34 ..
11 drwx------ 0 0 16384 10-Oct-2017 20:34 lost+found


dir_partition inode=2
2 * Linux 60800 205 14 121601 57 56 976758784
ext4 blocksize=4096 Large_file Sparse_SB, 500 GB / 465 GiB
Directory /
2 drwxr-xr-x 0 0 4096 10-Oct-2017 20:37 .
2 drwxr-xr-x 0 0 4096 10-Oct-2017 20:37 ..
11 drwx------ 0 0 16384 10-Oct-2017 20:37 lost+found

TestDisk exited normally


I did continue with TestDisk and explored the linux drives and was told that they are unrecoverable. If it is worth trying some other method from among the tools I will gladly attempt it with some help. I just need to know what to do from here in any case ; whether it be to try undeleting or just repairing and repartitioning . This is a good experience because I have another drive to work on after this .

thanks for your response

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest