From 395ff58103d0bfb373794e382c2d2d701841de47 Mon Sep 17 00:00:00 2001 From: robi Date: Mon, 27 Sep 2010 22:07:10 +0000 Subject: versions stuff for release 0.2.0-pv0 --- NEWS | 12 +++++++ README | 49 ++++++++++++++++++++------ configure | 94 ++++++++++++++++++++++++++++++++++++++++++++++++-- configure.in | 6 ++-- src/Makefile.in | 4 +-- src/magic_block_scan.c | 2 +- 6 files changed, 150 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 34a1733..b4e914c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,15 @@ +ext4magic 0.2.0 pv0 First test version of ext3 magic-scan-functions. This is a novel multi-stage recovery. + There are several recover methods used in succession. All functions use journal entries. + Furthermore, the library libmagic and coded file properties are implemented. + This automatic functions are specifically designed to recover deleted files immediate + after a recursiv delete command. + + For this purpose two new options are available. + "-M" if the entire file system is deleted + "-m" if only parts of the file system is deleted + + + ext4magic 0.1.4 Support for user-modifiable file attributes. ext4magic can now restore the ext2/3/4 File attributes. It is disabled by default. To activate, you must add the option --enable-file-attr diff --git a/README b/README index 3bfb725..9432047 100644 --- a/README +++ b/README @@ -1,17 +1,46 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !!!! Important Warning !!!! -If you see this note in the README, then you've probably downloaded an -unstable version of the source code via CVS. -There are many new features in development. These functions are not -activated and still do not work correctly. You'll also get problems -if you try to compile this source code. +Instructions to experimenting with new features, the magic functions. +--------------------------------------------------------------------- -Please use instead the source code of release 0.1.4 +Use no file system specially created for this purpose. +Why? + If you create a test file system, it is likely that all inode copies are included + in the Journal. The first stage can restore all files, and you'll never see the + magic functions in the third stage. -Thank you for your interest! The next release will include a lot of -new features. I work hard on it. -robi@users.berlios.de +Better is the following: + Use an existing ext3 filesystem. The last hours should no "find" or a backup tool + used global in this file system. That too would write to many inode copies. + umount this file system, and create a 1-to-1 copy of the file system. + Now mount the file system copy and delete all or many files. Then umount the file system copy. + + + +Now you can test ext4magic with the deleted copy. + You need free space for writing the recovered files. + Assuming, the copy is "/dev/sdb1" and you have enough free + space at "/home/test/" + + # ext4magic /dev/sdb1 -d /home/test/RECOVER -M + if you have deleted all files. + + or + # ext4magic /dev/sdb1 -d /home/test/RECOVER -m + if not all files were deleted. + + + It will automatically search for the time of the last deletion. + And with a little delay should start the recover. You can now only wait. Depending on the + number of deleted files can take a long time. Then you can compare the files with those + in the original file system. + + The functions are developed from scratch and can not be stable and reliable. + A few responses: working or not working, the last words before a crash, or what file types + are ok and which not, can help to improve the features and to develop the tool further. + + robi@users.berlios.de + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -------------------------------------------------------------------- diff --git a/configure b/configure index 73400e3..9d6b49a 100755 --- a/configure +++ b/configure @@ -11595,11 +11595,101 @@ test $fail = 1 && $as_echo "$as_me: error: You must install the develop packages \"ext2fs , blkid , e2p , uuid\" to build ext4magic" >&2;} { (exit 1); exit 1; }; } -if pkg-config --exists 'ext2fs < 1.41.9' ; then + +fail=0 +{ $as_echo "$as_me:$LINENO: checking for library containing ext2fs_test_inode_bitmap_range" >&5 +$as_echo_n "checking for library containing ext2fs_test_inode_bitmap_range... " >&6; } +if test "${ac_cv_search_ext2fs_test_inode_bitmap_range+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ext2fs_test_inode_bitmap_range (); +int +main () +{ +return ext2fs_test_inode_bitmap_range (); + ; + return 0; +} +_ACEOF +for ac_lib in '' ext2fs; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_ext2fs_test_inode_bitmap_range=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_ext2fs_test_inode_bitmap_range+set}" = set; then + break +fi +done +if test "${ac_cv_search_ext2fs_test_inode_bitmap_range+set}" = set; then + : +else + ac_cv_search_ext2fs_test_inode_bitmap_range=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_ext2fs_test_inode_bitmap_range" >&5 +$as_echo "$ac_cv_search_ext2fs_test_inode_bitmap_range" >&6; } +ac_res=$ac_cv_search_ext2fs_test_inode_bitmap_range +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + fail=1 +fi + +test $fail = 1 && { { $as_echo "$as_me:$LINENO: error: You must have ext2fs version >= 1.41.9 to build ext4magic" >&5 $as_echo "$as_me: error: You must have ext2fs version >= 1.41.9 to build ext4magic" >&2;} { (exit 1); exit 1; }; } -fi fail=0 { $as_echo "$as_me:$LINENO: checking for library containing magic_buffer" >&5 diff --git a/configure.in b/configure.in index 84d5571..dfd6c8a 100644 --- a/configure.in +++ b/configure.in @@ -15,9 +15,11 @@ AC_CHECK_HEADER([uuid/uuid.h],[],[fail=1]) test $fail = 1 && AC_MSG_ERROR([You must install the develop packages "ext2fs , blkid , e2p , uuid" to build ext4magic]) -if pkg-config --exists 'ext2fs < 1.41.9' ; then + +fail=0 +AC_SEARCH_LIBS([ext2fs_test_inode_bitmap_range], [ext2fs], [], [fail=1]) +test $fail = 1 && AC_MSG_ERROR([You must have ext2fs version >= 1.41.9 to build ext4magic]) -fi fail=0 AC_SEARCH_LIBS([magic_buffer], [magic], [], [fail=1]) diff --git a/src/Makefile.in b/src/Makefile.in index 3b4622c..8aef4e4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -245,9 +245,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/magic_block_scan.c b/src/magic_block_scan.c index 97f38e3..85bf75d 100644 --- a/src/magic_block_scan.c +++ b/src/magic_block_scan.c @@ -113,7 +113,7 @@ return new; static struct found_data_t* recover_file_data(char *des_dir, struct found_data_t* this, __u32 *follow){ - recover_file(des_dir,"MAGIC_3",this->name,(struct ext2_inode*)this->inode, 0 , 1); + recover_file(des_dir,"MAGIC-3",this->name,(struct ext2_inode*)this->inode, 0 , 1); free_file_data(this); *follow = 0; return NULL; -- cgit v1.2.3