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

On some systems, readonly mount of system.mount fails #11

Open
alex-min opened this issue May 20, 2018 · 2 comments
Open

On some systems, readonly mount of system.mount fails #11

alex-min opened this issue May 20, 2018 · 2 comments

Comments

@alex-min
Copy link

alex-min commented May 20, 2018

Hi guys,

I'm currently trying to port Halium to my Galaxy s4 and found a small bug I think.
I don't know why it's the case but the system.mount service fails to start on my galaxy s4.

root@localhost:~# systemctl status system.mount
● system.mount - mount system.img
   Loaded: loaded (/lib/systemd/system/system.mount; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2016-02-11 16:28:13 UTC; 2min 36s ago
    Where: /system
     What: /data/system.img
  Process: 749 ExecMount=/bin/mount /data/system.img /system -o ro (code=exited, status=32)

Feb 11 16:28:15 localhost.localdomain systemd[1]: Failed to mount mount system.img.

You just had "Invalid argument" when you run the command manually. What works is mounting it first in write mode and then switching it to read only:

/bin/mount /data/system.img /system -o rw
/bin/mount /data/system.img /system -o ro,remount

If you try to mount it in read only mode first, it just fails.

And this works, would it be worth modifying the system.mount service do you think to test that or is a a bug only happening on my device?

@jbruechert
Copy link
Member

I suspect this is a problem with the kernel your device uses. I'm not sure if that should be fixed here or by patching the kernel.

@alex-min
Copy link
Author

yeah that's the thing, I don't really know where it comes from. I could always make a small script to test to mount it in read only first like it does now and if it fails do that approach but I wonder if it's worth it.

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