# ReiserFS File Undelete HOWTO

### From CGSecurity

If you accidentally deleted some files from a ReiserFS partition, don't loose every hope, you may recover your data following this howto. In this example, the ReiserFS filesystem is mounted on /home directory and the ReiserFS device is /dev/hda1.

As root, unmount ReiserFS partition from where to recover deleted files

    umount /home

If you can't umount the partition (`umount: /home: device is busy`), try again in single user mode

    init 1

or boot from a Linux Live cdrom.

Backup the partition. It's highly recommanded to backup the current partition.

    dd if=/dev/hda1 of=reiserfs.dd bs=4096 conv=noerror

Undelete the files by scanning the whole partition

    reiserfsck --rebuild-tree --scan-whole-partition reiserfs.dd

Create the mount point

    mkdir /mnt/recovery

Mount the image on this directory

    mount -o loop reiserfs.dd /mnt/recovery

Some recovered files will be at their previous location but most recovered files will be in `/mnt/recovery/lost+found`. Now remount the original partition

    mount /home

and copy the recovered files to the original place.

For desesperates cases, you can also try PhotoRec.

Category: Data Recovery

##### Data Recovery

- TestDisk
- PhotoRec
- download