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

s2e makes system not bootable when rebooted during mv cmd #36

Open
wbaran opened this issue Sep 25, 2014 · 0 comments
Open

s2e makes system not bootable when rebooted during mv cmd #36

wbaran opened this issue Sep 25, 2014 · 0 comments

Comments

@wbaran
Copy link

wbaran commented Sep 25, 2014

I selected all directories but /data to be moved to sd card, rebooted and it worked perfectly for months...

Yesterday I chose to move also application data, rebooted the phone and it did not start in couple of minutes so I rebooted it again. This time it started but there was nothing shown on the screen. The only button that worked was the power button.

I rebooted to CWM recovery, backed up whole FS to the sd card and then opened it on my laptop. I found that the /data location was present in both data.ext4.tar and also in the sd-ext.ext4.tar files. Then I found s2e logs in which there was a statement saying that it had not found it's config:

Initialization...
Ext partition found: /dev/block/mmcblk0p2

Use built-in tune2fs
Use built-in e2fsck

Setup read_ahead value

/dev/block/mmcblk0p2 successfully mounted!

Config not found... Exit!

The problem is that when You select to move application data to sd card then there's not just an movement but also delete!

        ${BB} mv /data/data/* ${SD_EXT_DIRECTORY}/data
        ${DELETE} /data/data/*

This lead to the situation that the s2e config was not moved but deleted from phone's internal memory which made the system bootable but useless since all apps and data (the already moved part) was on sd card but s2e did not mount it (because there was no config...).

I found that other commands may also fail (like moving data from sd-card back to internal memory) when they are interrupted. My suggestion is to use && for chaining the commands and always use "cp && rm" pair instead of mv. This way if the command is interrupted then You still have the data...

        ${BB} mv ${SD_EXT_DIRECTORY}/data/* /data/data/
        ${DELETE} ${SD_EXT_DIRECTORY}/data

Furthermore the config file should be always backed up in some location other than /data so that it's always available...

I managed to fix my problem by manually moving app data back to phone's internal memory and creating an xml file parsable by the s2e script with proper settings that reflected current situation. The phone started, some settings were lost but it was a great relief to have it working...

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

1 participant