Using recovery to access the root and home file system

asked 2019-03-30 02:02:05 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2019-06-06 00:11:24 +0300

deloptes gravatar image

I write this in the hope that it will help someone (most probably a hacker spirit) and save some time and headache.

I have Sailfish Xperia X. After upgrading, I did some changes to couple of files. Unfortunately I mistyped something in one of the files (of course I did a backup like <filename>.bkp) but after reboot the gui was gone - only light grey screen and no interaction. Factory reset being the last option, I found following articles very useful</filename>

https://jolla.zendesk.com/hc/en-us/articles/360002996893-Xperia-X-devices-How-to-use-the-Recovery-Mode

https://jolla.com/sailfishx-linux-instructions/

https://jolla.zendesk.com/hc/en-us/articles/204709607#3

So in sum what needs to be done is following:

Force your Xperia to fastboot mode:

  • hold Volume Up key down and connect USB cable
  • ensure that the LED at the top of the display area is lit in BLUE colour (if not disconnect cable, release the key and try again)

From the Sailfish directory execute the command:

sudo fastboot boot hybris-recovery.img

This brings up the RNDIS interface on your PC, so one could connect to the phone from a terminal

38: enp0s29u1u6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b2:0a:6b:09:bd:9d brd ff:ff:ff:ff:ff:ff
    inet 10.42.66.67/29 brd 10.42.66.71 scope global dynamic enp0s29u1u6

When in recovery mode select shell or ssh and if ssh login from other terminal

$ telnet 10.42.66.66
-----------------------------
     Jolla Recovery v2.0
-----------------------------
Welcome to the recovery tool!
The available options are:
1) Reset device to factory state
2) Reboot device
3) Shell
4) Perform file system check
5) Run sshd
6) Exit
Type the number of the desired action and press [Enter]:
3

If logical volume is not present, you need to run lvm lvchange -ay to enable the logical volume holding the root and home file systems

After mounting the root

mount /dev/mapper/sailfish-root /mnt

I was then able to solve my problem and reboot.

Special thanks to all the people making this possible.

Really appreciated!

edit retag flag offensive close delete