Ask / Submit

Btrfs: phone was rebooted with /dev/loop0 and now it is bricked

asked 2016-05-18 09:51:05 +0300

petRUShka gravatar image

updated 2016-05-18 10:40:25 +0300

I followed instructions in [how-to] Btrfs allocation 100% - What can i do? - Get more space with outsorcing to SD-Card.

I added /dev/loop0 as virtual devices and successfully balanced my device. But when I tried to delete with btrfs device delete /dev/loop0 / I received Invalid argument error.

And then I rebooted device :((( And after it I read

If /dev/loop0 can not be deleted, never reboot! Try to balance again and again, delete local data until you can delete it. Write here for help but never reboot it. Hope this will help other solving the btrfs problem

So now I'm in trouble. On boot Jolla phone tries to recover filesystem but always fail. I'm able to boot into recovery mode. Btrfs recovery won't work:

Ignoring transid failure
parent transid verify failed on 29552640 wanted 16 found 2139347
parent transid verify failed on 29552640 wanted 16 found 2139347
parent transid verify failed on 29552640 wanted 16 found 2139347
parent transid verify failed on 29552640 wanted 16 found 2139347
Ignoring transid failure
btrfs: cmds-check.c:514: process_inode_item: Assertion `!(rec->ino != key->objectid || rec->refs > 1)' failed.
mount: mounting /dev/mmcblk0p28 on /mnt/ failed: Invalid argument
Connection closed by foreign host.

And I have missed device

/ # btrfs filesystem show Label:
'sailfish'  uuid:
        Total devices 2 FS bytes used 23.73MiB
        devid    1 size 13.75GiB used 9.36GiB path /dev/mmcblk0p28
        *** Some devices missing

So now I do't really know what to do. Will full recovery work or make things worse?

edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted

answered 2016-10-23 08:13:39 +0300

Sage gravatar image

Only official way to recover from such thing is to get your device to service and get it reflashed.

However, if you would get a copy of the sailfish partition image (with same version of sailfish os in it) from other Jolla user that you trust not including any malicious to the image, you could in theory at least fix your device yourself.

If you would manage to get your hands on such image(s) you can at least in theory flash those partition images to the eMMC memory with command like dd. There are guides how to do backups of the sailfish partition in together already e.g.

NOTE: Any guidance that tells you to dd whole eMMC and not only certain partitions can and most probably will cause damage to your device.

NOTE: No point asking if md5sum of image X is correct or not as there is no official image provided to the public. Yes, it is unfortunate, but currently we can not share such image.

edit flag offensive delete publish link more

answered 2016-05-18 12:09:15 +0300

evo3de gravatar image

updated 2016-05-18 12:16:41 +0300

I´m sorry to say this:

Full recovery will not work, because /dev/mmcblk0p28 is not mountable any more.


Contact Jolla Care and report them as a question you have problems with your filesystem and the device say this what you give in your output on btrfs recovery. Ask them what you can do to repair it. They will tell you that it must be flashed and open a case to send in and reflash the device. Get back a fresh flashed device after about 1 1/2 week.


More risky and not supported in any way - !! i didn´t done this, and don´t know how it will be done !! - Flash it by your own.

I choose Solution 1 and only would try the second if Jolla deny any support

Edit: I added aditional warnings to the original thread

edit flag offensive delete publish link more


but only the sd card is critical right ? the dusage / musage options for btrfs are fine

pawel ( 2016-05-18 12:35:14 +0300 )edit

Yes @pawel only the Loop0 on the sdcard is critical, expect you are trying to reboot while btrfs balancing is runing

evo3de ( 2016-05-18 12:56:16 +0300 )edit

Thanks for answer! Do you have some ideas where to get image to flash?

petRUShka ( 2016-05-18 15:56:27 +0300 )edit

And one more: what do you think, may be it is possible to mount sd-card, and then mount loop device from sd-card?

petRUShka ( 2016-05-18 15:59:42 +0300 )edit

It´s not possible to provide the Jolla SailfishOS Image direktly due to thirdparty copyright issues regarding Quallcom CPU drivers. You can only ask some people of the community.

I guess mounting Loop0 will not help because it also tryed to fix the metadata and so it corrupted the file system

evo3de ( 2016-05-18 16:14:24 +0300 )edit
Login/Signup to Answer

Question tools

1 follower


Asked: 2016-05-18 09:51:05 +0300

Seen: 565 times

Last updated: Oct 23 '16