[REF] Details about /system RFS corruption and HOWTO correct it (fix included)

Search This thread

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
Hi there!

First, i probably need to reassure people who were scared by my posts: no there is no risk this corruption makes your phone die. It"s just about the state of the filesystem.

So, what triggers the corruption ?

Mounting any RFS filesystem without check=no

How is the filesystem corrupted ?

There are several symptoms:

  • Directory names gets CAPSED: Example: /system/bin becomes /system/BIN
  • files becomes unreadable, or directories becomes unlistable
  • user.log is created (seems it could be created in other situations)
Unfortunately, these errors are random.
I made previously an attempt of auto-detection + correction for Voodoo lagfix but didn't succeed because the filesystem errors seems to vary at each mount.

The more you write on a non-check=no mounted RFS, the more the corruption grows.
This is valid not only for /system but for any RFS.

I use a kernel which you say creates corruption but everything works! Are you a big fat lier who wants me to use Voodoo instead?

Hehe, I read that :D

Lots of things are strange about RFS and i hit several bugs during Voodoo 5 development, which is able to converts /system back to RFS
This is just another example of an RFS inconsistency. Why the hell should all filesystem be mounted only with -o check=no ?
Good question, this is absurd ^^

However, a RFS filesystem mounted without check=no stay usable as long as you continue to mount it without check=no. This is why sztupy and a lot of people didn't noticed it.
But I'm sure a few people had the issue after re-flashing another kernel and thought they made a mistake.
Official Samsung kernel don't boot, or boot but the /system has errors. Missing media files (sound?) or binary ? Yes, this is the cause.


Is this corruption report your personal interest ?

Yes, because it prevents migrating from an old ULF kernel to a Voodoo kernel.
But it's also the case with every other kernel except ULF based ones (not corrected in git ATM)
I lost a lot of hours because of this issue ^^
You know, it's just a bug. Needs to be corrected, that's all.

If the filesystem works fines on ULF kernels, why call this corruption?

Because it only mount properly on ULF kernels.
It does not work on every other including official Samsung ones.


Reaction of hardcore, Speedmod kernel's author:
Chill out guys. Let me try to simply the situation:

1. Supercurio found a bug with ULFK 0.3. It was probably a typo or oversight, but it results in /system not getting mounted correctly, which corrupts /system in some slow way.

2. The corruption is there, but also not that bad because it will work fine for most people. The chance of it crashing or causing immediate harm is slim. And its fixable by a new firmware flash.

3. But nevertheless, its still a bug. And its fixable, and has been fixed in ULFK scripts. I have posted the fixed ULFK scripts already, so all the ULFK kernel makers can update it.

4. Since it is a ULFK bug, it is likely that all the active ULFK kernels devs will update their kernels to fix it.

5. When that happens, users of the older ULFK kernels will run into the same problem (unable to boot) that they run into when flashing back to stock/Voodoo/other fixed kernels. They will have to either (i) use this tool or other methods to fix it, or (ii) reflash their firmware.

The point is: It's a real problem with ULFK 0.3. But it won't cause much *immediate* harm. But its been fixed anyway in newer ULFK. And eventually all ULFK users will have to update and go through the 'conversion' hassle.

----------

Now for something non-technical. I really want to thank Supercurio for finding and sharing this problem. He didn't have to and we could just have continued to be un-informed. But he did, and even tries to make an 'easy' fix (which may not even be possible!).

I can't say the same for everyone, but if I know that there is a bug with the software, and there *is* a fix, then I'd rather implement the fix. Even though not doing so may not cause me any immediate damage. But it's really the individual person's choice.


In second post: how to correct the issue.

Big thanks to lots of people that took time to send the log helping understanding this issue during the development of Voodoo.
 
Last edited:

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
Howto correct the /system RFS corruption issue

2 methods available
Hi curio. Its not a proven working procedure but it might work.

http://xdaforums.com/showpost.php?p=9371094&postcount=2709


And mine:


Okay!
My fully-automated solution attempt is ready.
Backup first.

Introducing Voodoo /system RFS fixer

