![]() |
2018-03-27
, 14:33
|
|
Posts: 237 |
Thanked: 502 times |
Joined on May 2010
@ Mittelfranken, Germany
|
#2
|
## 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: | ||
![]() |
2018-03-28
, 05:50
|
Posts: 1,297 |
Thanked: 4,322 times |
Joined on Oct 2014
|
#3
|
The Following User Says Thank You to nieldk For This Useful Post: | ||
![]() |
2018-03-28
, 07:53
|
|
Posts: 237 |
Thanked: 502 times |
Joined on May 2010
@ Mittelfranken, Germany
|
#4
|
![]() |
2018-03-28
, 08:46
|
Posts: 1,297 |
Thanked: 4,322 times |
Joined on Oct 2014
|
#5
|
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?
![]() |
2018-03-28
, 08:57
|
|
Posts: 237 |
Thanked: 502 times |
Joined on May 2010
@ Mittelfranken, Germany
|
#6
|
![]() |
2018-03-28
, 19:13
|
Posts: 1,297 |
Thanked: 4,322 times |
Joined on Oct 2014
|
#7
|
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?
![]() |
2018-03-29
, 16:11
|
|
Posts: 237 |
Thanked: 502 times |
Joined on May 2010
@ Mittelfranken, Germany
|
#8
|
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.