After using TestDisk

From CGSecurity
(Redirected from AfterTestDisk)
Jump to navigation Jump to search

En.png English De.png Deutsch Es.png Español Fr.png Français It.png Italiano

After writing a new partition structure, you have to reboot for the change to take effect. Check the filesystems and repair them if necessary.

Writing the partition table

Mac OS X

Use pdisk to recreate the Mac partition map using the values given by TestDisk.

How to check and repair a filesystem


If the superblock of a reiserfs partition is missing, it can be rebuilt with reiserfsck --rebuild-sb device.

To repair a FAT/NTFS filesystem under Windows

To check an NTFS partition from Windows, run chkdsk /f c:

How to make the system bootable again

DOS - Win9x

If your OS doesn't boot, you can reinstall the system files with sys c:.

Windows 2000/XP/2003

If Windows doesn't boot, try fixmbr from the Windows Recovery Console and fixboot to repair NTFS boot sector.


You may have to update your /etc/fstab to reflect the new partition order.


You may have to update your multiboot configuration and reinstall the multiboot in the Master Boot Record.

  • Lilo: /etc/lilo.conf, lilo to re-install
  • Grub: /boot/grub/grub.conf, grub-install device
  • Windows (NT/2000/XP/2003/...): c:\boot.ini and run fixmbr from the Recovery Console (ie. fixmbr \Device\HardDisk0)

How to undelete files

FAT, NTFS, ext2

Use TestDisk and in the Advanced menu, choose Undelete.


Read the ReiserFS file undelete HOWTO


Try PhotoRec if you want to recover files and the system is too badly damaged to be repaired.

Return to TestDisk main page