Download: http://project-voodoo.org/downloads/voodoo-system-rfs-fixer-kernel-2.tar
Flash without repartition.


What does it do?

This kernel boots and detects current filesystems.

- If there is a RFS /system, this filesystem will be mounted with corrupted-compatible mount options
- A internal backup to the sdcard is made
- /system is formatted as RFS with fat.format using adequate parameters
- the backup is restored on the fresh /system mounted with correct options

After that, your all refreshed /system should free from corruption (if the source /system was)


Do I need this fix ?

If you plan to continue using the same kernel without changing in the future, no. Forget about it.

If you use an ULF-based kernel except Speedmod kernel from hardcore starting with K9, you should consider it before switching to a standard kernel.

The latest Voodoo lagfix converts /system as Ext4, that's why it's sensible to /system corruptions. But maybe you would not notice by yourself some missing media file or a strange crash because a lib was corrupt.


Is it 100% reliable?

Unfortunately it's not, and it cannot. I have reports of a small % of failures, that's why i don't recommend running it if you don't need it, and also doing backup of your /system if there is something interesting here.


Is it a lagfix?

No, it's based on Voodoo lagfix code but not a lagfix.
You cannot use it as a real Kernel, the conversion RFS<->RFS is run at each boot.


How much time does it take?

About 3 minutes with a standard system. Smaller roms takes less time.
You'll hear step1 step2 and it will boot.


3 minutes? nope, it takes forever

Sorry, this automated fix is unable to repair your /system.
Now you can try another method or quick: flash a stock kernel.


Are my personal data modified?

No.
Only /system is modified.
If something goes wrong, you can simply reflash a ROM or only a system using Odin.


Are my personal data modified?

What about backups ?
You can make/restore backups booting into recovery.
Default recovery is CWM Recovery, and when you boot in recovery there is no conversion involved.
Standard boot triggers the conversion/un-corruption.


I have a problem

This is young code. Tested but still young.
You can help by sending or joining your sdcard/Voodoo/logs directory zipped here.


Full source of the solution used :
https://github.com/project-voodoo/lagfix/tree/system-rfs-fixer
 
Last edited:
  • Like
Reactions: jishinjp

supercurio

Retired Senior Recognized Developer
May 31, 2010
3,550
5,041
Chambéry
spectrastudy.com
Code:
/system # ls
ls: ./FONTS: No such file or directory
ls: ./MEDIA: No such file or directory
ls: ./XBIN: No such file or directory
ls: ./APP: No such file or directory
ls: ./USR: No such file or directory
ls: ./ETC: No such file or directory
ls: ./firmware: No such file or directory
ls: ./BIN: No such file or directory
ls: ./user.log: No such file or directory
build.prop    default.prop  lib           lib

Trying to restore a CWM backup from a non-corrupting kernel don't work.
The RFS /system needs to be reformatted entirely.

A few minutes later:

Code:
ls -l
drwxr-xr-x    1 root     root             0 Nov 23 00:40 APP
drwxr-xr-x    1 root     shell            0 Nov 23 01:07 BIN
drwxr-xr-x    1 root     root             0 Nov 23 01:00 ETC
drwxr-xr-x    1 root     root             0 Nov 23 00:39 FONTS
drwxr-xr-x    1 root     root             0 Nov 23 00:39 MEDIA
drwxr-xr-x    1 root     root             0 Nov 23 00:40 USR
drwxr-xr-x    1 root     shell            0 Nov 23 00:39 XBIN
-rw-r--r--    1 root     root          1956 Nov 23 01:10 build.prop
-rw-r--r--    1 root     root             0 Nov 23 01:10 default.prop
drwxr-xr-x    1 root     root             0 Nov 23 00:40 firmware
drwxr-xr-x    1 root     root             0 Nov 23 01:10 lib
drwxr-xr-x    1 root     root             0 Nov 23 01:10 lib
-rw-rw-rw-    1 root     root           552 Nov 23 01:00 user.log
 
Last edited:

betoNL

Senior Member
Ok.. I got lost over there.....too many posts per hour or shall I say , per minute?

