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

[Feature Request] mount emmc as readonly, store diff into sdcard #1060

Open
Soneoylys opened this issue Jan 27, 2025 · 7 comments
Open

[Feature Request] mount emmc as readonly, store diff into sdcard #1060

Soneoylys opened this issue Jan 27, 2025 · 7 comments

Comments

@Soneoylys
Copy link

I wonder if it's possible to not fully dd the whole emmc into sdcard to isolate your OFW and CFW, if the decryption keys are avaliable in bootloader stage, why not just mount emmc as readonly, then store any written block as diff image in sdcard.
Though probablly any boot into OFW after diff image been created will likely to break the whole image in sdcard, but it's still nice to have if wanna to temporary test some dangerous CFW in this environment.
Idk if it's doable because the emmc encryption, just discussion the possibility here.

@Masamune3210
Copy link

Because its a lot more work for almost no gain. Diffs take extra effort to calculate in real-time, if you mess up once the entire image is corrupted, it breaks if literally anything changes in the base image and isn't really going with the whole point of emunand, which is to have a completely separate nand you can boot into that cannot affect the other in any way

@Soneoylys
Copy link
Author

Sorry, but write new changed blocks to a seperate image does not take that much "calculate effort" , and also by mount the emmc readonly there's no way you can affect it

I do agree you said "anything changed in base will break the image", and what I trying to say is backing up your emmc tooks long time, and I'm not saying emummc is useless, but for testing or temporary one-time usage, dd 30-60gigs of data is just took too much time

@m4xw
Copy link
Contributor

m4xw commented Jan 27, 2025

There isn't even a concept of "mounting the emmc readonly" in emummc. This isn't Linux.
What you could do is make a emummc modification that reads a mirror location and you could xor that but it would be more than half the performance as penalty

@Soneoylys
Copy link
Author

Thanks for reply, i thought it was block based but after read the emummc driver i figured it's sector based.
I wonder if it's possible to reuse some partitions in actual emmc and only reflect partitions necessary to reduce image size wasted on sdcard, if the partition table itself is not encrypted?

@Masamune3210
Copy link

Sorry, but write new changed blocks to a seperate image does not take that much "calculate effort" , and also by mount the emmc readonly there's no way you can affect it

I do agree you said "anything changed in base will break the image", and what I trying to say is backing up your emmc tooks long time, and I'm not saying emummc is useless, but for testing or temporary one-time usage, dd 30-60gigs of data is just took too much time

it takes a LOT more work than you want happening literally any time anything is written to in the nand, something that happens nearly constantly by background processes

@Soneoylys
Copy link
Author

"literally any tine anything is written to in the nand" sounds isnt quite a good statement to me:
It's a game console not a multi purpose device, the most data written happens during saving progress, which isn't "anytime", you actually can see there's almost no space usage if you exclude game installs and savedatas in system settings as well.
afaik, switch also does not use any kind of swap files to help reduce memory usage as well, usually large amount of data exchange happens during system swap.
If you can prove me wrong then prove it properly, else please not make that kind of statement based on your imagination because you disagree the idea
I understand it's impact performance because of how emummc works tho, but not how data been written "constantly by background processes".
Thanks for the reply anyways!

@Masamune3210
Copy link

A. There is more than one partition on the NAND, Settings only shows one of them.
B. Modern consoles run a lot more than just what you see. There are sometimes hundreds of background processes.

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

3 participants