testdisk finds the partitions but write is not available SOLVED Topic is solved

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
Message
Author
sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

testdisk finds the partitions but write is not available SOLVED

#1 Post by sdowney717 »

link to pics of what I see
https://photos.app.goo.gl/ivVDZtpQUrQUmBG68

I suppose I set to XFS5 and linuxswap2 as that is what is shown, but then it says

Write isn't available because the partition table type "None" has been selected.

But I hit 'T' and told it the types
What am I doing wrong?

https://photos.app.goo.gl/PNczPEHWN5nwqsSA8
Last edited by sdowney717 on 09 Mar 2024, 17:49, edited 1 time in total.

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#2 Post by sdowney717 »

These are deleted linux XFS partitions I deleted in windows 11 using it's built in partition manager.
I again started fresh with testdisk, and analyze, and the only option that makes sense is to select none as there is no detection of partition type at the beginning of the process for XFS
as it is unallocated space

There is an Intel PC selection, but no linux types available to select

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: testdisk finds the partitions but write is not available

#3 Post by recuperation »

Please upload your pictures to this site.

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#4 Post by sdowney717 »

OK. I got it working.
You have to choose a disk type first, so after I selected intel style, i was able to write the XFS partitions out on the disk.
It looks very much as it did, except it extended the last xfs partition to the end of the disk. used to be windows recovery partition there.
When I deleted the XFS partition in windows, I used diskpart to delete that recovery partition. Then couple days later, I was thinking I should look at those XFS partitions and see if there is anything worth keeping.

Thanks for the program it seems to have worked good.

I suppose linux partitions share something with 'Intel'?

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#5 Post by sdowney717 »

Also don't know how to post pictures directly here yet.

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#6 Post by sdowney717 »

The grub bootloader on this disk has not worked for couple years, so those linux xfs partitions were abandoned by me.
I figure I can boot up a live cd of ubuntu or Mint and look at what is there

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: testdisk finds the partitions but write is not available

#7 Post by recuperation »

Please post your TestDisk log file.
To upload pictures just click onto the attachments tab on the bottom of the page.

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#8 Post by sdowney717 »

recuperation wrote: 09 Mar 2024, 00:59 Please post your TestDisk log file.
To upload pictures just click onto the attachments tab on the bottom of the page.
Ok, here it is.
I am making a rufus mint bootable usb to look at xfs drives today

Fri Mar 8 16:00:35 2024
Command line: TestDisk

TestDisk 7.2, Data Recovery Utility, February 2024
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Windows 8 (9200)
Compiler: GCC 11.2, Cygwin32 3001.4
ext2fs lib: 1.45.3, ntfs lib: available, reiserfs lib: none, ewf lib: 20140608, curses lib: ncurses 6.1
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=500107862016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive1)=1000204886016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive2)=750156374016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive3)=1000204886016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=499233349632
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\D:)=52428800
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\E:)=1000202043392
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\F:)=499233349632
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\G:)=52428800
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\H:)=267056546304
filewin32_getfilesize(\\.\I:) GetFileSize err Incorrect function.

filewin32_setfilepointer(\\.\I:) SetFilePointer err Incorrect function.

Warning: can't get size for \\.\I:
Hard disk list
Disk \\.\PhysicalDrive0 - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WDC WDS500G2B0A-00SM50, S/N:2032C7803885, FW:415000WD
Disk \\.\PhysicalDrive1 - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - Hitachi HDS721010CLA332, S/N:JP9911HZ1X9YSU, FW:JP4OA3MA
Disk \\.\PhysicalDrive2 - 750 GB / 698 GiB - CHS 91201 255 63, sector size=512 - Hitachi HDS721075KLA330, S/N:GTE200P8G4DXKE, FW:GK8OA70M
Disk \\.\PhysicalDrive3 - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - SAMSUNG HD102UJ, S/N:S1ZUJ1LS307329, FW:1AA01113

Partition table type (auto): Intel
Disk \\.\PhysicalDrive2 - 750 GB / 698 GiB - Hitachi HDS721075KLA330
Partition table type: Intel

