Re: hard disk and sub flash disk issues
On 08/12/2022 20:38, Semih Ozlem wrote:
(i) I accidentally turned one of the partitions on the hard disk of the
machine I currently have to linux swap. That partition contained files
that I may need to review or use later. Is there a way to recove those
files and if so how
A chance is rather low.
1. swapoff for this partition (immediately)
2. change partition type to avoid automount it by e.g. live systems,
edit /etc/fstab.
3. create an image for this partition. It will allow to restore current
state after unsuccessful attempt to restore files.
4. install testdisk and run photorec as root. The tool is able to
restore some types of files if they are not fragmented. File names would
not be preserved, so high enough efforts may be required to sort
recovered files.
Unsure if e.g. backup of file system superblock will help to recover at
least a part of directory structures.
Check actual type of the partition (I am unsure concerning precise
action for "turned one of the partitions ... to linux swap")
file -s /dev/sdX
Reply to: