FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

Flashable Filesystem Check and Repair Tool

5,529 posts
Thanks Meter: 2,288
 
By Droidzone, Inactive Recognized Developer on 22nd September 2011, 12:12 AM
Post Reply Email Thread
22nd September 2011, 01:35 PM |#11  
Senior Member
Thanks Meter: 116
 
More
Quote:
Originally Posted by Droidzone

Weird indeed that the files in /tmp cant be accessed

nope, file can be accessed! with cat /tmp/e2fsck i see correct output

Quote:
Originally Posted by Droidzone

I'll add code to abort script if the binaries cant be found..it doesnt look good with the script saying everything's working..

+1 lol


did you try with 4EXT 2.1.3RC4 too?
 
 
22nd September 2011, 02:07 PM |#12  
limscap1's Avatar
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by Droidzone

You will have to do a manual e2fsck from the shell, since that usually means it is waiting for user intervention due to some errors. Though the automatic options I specified should correct minor issues, some seem to still need intervention

Sent from my HTC Desire using Tapatalk

Really appreciate for your kind explanation ^^;

Then, could somebody inform me how to to do a manual e2fsck from the shell or any links shows relative information? I've already questioned it at Q & A, but so far nobody has answered...
22nd September 2011, 02:10 PM |#13  
Droidzone's Avatar
OP Inactive Recognized Developer
Flag Kochi
Thanks Meter: 2,288
 
Donate to Me
More
Quote:
Originally Posted by limscap1

Really appreciate for your kind explanation ^^;

Then, could somebody inform me how to to do a manual e2fsck from the shell or any links shows relative information? I've already questioned it at Q & A, but so far nobody has answered...

It was there in Ultrakiller's quote.

Code:
e2fsck -afv /dev/block/mmcblk0p2
The command is found in /system/bin usually..My flasher also copies that file to /tmp. So:

Code:
chmod 755 /tmp/e2fsck
/tmp/e2fsck -afv /dev/block/mmcblk0p2
The Following User Says Thank You to Droidzone For This Useful Post: [ View ] Gift Droidzone Ad-Free
25th September 2011, 01:30 PM |#14  
Senior Member
Thanks Meter: 116
 
More
I would be linked in first post, for all that users who can't use the droidzone's script.

Reboot in Recovery, and connect adb shell.

EXT4 REPAIR/CHECK