Analyse Disk \\.\PhysicalDrive2 - 750 GB / 698 GiB - CHS 91201 255 63
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/1/1
get_geometry_from_list_part_aux head=255 nbr=1
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=1
Current partition structure:
1 * HPFS - NTFS 0 1 1 32467 198 51 521594817 [windows 7 old]

search_part()
Disk \\.\PhysicalDrive2 - 750 GB / 698 GiB - CHS 91201 255 63
NTFS at 0/1/1
filesystem size 521594817
sectors_per_cluster 1
mft_lcn 3511688
mftmirr_lcn 28717484
clusters_per_mft_record 2
clusters_per_index_record 8
HPFS - NTFS 0 1 1 32467 198 51 521594817 [windows 7 old]
NTFS, blocksize=512, 267 GB / 248 GiB

XFS Marker at 32467/198/52

recover_xfs
Linux 32467 198 52 35507 53 2 48828416
XFS CRC enabled, blocksize=4096, 25 GB / 23 GiB
Linux Swap 35507 85 35 35993 140 35 7811056
SWAP2 version 1, pagesize=4096, 3999 MB / 3813 MiB

XFS Marker at 35993/173/21

recover_xfs
Linux 35993 173 21 91201 52 51 886908928
XFS CRC enabled, blocksize=4096, 454 GB / 422 GiB
get_geometry_from_list_part_aux head=255 nbr=1
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=1
get_geometry_from_list_part_aux head=255 nbr=1

Results
* HPFS - NTFS 0 1 1 32467 198 51 521594817 [windows 7 old]
NTFS, blocksize=512, 267 GB / 248 GiB
P Linux 32467 198 52 35507 53 2 48828416
XFS CRC enabled, blocksize=4096, 25 GB / 23 GiB
P Linux Swap 35507 85 35 35993 140 51 7811072
SWAP2 version 1, pagesize=4096, 3999 MB / 3814 MiB
L Linux 35993 173 21 91201 52 51 886908928
XFS CRC enabled, blocksize=4096, 454 GB / 422 GiB
add_ext_part_i386: max
add_ext_part_i386: max

interface_write()
1 * HPFS - NTFS 0 1 1 32467 198 51 521594817 [windows 7 old]
2 P Linux 32467 198 52 35507 53 2 48828416
3 P Linux Swap 35507 85 35 35993 140 51 7811072
4 E extended LBA 35993 140 52 91201 52 51 886910976
5 L Linux 35993 173 21 91201 52 51 886908928
write!

write_mbr_i386: starting...
write_all_log_i386: starting...
write_all_log_i386: CHS: 35993/140/52,lba=578236416
You will have to reboot for the change to take effect.

TestDisk exited normally.

sdowney717
Posts: 8
Joined: 08 Mar 2024, 16:41

Re: testdisk finds the partitions but write is not available

#9 Post by sdowney717 »

pleased to say testdisk did the job right. I booted a linux mint liveusb and all the files were there and usable.
Not that I found anything worth keeping. Everything there I already have somewhere else.
But, yes, it is a great program, thanks very much.

recuperation
Posts: 2737
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: testdisk finds the partitions but write is not available SOLVED

#10 Post by recuperation »

sdowney717 wrote: 08 Mar 2024, 16:50 But I hit 'T' and told it the types
What am I doing wrong?
I am still missing your pictures on this site!

If you put a dog mask on the head of a cat it still remains a cat.
Partitions are areas where file systems reside in. Putting differing file types into a partition table when the related partition itself is home to a different file system is useless and maybe harmful.
sdowney717 wrote: 08 Mar 2024, 17:33 There is an Intel PC selection, but no linux types available to select
Partition tables are organizing schemes for partitions. Those schemes are used and accepted beyond the horizon of Microsoft world, Linux world, Apple and others.
There is not linux specific organising scheme.
The most recent one, GPT, fits everybody's needs!
sdowney717 wrote: 08 Mar 2024, 23:15 Thanks for the program it seems to have worked good.

I suppose linux partitions share something with 'Intel'?
When dealing with "Intel" in the partition scheme framework the word "Intel" is used because Intel is probably somehow the creator or at the origin of the partition table scheme that starts in the MBR (master boot record).

Locked