Active Topics

 



Notices


Reply
Thread Tools
Posts: 19 | Thanked: 32 times | Joined on Oct 2011
#1
Used the recovery menu to run the restore factory settings script,
but it didn't fix the boot loop. It also reverted back to recovery
menu v0.1, so I can't check if the btrfs fix option had helped
and also the shell option is not visible.

I believe the boot loop was initially caused by pulling off the
battery too early during shutdown. So I would assume
it is still some kind of file system data corruption issue.

Can I somehow still get a shell or have other tricks available
to try to recover it.
 
Amboss's Avatar
Posts: 177 | Thanked: 268 times | Joined on May 2010 @ Mittelfranken, Germany
#2
I have had a similar problem last year (and then every 2 months). I could only fix it externally as the btrfs version used by Jolla 1 is somewhat aged. For me it killed the folder with timezone data and some files which I could reproduce from factory@. There were also some cache files broken, but this is not needed anyway.

If you're lucky the factory reset script didn't break too much data. You need an sdcard 16GB+ and a linux machine.

I took some parts of this guide, except I didn't have a "working phone" for step 1 and 2.

What I did is:
Code:
## lines starting with @laptop are done on linux machine
## lines starting with / are done in recovery mode shell (option 4)

## on laptop
### format sd card to ext4 for large file support
### note UUID before if you want the same in optional last step
@laptop ~ $ sudo mkfs.ext4 /dev/mmcblk0p1

## after inserting sd card to Jolla
### this mounts memory card and copies the whole partition to an image file, take some time (~10 min)
/ # mkdir sd
/ # mount /dev/mmcblk1p1 /sd
/ # dd if=/dev/mmcblk0p28 of=/sd/kaputt_20180124.img
/ # umount /sd

## on laptop
### moving sd card to linux machine, for me it gets automounted on /media/myUserName/UUID_of_sd_card
@laptop ~ $ sudo dd if=/dev/zero of=/media/<user>/<UUID>/new-jolla-20180124.img count=28831711
### this is somewhat different from the link above, newer version of btrfs need also "skinny-metadata" deactivated to work on Jolla
@laptop ~ $ sudo mkfs.btrfs --label sailfish --nodesize 4096 --features ^extref,^skinny-metadata /media/<user>/<UUID>/new-jolla-20180124.img
@laptop ~ $ sudo mount -o loop,subvolid=0 /media/<user>/<UUID>/new-jolla-20180124.img /mnt/tmp/
@laptop ~ $ sudo btrfs subvolume create /mnt/tmp/factory-@
@laptop ~ $ sudo btrfs subvolume create /mnt/tmp/factory-@home
@laptop ~ $ sudo btrfs subvolume create /mnt/tmp/@
@laptop ~ $ sudo btrfs subvolume create /mnt/tmp/@home
### terminal should be put in "endless" mode before the next step
### these options are needed to copy all symlinks etc. it will also list symlinks in terminal
### it shows errors for files which could not be recovered, which you need to fix afterwards
### the broken image is not to be mounted at this time
@laptop ~ $ sudo btrfs restore -sxmSio /media/<user>/<UUID>/kaputt_20180124.img /mnt/tmp/
### from here it is like step 5 onwards
@laptop ~ $ sudo btrfs subvol list /mnt/tmp/
@laptop ~ $ sudo btrfs subvol set-default 259 /mnt/tmp/
@laptop ~ $ sudo btrfs-show-super /media/<user>/<UUID>/new-jolla-20180124.img
@laptop ~ $ sudo umount /mnt/tmp
### I varied step 6 by assigning the original UUID of the jolla image to the new image instead of altering /etc/fstab
@laptop ~ $ sudo btrfstune -U <UUID_jolla> /media/<user>/<UUID>/new-jolla-20180124.img

## back on phone
### if you didn't shut down the phone in between /sd is still there
/ # mkdir sd
/ # mount /dev/mmcblk1p1 /sd
/ # dd if=/sd/new-jolla-20180124.img of=/dev/mmcblk0p28
/ # reboot

## back on laptop
## I you need your sd card (like I did) you need to revert it to fat32
## it needs to unmounted, the option sets the original UUID which you wrote down in the first step
@laptop ~ $ sudo mkdosfs -i 12345678 /dev/mmcblk0p1
 

The Following User Says Thank You to Amboss For This Useful Post:
Posts: 1,171 | Thanked: 3,927 times | Joined on Oct 2014
#3
He canít enter recovery it seems, so he needs another way to boot a recovery .
For a way to do so, see here (this is what some of us did, before Jolla implemented a recovery mode)

https://wiki.merproject.org/wiki/Sailfish/Backup_Device
__________________
You can still support my work by donation - click here

ETH: 0xFcD031609DB739C62730589361940C68ceEbC913
 

The Following User Says Thank You to nieldk For This Useful Post:
Amboss's Avatar
Posts: 177 | Thanked: 268 times | Joined on May 2010 @ Mittelfranken, Germany
#4
ooh, must have missed that vilva has no shell anymore

anyway are you sure, your link's instructions still works? There is a bold lettered note that it won't work after 1.0.25?

Last edited by Amboss; 2018-03-28 at 08:48.
 
Posts: 1,171 | Thanked: 3,927 times | Joined on Oct 2014
#5
Originally Posted by Amboss View Post
ooh, must have missed that he vilva has no shell anymore

anyway are you sure, your link's instructions still works? There is a bold lettered note that it won't work after 1.0.25?
No, I didnt try. But I remember that (at least before 1.0.2.5) you could fastboot oem unlock. So, perhaps it can work
__________________
You can still support my work by donation - click here

ETH: 0xFcD031609DB739C62730589361940C68ceEbC913
 
Amboss's Avatar
Posts: 177 | Thanked: 268 times | Joined on May 2010 @ Mittelfranken, Germany
#6
Nope, this is something I had been looking for as well 2 weeks ago. bootloader can only be unlocked from recovery and if that is not working, well ... hen-and-egg?
 
Posts: 1,171 | Thanked: 3,927 times | Joined on Oct 2014
#7
Originally Posted by Amboss View Post
Nope, this is something I had been looking for as well 2 weeks ago. bootloader can only be unlocked from recovery and if that is not working, well ... hen-and-egg?
Boot loader is unlocked with fastboot (if bootloader is allowing it)
I did in early days, but yes, it is possibly changed in newer SFOS versions.
You can check by entering fastboot
Canít recall if itís vol-up or vol-down while power on from turned of phone.
__________________
You can still support my work by donation - click here

ETH: 0xFcD031609DB739C62730589361940C68ceEbC913
 
Amboss's Avatar
Posts: 177 | Thanked: 268 times | Joined on May 2010 @ Mittelfranken, Germany
#8
if I try sudo fastboot -i 2931 oem unlock it just stated "permission denied" - so no unlock from fastboot
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:38.