Restore an operating system

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
tarqalqrnas
Posts: 5
Joined: 20 Mar 2022, 08:16

Restore an operating system

#1 Post by tarqalqrnas »

Hi
Do the tools allow you to restore a partition that includes a boot system?
recuperation
Posts: 3027
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Restore an operating system

#2 Post by recuperation »

No. You can only restore something that you have stored before like a backup.

"The tools" allow to recover files and repair certain defined errors. This errors can be located on a boot partition or the partition where your operating system(s) reside as well.
Depending on the type of error "the tools" might reenable bootability.
jack6800
Posts: 8
Joined: 03 May 2020, 16:34

Re: Restore an operating system

#3 Post by jack6800 »

Yes, most partition recovery tools do allow you to restore a partition that includes a boot system, but it's crucial to use them carefully to avoid overwriting the boot sector.
tarqalqrnas
Posts: 5
Joined: 20 Mar 2022, 08:16

Re: Restore an operating system

#4 Post by tarqalqrnas »

but it's crucial to use them carefully to avoid overwriting the boot sector.
What should care mean here as I didn't overwrite the target section with that in mind?
tarqalqrnas
Posts: 5
Joined: 20 Mar 2022, 08:16

Re: Restore an operating system

#5 Post by tarqalqrnas »

recuperation wrote: 02 Aug 2024, 08:49 No. You can only restore something that you have stored before like a backup.

"The tools" allow to recover files and repair certain defined errors. This errors can be located on a boot partition or the partition where your operating system(s) reside as well.
Depending on the type of error "the tools" might reenable bootability.
In terms of logic, restoring the partition should mean restoring all file types without limitation, including all boot files and the system partition. If the boot loader configuration can be repaired, the boot may succeed. Are you sure?

https://www.cgsecurity.org/testdisk_doc/bootable.html
recuperation
Posts: 3027
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Restore an operating system

#6 Post by recuperation »

tarqalqrnas wrote: 11 Aug 2024, 09:25
recuperation wrote: 02 Aug 2024, 08:49 No. You can only restore something that you have stored before like a backup.

"The tools" allow to recover files and repair certain defined errors. This errors can be located on a boot partition or the partition where your operating system(s) reside as well.
Depending on the type of error "the tools" might reenable bootability.
In terms of logic, restoring the partition should mean restoring all file types without limitation, including all boot files and the system partition. If the boot loader configuration can be repaired, the boot may succeed. Are you sure?

https://www.cgsecurity.org/testdisk_doc/bootable.html
Please be as specific as possible to exclude misunderstandings. I assume that your expression "the tools" is referring to the TestDisk package that includes TestDisk and Photorec.
In terms of logic, restoring the partition should mean restoring all file types without limitation, including all boot files and the system partition.
You are obviously describing a backup software. The Testdisk package is not a backup software.
tarqalqrnas
Posts: 5
Joined: 20 Mar 2022, 08:16

Re: Restore an operating system

#7 Post by tarqalqrnas »

Please be as specific as possible to exclude misunderstandings. I assume that your expression "the tools" is referring to the TestDisk package that includes TestDisk and Photorec.
Yes, by tools I mean the TestDisk package I don't know why you interpret tools as irrelevant in context. Why do you insist that I talk about backup? I didn't mention it. I would like to know why you thought I was talking about that. Why did you misunderstand me?
You are obviously describing a backup software. The Testdisk package is not a backup software.
I do not describe the backup nor did I touch upon it
recuperation
Posts: 3027
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Restore an operating system

#8 Post by recuperation »

tarqalqrnas wrote: 11 Aug 2024, 12:40
Please be as specific as possible to exclude misunderstandings. I assume that your expression "the tools" is referring to the TestDisk package that includes TestDisk and Photorec.
Yes, by tools I mean the TestDisk package I don't know why you interpret tools as irrelevant in context. Why do you insist that I talk about backup? I didn't mention it. I would like to know why you thought I was talking about that. Why did you misunderstand me?
You are using the word "restore" in the context of data recovery. "Restore" is an operation where you expect a successful outcome. The words "backup" and "restore" belong together. TestDisk can "repair" certain things, other recovery programs do not modify the defective device and recover its content to an unpredictable degree.

Imagine you have Windows 7 running booting in non-UEFI Mode using the CSM function of your BIOS.
You have one HDD in your desktop computer containing only one NTFS partition. This partition contains the boot loader, the operating system and some folder with your private data.
Now you want to create an USB Pen drive by writing an image on it. By error you choose your HDD and it gets partly overwritten most likely including your MFT (master file table).

You are left with the remains of a file system. You might be able to rescue some of your private files if they are not fragmented, but their extraction do not fit the term "restore". "Restoring" is a process where the outcome is as predictable as copying files from one to another location. The outcome of a file carver like PhotoRec is not predictable.

Furthermore, you might be able to repair the master boot record and the partition table but all the files of your operating system residing on your C:-partition that are not your private files cannot be made usable again. You lost the folder hierarchy and the names.
Your C:-partition is both your boot and system partition

Even the best commercial recovery program cannot repair this mess.
You are left with either restoring your system from a backup you made before or reinstalling your operating system.
Locked