@ SUPERCURIO...
I flashed SpeedMod K8 300hz 341 MB ram this morning and evrything is working pretty fine .... iGo Motonav voice instructions dont stutter anymore. Wifi , Games, evrything smooooooth.

But about the file system corruption thing:
I didnt apply any lag scheme, only the tweaks...That means I am safe right?
Or those extra 40MB Ram took some bribing as well??

Hardcore brought up the K9...what's different? changelogs? details??
redface.gif


Thanks in advance....

Btw.....is there a tweak to improve sgs's FM sound quality?;)
 

jjwa

Senior Member
Jun 24, 2010
220
10
38
Enschede
Not yet.

My current recommendation is :
- make a CWM backup of your running working without problem system
- flash a stock firmware
- flash a non-affected kernel with CWM support (K9, Voodoo 5 snapshot)
- restore

My personally preferred alternative method (because it's all in CWM :p).
- make a CWM backup
- Use CWM to format .system & wipe the dalvik-cache.
(You may need to unmount /system before it can format /system)
- flash a non-affected kernel with CWM support (K9, Voodoo 5 snapshot)
- use CWM for Advanced restore -> system [/QUOTE]
 

DamianGto

Senior Member
Sep 17, 2010
2,022
420
I don't us that initramfs in my kernel. I hope that would be safe then.
But i get some question that people can't leave speedmod kernel and flash my kernel. It won't work, but if they flash back speedmod kernel it works. Maby it something else..


Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
 

betoNL

Senior Member
Ok.. I got lost over there.....too many posts per hour or shall I say , per minute?

@ SUPERCURIO...
I flashed SpeedMod K8 300hz 341 MB ram this morning and evrything is working pretty fine .... iGo Motonav voice instructions dont stutter anymore. Wifi , Games, evrything smooooooth.

But about the file system corruption thing:
I didnt apply any lag scheme, only the tweaks...That means I am safe right?
Or those extra 40MB Ram took some bribing as well??

Hardcore brought up the K9...what's different? changelogs? details??
redface.gif


Thanks in advance....

Btw.....is there a tweak to improve sgs's FM sound quality?;)
Never mind, got some answers already. I disabled all tweaks, wiped dalvik cache and flashed K9 300hz....

« »
 

fuze_freak

Senior Member
Jan 9, 2009
236
23
Ok so I notice that I have the "user.log.old"
everyone is talking about user.log but mine says "user.log.old" what does it means?
update: I checked the day in the details of that user.log.old and it says november 22, 2010 yesterday....
update2: I have the user.log also

another question can I instal k9 without flashing a stock ROM, just on top of doc's ROM ?

thanks

user.log content
----------------------------------------------------------------------------------
mount: mounting none on /acct failed: Device or resource busy
mount: mounting none on /dev/cpuctl failed: Device or resource busy
/sbin/post-init.sh: cd: line 219: can't cd to /sbin/init.d
Mon Nov 22 10:45:05 AST 2010 USER EARLY INIT START
Mon Nov 22 10:45:05 AST 2010 USER EARLY INIT DONE
Mon Nov 22 10:45:05 AST 2010 USER INIT START
Mon Nov 22 10:45:05 AST 2010 USER INIT DONE
mount: mounting /dev/block/stl9 on /system failed: Device or resource busy
----------------------------------------------------------------------------------
 
Last edited:

Adevem

Senior Member
Aug 4, 2010
1,349
87
never though that my "not applying of lagfixes" since froyo, will come such a long way! lol.

glad to know my /system is safe.

edit : well just found that there's -

/system/user.log
/system/user.log.old

does that mean my /system is corrupted? i don't see any unusually caps'd folders. i guess the only way to find out is to flash voodoo/speedmod k9, hmm...
 
Last edited:

hardcore

Senior Member
Sep 12, 2006
3,435
7,992
user.log is created in /system
so i need to reflashing to stock rom and use K9 kernel, right?
user.log created in /system does not always mean your /system is corrupted. Backup first, then try K9, hope it works. If it boots you should be fine (maybe have to reinstall superuser).

But if it doesn't boot with K9 it means your /system is corrupted enough.

Then you should try the procedure u mentioned -flash stock ROM/PDA and then K9.
 

roxaim

Member
Nov 20, 2010
8
1
i got user.log.old on /system

but I already flashed to k9, so i guess my /sistem not corrupted ?
 

hardcore

Senior Member
Sep 12, 2006
3,435
7,992
For kernel makers: If you don't wan't to edit the initramfs yourself, here is the initramfs I use for SpeedMod K9.

It fixes the /system mount, and also updates ULF to 0.4-pre, and has bootanimation support.

Be careful if you use it though, a lot of users from older ULFK-based kernels will not be able to boot from the new mount options, but it should prevent future corruption of /system.
 

Attachments

  • initramfs-speedmod-k9.zip
    2.3 MB · Views: 52
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Howto correct the /system RFS corruption issue

    2 methods available
    Hi curio. Its not a proven working procedure but it might work.

    http://xdaforums.com/showpost.php?p=9371094&postcount=2709


    And mine:


    Okay!
    My fully-automated solution attempt is ready.
    Backup first.

    Introducing Voodoo /system RFS fixer

    Download: http://project-voodoo.org/downloads/voodoo-system-rfs-fixer-kernel-2.tar
    Flash without repartition.


    What does it do?

    This kernel boots and detects current filesystems.

    - If there is a RFS /system, this filesystem will be mounted with corrupted-compatible mount options
    - A internal backup to the sdcard is made
    - /system is formatted as RFS with fat.format using adequate parameters
    - the backup is restored on the fresh /system mounted with correct options

    After that, your all refreshed /system should free from corruption (if the source /system was)


    Do I need this fix ?

    If you plan to continue using the same kernel without changing in the future, no. Forget about it.

    If you use an ULF-based kernel except Speedmod kernel from hardcore starting with K9, you should consider it before switching to a standard kernel.

    The latest Voodoo lagfix converts /system as Ext4, that's why it's sensible to /system corruptions. But maybe you would not notice by yourself some missing media file or a strange crash because a lib was corrupt.


    Is it 100% reliable?

    Unfortunately it's not, and it cannot. I have reports of a small % of failures, that's why i don't recommend running it if you don't need it, and also doing backup of your /system if there is something interesting here.


    Is it a lagfix?

    No, it's based on Voodoo lagfix code but not a lagfix.
    You cannot use it as a real Kernel, the conversion RFS<->RFS is run at each boot.


    How much time does it take?

    About 3 minutes with a standard system. Smaller roms takes less time.
    You'll hear step1 step2 and it will boot.


    3 minutes? nope, it takes forever

    Sorry, this automated fix is unable to repair your /system.
    Now you can try another method or quick: flash a stock kernel.


    Are my personal data modified?

    No.
    Only /system is modified.
    If something goes wrong, you can simply reflash a ROM or only a system using Odin.


    Are my personal data modified?

    What about backups ?
    You can make/restore backups booting into recovery.
    Default recovery is CWM Recovery, and when you boot in recovery there is no conversion involved.
    Standard boot triggers the conversion/un-corruption.


    I have a problem

    This is young code. Tested but still young.
    You can help by sending or joining your sdcard/Voodoo/logs directory zipped here.


    Full source of the solution used :
    https://github.com/project-voodoo/lagfix/tree/system-rfs-fixer
    1
    Quick question please :)

    I flashed Friday through Kies, the latest version of 2.2 available official for my operator (JP7) over K9A.

    In K9A i used No-RFS Advanced but before that, there wasn't another version of SpeedMod, just another stock kernel, JPA.

    Today, suddenly, all my sound settings for calls, sms, mail are missing and the phone is using some random mp3 from sdcard.

    There are no CAPS folders, no logs and because I want to use the final Voodoo today, I can't figure if I need to use the fix from this topic or this is some random bug which has nothing to do with the corrupt RFS system.

    Please advice. Thank you.
    1
    I'm confused; will flashing JPU with repartition checked fix this if I plan on wiping the device anyway, or is it necessary to flash this kernel first?

    Thanks in advance.

    YES ! :)
    And that's an interesting side effect for this new release!