Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Q] can i use this to mount everything as ro (aka volatile) on kernelsu? #63

Open
xxjoe2 opened this issue Feb 16, 2024 · 3 comments
Open

Comments

@xxjoe2
Copy link

xxjoe2 commented Feb 16, 2024

wanna create a volatile overlay system with all partitions mounted as ro upon boot, and all changes will be written to /tmp (tmpfs), and discard all changes after reboot for testing purposes

is it possible to do that with your magic overlayfs with kernelsu?

regards

@HuskyDG
Copy link
Owner

HuskyDG commented Feb 16, 2024

Yes

@HuskyDG
Copy link
Owner

HuskyDG commented Feb 16, 2024

Execute ./overlayfs_system /tmp

@xxjoe2
Copy link
Author

xxjoe2 commented Feb 16, 2024

great!

but that's for after the device has booted up, ie some files are likely been modified before executing the above commands. am i correct?

so where should i put this command properly so that once booted up all partitions are mounted as ro only? do i need to modify any kernelsu manager scripts or to create a new init file to mount them as ro before running the actual init?

also, do i need to make changes to mode.sh like OVERLAY_MODE=2 etc?

EDIT
i just installed the module vi ksu manger but there were errors:

  • Created overlay image with size: 2.1M
  • Shrink overlay image
    skipping journal recovery because INCOMPAT_RECOVER was clear.
    check whether gdt & bitmap free count is vaild
    1 th bg has wrong free counts gdt count : 1942, bitmap count : 8192
    2 th bg has wrong free counts gdt count : 7495, bitmap count : 8192
    3 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    5 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    7 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    9 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    25 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    27 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    49 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    81 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    125 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    243 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    343 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    625 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    729 th bg has wrong free counts gdt count : 8086, bitmap count : 8192
    848 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    864 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    880 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    896 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    912 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    928 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    944 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    960 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    976 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    992 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    1008 th bg has wrong free counts gdt count : 8128, bitmap count : 8192
    Signal (11) SIGSEGV si_code=SEGV_ACCERR fault addr=0x7e081c1e40

after tracing the scripts, it seems the shrink operation was the cause of the problem, and the module img was missing now, and your module disappeared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants