Samsung external hdd

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
lcbbcl
Posts: 1
Joined: 11 Aug 2023, 10:46

Samsung external hdd

#1 Post by lcbbcl »

Hello,
I want to know if something can be done in my case. I read also others topics trying to understand better what i can do, but i do prefer to explain my problem here and maybe get a better answer.
So i have a samsung external hdd as backup connected to my pc, but also i had in mind to burn a .iso to one of my mem usb, witch is also samsung and because i didn't pay attention i used 3 times dd command(ofc 3 times because my usb was still not affected)
Launching testdisk i got this type of msg

Code: Select all

Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63

The harddisk (1000 GB / 931 GiB) seems too small! (< 1363 TB / 1240 TiB)
Check the harddisk size: HD jumper settings, BIOS detection...
Testdisk ask me if i want to set cylinders ..etc... i didn't work so i said well i will format again ext4 ..and no nothing is working. I don't need all the data from my hdd i am fine with less
Here i add few lines from my testdisk.log , also i can upload somewhere if it is needed.
Thank you.

Code: Select all

ext2fs lib: 1.47.0, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 6.3
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       976773168 sectors
/dev/sda: user_max   976773168 sectors
/dev/sda: native_max 976773168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop0 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop1 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop2 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop3 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop4 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop5 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop6 - 0 B - 0 sectors, sector size=512
Warning: can't get size for Disk /dev/loop7 - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - ST500LM021-1KJ152, S/N:W624T2RY, FW:0002LIM1
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - Samsung M3 Portable, FW:1306
Disk /dev/nvme0n1 - 500 GB / 465 GiB - CHS 476940 64 32, sector size=512

Partition table type (auto): EFI GPT
Disk /dev/sdb - 1000 GB / 931 GiB - Samsung M3 Portable
Partition table type: EFI GPT

Analyse Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953525167 (expected 1953525167)
hdr_lba_start=2048
hdr_lba_end=1953525134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
Current partition structure:
 1 P Linux filesys. data         2048 1953523711 1953521664

search_part()
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63

recover_EXT2: s_block_group_nr=0/7452, s_mnt_count=4/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 244190208
recover_EXT2: part_size 1953521664
Filesystem created: Mon Oct 31 10:55:07 2022
Last mount time:    Wed Aug  9 02:43:44 2023
     Linux filesys. data         2048 1953523711 1953521664
     ext4 blocksize=4096 Large_file Sparse_SB, 1000 GB / 931 GiB

Results
   P Linux filesys. data         2048 1953523711 1953521664
     ext4 blocksize=4096 Large_file Sparse_SB, 1000 GB / 931 GiB

Hint for advanced users: dmsetup may be used if you prefer to avoid rewriting the partition table for the moment:
echo "0 1953521664 linear /dev/sdb 2048" | dmsetup create test0

interface_write()
 1 P Linux filesys. data         2048 1953523711 1953521664

search_part()
Disk /dev/sdb - 1000 GB / 931 GiB - CHS 121601 255 63

recover_EXT2: s_block_group_nr=0/7452, s_mnt_count=4/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 244190208
recover_EXT2: part_size 1953521664
Filesystem created: Mon Oct 31 10:55:07 2022
Last mount time:    Wed Aug  9 02:43:44 2023
     Linux filesys. data         2048 1953523711 1953521664
     ext4 blocksize=4096 Large_file Sparse_SB, 1000 GB / 931 GiB

BSD offset 133121, nbr_part 8, CHS=(1627984,1,1) CRC Ok
BSD a: 4.2BSD fast filesystem, offset        16, size   1627968 0/0/17 -> 101/86/1
       0 0000 0000 00 00 00 00 00 00 00 00
     Unknown                   133121    1627982    1494862
       0 0000 0000 00 00 00 00 00 00 00 00
Partition not added.
     Solaris /home             133137    1761104    1627968
     UFS2 blocksize=4096, 833 MB / 794 MiB
     Solaris /home             133201    1761168    1627968
     UFS2 blocksize=4096, 833 MB / 794 MiB
     Solaris /home             133249    1761216    1627968
     UFS2 blocksize=4096, 833 MB / 794 MiB
     Solaris /home             133313    1761280    1627968
     UFS2 blocksize=4096, 833 MB / 794 MiB

block_group_nr 1

recover_EXT2: "e2fsck -b 32768 -B 4096 device" may be needed
recover_EXT2: s_block_group_nr=1/7452, s_mnt_count=0/4294967295, s_blocks_per_group=32768, s_inodes_per_group=8192

Locked