mobile-nixos icon indicating copy to clipboard operation
mobile-nixos copied to clipboard

booting `examples/demo` on amazon-austin fails

Open samueldr opened this issue 2 years ago • 2 comments

Trying to boot examples/demo on amazon-austin (both with and without "userdata" set, though it seems irrelevant in this case) fails with:

INIT_EXCEPTION
Uncaught Exception
Command failed... `e2fsck -fp /dev/disk/by-label/NIXOS_SYSTEM" (4) (System::CommandError)

Is there something else I should be doing to get this to successfully run?

Originally posted by @willcohen in https://github.com/NixOS/mobile-nixos/issues/480#issuecomment-1147749785

samueldr avatar Jun 07 '22 02:06 samueldr

@willcohen, can you describe how this was installed. More importantly, the steps taken to flash the rootfs?

It's highly likely that what is happening is the filesystem found at /dev/disk/by-label/NIXOS_SYSTEM is somehow managed and that's why e2fsck exits with 4.

From its manpage:

       The exit code returned by e2fsck is the sum of the following conditions:
            0    - No errors
            1    - File system errors corrected
            2    - File system errors corrected, system should
                   be rebooted
            4    - File system errors left uncorrected
            8    - Operational error
            16   - Usage or syntax error
            32   - E2fsck canceled by user request
            128  - Shared library error

So there's file system errors left uncorrected.

I would hazard a guess that if it was flashed to multiple partitions, it might have been flashed to a partition that is too small and thus is truncated and broken. I would recommend somehow (I don't really know how, TWRP I guess) zeroing out the system and userdata partitions assuming it is where this was flashed.

On my personal device, I have only tried running the examples/hello system, and its rootfs is stored on the SD card, rather than on the system or userdata partition.

Another thing to consider might be to run e2fsck within TWRP (using e.g. adb shell) to see if there's some explanation to the failure.

samueldr avatar Jun 07 '22 02:06 samueldr

Apologies for the delay here -- you're correct that the issue in question was one of needing to zero out the partitions. I'm still having some issues getting hello to successfully flash, due to repeated errors about being unable to unzip system.img to the internal partition, but I suspect that's a me problem as well. Will continue to try to diagnose.

willcohen avatar Jul 11 '22 19:07 willcohen

This device is not supported anymore, closing.

samueldr avatar Sep 15 '23 06:09 samueldr