# extundelete on FreeBSD?



## tim-m89 (Oct 13, 2013)

I've suddenly lost a lot of files on an ext2fs. Not sure if accidentally deleted them. There is no port of extundelete and can't compile it from source because it requires the e2fsprogs libraries which are not ported and can't compile:


```
gmake[2]: Leaving directory `/usr/local/huge/tim/e2fsprogs-libs-1.42.8/lib/blkid'
making all in lib/quota
gmake[2]: Entering directory `/usr/local/huge/tim/e2fsprogs-libs-1.42.8/lib/quota'
gmake[2]: *** No rule to make target `../../lib/ext2fs/ext2_fs.h', needed by `mkquota.o'.  Stop.
gmake[2]: Leaving directory `/usr/local/huge/tim/e2fsprogs-libs-1.42.8/lib/quota'
gmake[1]: *** [all-libs-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/huge/tim/e2fsprogs-libs-1.42.8'
gmake: *** [all] Error 2
```


----------



## ShelLuser (Oct 13, 2013)

Can't you simply reboot the server using a Linux rescue or live CD? For example Knoppix or maybe a specific System rescue CD?

Those environments will provide native support for ext2 and may very well have undelete programs onboard.


----------



## tim-m89 (Oct 14, 2013)

The problem is all the live Linux distros I've tried can only mount UFS partitions ro. sysrescue and parted magic you think would have rw support but no. This program called testdisk I found on these Linux distros is good. It can see the files on my EXT3 partition no problem. I'm not sure if the freebsd FreeBSD ext driver is faulty or what but if I could UFS mounted rw and testdisk working on the same system my problem would be solved. testdisk on freebsd FreeBSD doesn't work since e2fsprogs only provides utilities not the libraries that it needs.


----------



## kpa (Oct 14, 2013)

So which one is the filesystem with the lost files, UFS or EXT2/3?


----------



## tingo (Oct 18, 2013)

Or simply make a copy of the filesystem in question with dd(1) to a file, bring that file to a machine with the tool(s) you want to use for rescue, and rescue away. It is never a good idea to write to a file system / disk when you are trying to rescue data from it. Save that for after you're finished rescuing data.


----------



## tim-m89 (Oct 19, 2013)

It turned out that all the files are still there not deleted but the FreeBSD driver seems to have an issue.  ext4fuse accessed them no problem.


----------

