# Oops, I bricked it again, using btrfs, curved hands and some street magic. Help, me...

So, I've bricked my phone using very sophistical way.

Yesterday I've get error "no space left on device" with 4gb+. free. This error widely described on this forum, but during restore i've made additional steps. Yes, it was steps in wrong direction..

Firstly i've connected to phone using wlan. I've tried to start btrfs balance, but get "no space left.." message. "No space?.. I will give you space, much space you ever seen before!" - with these words i've typed command:

It was a wrong step, i know.

After adding device i started btrfs balance again. At this time get I no complains, no error messages, no stories, no answer. It looks, like it very busy and don't want to talk to me. I wanted to know more about it's doings on second connection (already opened), using standard commands but only answer I get was errors reading /bin/bash, /bin/ps, /bin/ls etc. I waited about 15 mins, but nothing changed.

I hard-rebooted to recovery console. But when i start "btrfs-balance start / " I get "'/' - Inappropriate ioctl for device". "btrfs check" found much errors, but when it started with "--repair" option it died with words "btrfs: extent-tree.c:2682: btrfs_reserve_extent: Assertion !(ret)' failed"

I've tried to restore to factory settings, but with inserted mmc it stops with words "Flashed recovery image is too old and does not support phone clearing". If I get mmc out, recovery hangs "cannot mount /dev/mmcblk0p28".

I've tried to delete second device, but it also unsucessfull. I've tried to start btrfs restoring using recovery menu, but it send me to seek service. Heh, I AM SERVICE! :)

/ # btrfs fi show Label: 'sailfish' uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387 Total devices 2 FS bytes used 8.91GiB

    devid    1 size 13.75GiB used 1.00GiB path /dev/mmcblk0p28

devid    2 size 31.25GiB used 960.00MiB path /dev/mmcblk1p1


Btrfs v3.16

# btrfs device delete /dev/mmcblk1p1 / ERROR: error removing the device '/dev/mmcblk1p1' - Inappropriate ioctl for device

Please, help me transform my brick to phone. :)

edit retag close delete

guess you messed up the FS for good, on recovery / is recovery and not internal sailfish root - what you did was adding a physical device, you need to mount / again with all devices attached and then delete it from the tray to get it back, if that does not work you remove the device physically (remove uSD) and mount mount -o degraded /dev/mmcblk0p28 /mnt and then btrfs device delete missing /mnt` - all this on recovery terminal of course! As you simply did not know what you are doing I guess the quote "if you break it you may keep both pieces!" applies. Lets hope your balance after adding the device did not do anything and the "delete missing" does clean up good you should return to normal booting afterwards... if not, one option may be to recover via factory snapshot restoring by hand if factory-reset still fails!

( 2015-07-15 14:51:56 +0200 )edit

thank you for answer. I've tried it, but get segfault.

# mount -o degraded /dev/mmcblk0p28 /mnt

Segmentation fault

what do you mean by "snapshot restoring by hand"?

( 2015-07-15 17:41:21 +0200 )edit

At this point I need to say that any further doing may leave your device bricked for good. I will ask sailors to help!

( 2015-07-15 17:45:09 +0200 )edit

Oh and now I see... 1GiB used on both devices cannot be right! not with 9GiB used in data (or do I read that wrong?)

( 2015-07-15 17:50:02 +0200 )edit

I've just edited to best view. Yes, 1GB used on internal storage, and 960 Mb used on mmc.

Maybe there is a way to upload "factory default" image directly to device inode using dd-like tool?..

( 2015-07-15 18:13:04 +0200 )edit