Ask / Submit

Revision history [back]

click to hide/show revision 1
initial version

posted 2017-07-05 13:36:35 +0200

My Jolla C has broken its internal flash memory that is /dev/mmcblk0p28. Sometimes it had fallen into recovery mode and i had to reset to factory state. And it always had iowait more than 30% with typical 50 - 75 %. Jolla C has LVM not btrfs, i don`t know how it is suitable for Jolla 1.

Step 0. Read and understand all text below.

Step 1. Make sure you have backup and you can restore everything you need.

Step 2. Copy image of mmcblk0p28 to empty SD card mmcblk1.

Variant 1. I had 7days old backup image on PC made by these instructions https://together.jolla.com/question/81832/full-phone-backup-guide/ , so i could do the following on my PC:

dd if=./Backup20170624.img of=/dev/sdb

Variant 2. If you have working Jolla C, you can activate recovery mode. Then plug usb to PC and telnet 10.42.66.66 . At the Jolla choose option 3 - shell and do:

dd if=/dev/mmcblk0p28 of=/dev/mmcblk0

Then turn the phone off and take SD card out.

Step 3. At this point you have full copy of internal flash memory at your SD card. And SD card is not installed in Jolla. Now it's time to destroy lvm volumes and groups on internal flash. Run Jolla into recovery mode, telnet it and choose 3 - shell.

umount /rootfs
lvm

Last command opens shell for lvm commands. Type there:

lvchange -an sailfish/home
lvremove sailfish/home

lvchange -an sailfish/root
lvremove sailfish/root

vgchange -an sailfish
vgremove sailfish

pvremove /dev/mmcblk0p28

exit

Now you see shell prompt, type exit again to get into recovery menu.

Step 4. Turn off Jolla, insert SD card, run into recovery mode, connect by telnet, choose 3 - shell, type lvm to get into its shell and observe its state:

pvscan
vgscan
lvscan

You should get the same output as it was before step 1 except name of physical device which is mmcblk1 now. Almost everything is ready, even option 4 - check filesystem in recovery menu will work, but phone will not boot. We need to include internal flash memory in virtual group type in lvm shell:

pvcreate /dev/mmcblk0p28
vgextend sailfish /dev/mmcblk0p28
exit

Exit shell, choose reboot at recovery menu. Now phone should normally boot SailfishOS and work fine.

My Jolla C has broken its internal flash memory that is /dev/mmcblk0p28. Sometimes it had fallen into recovery mode and i had to reset to factory state. And it always had iowait more than 30% with typical 50 - 75 %. Jolla C has LVM not btrfs, i don`t know how it is suitable for Jolla 1.

Step 0. Read and understand all text below.

Step 1. Make sure you have backup and you can restore everything you need.

Step 2. Copy image of mmcblk0p28 to empty SD card mmcblk1.

Variant 1. I had 7days old backup image on PC made by these instructions https://together.jolla.com/question/81832/full-phone-backup-guide/ , so i could do the following on my PC:

dd if=./Backup20170624.img of=/dev/sdb

Variant 2. If you have working Jolla C, you can activate recovery mode. Then plug usb to PC and telnet 10.42.66.66 . At the Jolla choose option 3 - shell and do:

dd if=/dev/mmcblk0p28 of=/dev/mmcblk0
of=/dev/mmcblk1

Then turn the phone off and take SD card out.

Step 3. At this point you have full copy of internal flash memory at your SD card. And SD card is not installed in Jolla. Now it's time to destroy lvm volumes and groups on internal flash. Run Jolla into recovery mode, telnet it and choose 3 - shell.

umount /rootfs
lvm

Last command opens shell for lvm commands. Type there:

lvchange -an sailfish/home
lvremove sailfish/home

lvchange -an sailfish/root
lvremove sailfish/root

vgchange -an sailfish
vgremove sailfish

pvremove /dev/mmcblk0p28

exit

Now you see shell prompt, type exit again to get into recovery menu.

Step 4. Turn off Jolla, insert SD card, run into recovery mode, connect by telnet, choose 3 - shell, type lvm to get into its shell and observe its state:

pvscan
vgscan
lvscan

You should get the same output as it was before step 1 except name of physical device which is mmcblk1 now. Almost everything is ready, even option 4 - check filesystem in recovery menu will work, but phone will not boot. We need to include internal flash memory in virtual group type in lvm shell:

pvcreate /dev/mmcblk0p28
vgextend sailfish /dev/mmcblk0p28
exit

Exit shell, choose reboot at recovery menu. Now phone should normally boot SailfishOS and work fine.