Code:
e2fsck -afv /dev/block/mmcblk0p2
e2fsck will check and repair ext4 partition if needed.
an example:
Code:
e2fsck -afv /dev/block/mmcblk0p2

     730 inodes used (0.56%)
      25 non-contiguous files (3.4%)
       1 non-contiguous directory (0.1%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 720
  259347 blocks used (49.47%)
       0 bad blocks
       0 large files

     707 regular files
      14 directories
       0 character device files
       0 block device files
       0 fifos
       0 links
       0 symbolic links (0 fast symbolic links)
       0 sockets
--------
     721 files
FAT32 REPAIR/CHECK

mount usb partition on pc using recovery menu.
Once connected usb cable and opened cmd on pc type:

Code:
chkdsk /R f:\
in my case fat32 partition is f:
chkdsk can take a while (around 20min)
an example of output here (sorry, italian OS, anyway in my case no errors found)
Code:
Il file system è di tipo FAT32.
Numero di serie del volume: B996-8582
Verifica dei file e delle cartelle in corso...
Verifica dei file e delle cartelle completata.
Verifica dello spazio disponibile in corso...
Verifica dello spazio disponibile completata.
Verifica del file system effettuata.  Nessun problema rilevato.
   13.525.072 KB di spazio totale su disco.
        2.408 KB in 295 cartelle.
    6.963.592 KB in 1.891 file.
    6.559.064 KB disponibili.

        8.192 byte in ogni unità di allocazione.
    1.690.634 unità totali di allocazione su disco.
      819.883 unità di allocazione disponibili su disco.

If i helped someone please hit thanks button!
The Following 2 Users Say Thank You to Ultrakiller For This Useful Post: [ View ] Gift Ultrakiller Ad-Free
5th December 2011, 10:16 PM |#15  
blackhawk_LA's Avatar
Senior Member
Thanks Meter: 486
 
More
First of all, thanks Droidzone for your work

I have run the tool and had this
Quote:

e2fsck running
One or more errors were found in your ext4 partition
e2fsck has encountered technical errors and cannot continue. Script will ABORT
Sdcard found..
Attempting to unmount sdcard
DosFsck running...
One or more errors were found in your Fat32 partition
dosfsck has encountered technical errors and cannot continue. Script will ABORT
Script has completed operations
-----

When running e2fsck from adb doesn't find anything wrong:

(sorry can't copy/paste, I have attached an image)

And if I run a script (founded in a MIUI rom, a didn't remember what version) from gscript, called check sd it says:
Quote:

Will be Check your SD Card from kernel message:

===============================================

[ 19.726623] mmcblk0: mmc1:b368 USD 7.46 GiB
[ 19.727478] mmcblk0: p1 p2 p3
[ 20.836303] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: noauto_da_alloc,data=ordered,commit=15,barrier=1,n ouser_xattr,errors=continue
[ 24.104003] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: noauto_da_alloc,data=ordered,commit=15,barrier=1,n ouser_xattr,errors=continue
[ 24.484558] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts: noauto_da_alloc,data=ordered,commit=15,barrier=1,n ouser_xattr,errors=continue
[ 26.537750] EXT4-fs (mmcblk0p3): mounted filesystem without journal. Opts: noauto_da_alloc,data=ordered,commit=15,barrier=1,n ouser_xattr,errors=continue

===============================================

If you found error between two lines, then your SD card is broken.

The commands on that script are:

Quote:

mkdir /sdcard/gscript/resources>/dev/null
clear
echo "echo Will be Check your SD Card from kernel message:" > /sdcard/gscript/resources/temp.sh
echo "echo ===============================================" >> /sdcard/gscript/resources/temp.sh
echo "dmesg|grep mmcblk0" >> /sdcard/gscript/resources/temp.sh
echo "echo ===============================================" >> /sdcard/gscript/resources/temp.sh
echo "echo If you found error between two lines, then your SD card is broken." >>/sdcard/gscript/resources/temp.sh
su</sdcard/gscript/resources/temp.sh
rm /sdcard/gscript/resources/temp.sh

If someone can help, I'll be really grateful. I have also tried repartitioning the whole SD card with gparted, but the problem still appears. I'm using Alex-V ROM d2ext with default kernel (snq-)

Thanks in advance
Attached Thumbnails
Click image for larger version

Name:	e2fsck.JPG
Views:	338
Size:	19.6 KB
ID:	806410  
6th December 2011, 01:53 AM |#16  
Droidzone's Avatar
OP Inactive Recognized Developer
Flag Kochi
Thanks Meter: 2,288
 
Donate to Me
More
Quote:
Originally Posted by blackhawk_LA

First of all, thanks Droidzone for your work

I have run the tool and had this


When running e2fsck from adb doesn't find anything wrong:

(sorry can't copy/paste, I have attached an image)

And if I run a script (founded in a MIUI rom, a didn't remember what version) from gscript, called check sd it says:


The commands on that script are:



If someone can help, I'll be really grateful. I have also tried repartitioning the whole SD card with gparted, but the problem still appears. I'm using Alex-V ROM d2ext with default kernel (snq-)

Thanks in advance

That check in Miui seems to be at the kernel level..However imho I dont see an error...that line just seems to be the kernel output saying what ext4 options have been used for the mount (should be present for everyone ). Do you see any actual issues while using the card?
The Following User Says Thank You to Droidzone For This Useful Post: [ View ] Gift Droidzone Ad-Free
6th December 2011, 12:42 PM |#17  
blackhawk_LA's Avatar
Senior Member
Thanks Meter: 486
 
More
I haven't see any big issues, just noticed that the sdext restore from a nandroid seemed to take too much time (7-8 minutes for just 300mb) and that's why i used your tool and have a look at this post.
But everything is working fine (or it seems so), just wanted to know if my files could be starting to get corrupted or something.
Thanks
6th December 2011, 01:08 PM |#18  
Droidzone's Avatar
OP Inactive Recognized Developer
Flag Kochi
Thanks Meter: 2,288
 
Donate to Me
More
As far as my script is concerned..it depends on error code from e2fsck to report file system state. That particular error code means that a standard error level was not returned, so only a command line manual e2fsck will show exactly what was the system response. See Post #14 for how to do that.
6th December 2011, 01:18 PM |#19  
blackhawk_LA's Avatar
Senior Member
Thanks Meter: 486
 
More
Mmm this is what I did, I think. See the attached image in my other message; it seems there was no erros (0 bad blocks)
14th July 2013, 10:06 PM |#20  
Junior Member
Thanks Meter: 0
 
More
Hi, got an error in clockwork recovery : error in fixfsv0.2.zip ( status 0 ) installation aborted ..
any clues ?
28th July 2013, 08:11 AM |#21  
Senior Member
Thanks Meter: 25
 
More
Quote:
Originally Posted by ben749

Hi, got an error in clockwork recovery : error in fixfsv0.2.zip ( status 0 ) installation aborted ..
any clues ?

I get the same error. I have a feeling it has to do with the updater-script. I think CWM needs a update script instead.

---------- Post added at 02:11 AM ---------- Previous post was at 02:07 AM ----------

I get this error when trying to run your script in adb shell recovery
DosFsck running...
pre.sh: line 103: fsck_msdos: not found
I checked the permissions and did a chmod 755 on fsck_msdos in /tmp
/tmp # fsck_msdos
fsck_msdos
/sbin/sh: fsck_msdos: not found
/tmp # ls
ls
e2fsck fsck_msdos pre.sh recovery.log
/tmp # fsck_msdos
fsck_msdos
/sbin/sh: fsck_msdos: not found
/tmp # ls -l
ls -l
-rwxr-xr-x 1 root root 111492 Aug 11 2011 e2fsck
-rwxr-xr-x 1 root root 22640 Aug 11 2011 fsck_msdos
-rw-rw-rw- 1 root root 2933 Jul 28 05:43 pre.sh
-rw-rw-rw- 1 root root 3916 Jul 28 05:31 recovery.log
/tmp # chmod 755 fsck_msdos
chmod 755 fsck_msdos
God I find linux tedious!
Post Reply Subscribe to Thread

Tags
fix partition, partition corruption, repair ext

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes