Tried to update doesnt boot aynmore

Im following How to copy data from Home to SD card in Recovery Mode (Jolla 1) whereas the article supposed to be for my phone (Xperia X) is only about reverting to a factory reset (and no recovery !!) Xperia-X-devices-How-to-use-the-Recovery-Mode

So, following how to backup data in recovery mode, Im stopped by:

mount -o subvol=@home /dev/mmcblk0p28 /myhome/
mount: mounting /dev/mmcblk0p28 on /myhome/ failed: Invalid argument

mount -t btrfs -o subvol=@home /dev/mmcblk0p28 /myhome
mount: mounting /dev/mmcblk0p28 on /myhome/ failed: Invalid argument

while myhome exists.

$ dmesg
EXT4-fs (dm-0): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (dm-0): couldn't mount as ext2 due to feature incompatibilities
EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
EXT4-fs (mmcblk0p28): Unrecognized mount option "subvol=@home" or missing value

what would that mean for the recovery? Any other suggestions?

The commands you cite are from the Jolla1 guide. Jolla 1 in the official image uses BTRFS instead of Ext4 for /home. Other devices do not use BTRFS and use different commands. Also, the storage devices are different depending on device and OS image.

The error messages and dmesg reflect your use of incorrect commands.

Which device and OS image are you using?

1 Like

As cited above: Xperia X. PC OS Linux (Ubuntu 18.04LTS)
SFOS Image: Sailfish_OS-Jolla-3.4.0.24-f5121-0.2.1.58

Ah sorry, I only looked in the top bug report where it’s not present.

Anyway, forget btrfs on Sailfish-X. It’s ext4-on-LVM on those devices, and often luks-encrypted on top of that. (I believe there are some Community edition images where versions for either btrfs or ext4 exist for the same device, but that shouldn’t be relevant here.)

So you do the same thing again, in recovery you select the shell. You can use the filesystem check option before, because it’s output will show you the correct device where your home is located.

If unencrypted, there should be a /dev/mapper/sailfish-home device you can mount as ext4.
If encrypted, you will have to

cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home

first, and then mount the /dev/mapper/crypt-home device.

So in effect

mount -vv -t ext4 -o ro /dev/mapper/sailfish-home /myhome
or
mount -vv -t ext4 -o ro /dev/mapper/crypt-home /myhome

1 Like

I thought this is the way of declaring it:

The filesystem check I had made output:

root: ***** FILE SYSTEM WAS MODIFIED ****** .

after it the Shell option is showing:

> /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
> 2 logical volume(s) in volume group “sailfish” now active
*> *
> WARNING: Locking directory /run/cryptsetup is missing!

so the correct command would be the one you suggested

mount -vv -t ext4 -o ro /dev/mapper/sailfish-home /myhome

However, whats next? saving the data and than factory reset? Or maybe I dont need to make any factory reset ?

Btw. why cant I find a command to make a backup from the command line ?

Well I can’t really tell you what to do no next as I’m not quite sure what’s broken precisely.

You are now in a position to, for example:

  • backup/save whatever data you have on your /home to the SD card (if inserted and mounted). This will have to be done manually using tar and friends, there is no ready-made script to do it.
  • change your /etc/systemd/journald.conf file from volatile to persistent storage. This can be used to see what is actually failing when the device tries to boot. see also here
  • using chroot, enter the SailfishOS filesytem proper and e.g. remove RPMs that are known to cause prolbems. like here. There’s a couple of possible candidates from OpenRepos that can cause boot to fail or apparently to fail.
  • using chroot, manually install or reinstall RPMs you know have failed to install correctly.
  • any amount of other tricks to fix broken things.

Note these are just examples.

I would try the systemd thing first, edit the file to persistent, create the log file location, and reboot the device again. After it failed, go into recovery mode again, and inspect the log files created at the log file location. Maybe even copy it to SD card for easier viewing/pastebin etc.

2 Likes

I cannot find calendar, contacts, call history, sms, notes and tasksl. They must be stored in a database in this case? Which db is the possible candiate?

  • .phonehook/phonehook.db # ?!? contacts
  • .local/share/commhistory/commhistory.db # ?!? call history

But for the rest of the stuff, I have no clue where to find them.

There is no /etc/systemd in my sailfish-home. Do I have to remount to rootfs?!?

Sounds like you have Phonehook installed, it is one of the apps known to break the system on 3.4 update. Try removing it with rpm -command (rpm -e [packagename] if I recall correctly) and test if the phone boots normally after that.

Use chroot /rootfs before trying to do these things.

1 Like

Agreed, this is probably the single source of your booting problem.

Specifically:

  1. do the recovery mode thing
  2. go into shell
  3. mount /rootfs read-write if it isn’t (not sure): mount -oremount,rw /rootfs
  4. chroot into rootfs: chroot /rootfs /bin/sh
  5. remove boot-breaking RPMs: rpm --erase --noscripts phonehook
  6. also erase any other apps which are known to cause problems: harbour-defender, any overlay apps like tint-overlay, battery-overlay, also collectd and systemdatascope, possibly others.
    (You can to a rpm -qa | grep <name> to find the correct package name, rpm -qa will list ALL installed packages).
  7. optionally do the journald.conf modification
  8. exit the chroot again using exit or Ctrl-D
  9. exit the recovery shell
  10. reboot
  11. Hopefully enjoy an unborked system
2 Likes

For contacts, you can try /usr/bin/contacts-tool, but I’m not sure this works in the recovery chroot. I think this will include call history. It’s still a good idea to backup the commhistory.db itself.
For SMS, there is a script here, but I haven’t tried it with a recent release.

Im seeing a lot of erros while booting. What kind of errors might be significant?

  • Sailfish start_alien.sh[3988]: /system/genv/bin/alien_bridge_server: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory
    • installed is libicu-66.1+git2-1.4.2.jolla.arm
  • Sailfish kernel: i2c-msm-v2 7af6000.i2c: NACK: slave not responding, ensure its powered: msgs(n:1 cur:0 tx) bc(rx:0 tx: 4) mode:FIFO slv_addr:0x28 MSTR_STS:0x0d1300c8 OPER:0x00000090
  • Sailfish lipstick[4966]: [F] unknown:0 - QPA-HWC: There can only be one window, someone tried to create more. in createNativeWindow
    Failed to start The lipstick UI.

Life could have been easier …
error: package phonehook is not installed

I also did
rpm --erase --noscripts patchmanager
but reboot didn’t work either.
(it was removed however, because the recovery mode when starting in a shell mode, complained about:
ERROR: ld.so: object '/usr/lib/libpreloadpatchmanager.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
to resolve it I did:
#remove the dodgy preload
rm /etc/ld.so.preload
)

What does this mean at all?

Mine hope goes towards resolving the log errors from above.

1 Like

Might be that the package name of Phonehook is something different than just phonehook. Find the proper package name of the phonehook with rpm -qa | grep phonehook and use that name for the erase-command.

Try installing zypper and linking the /home/.pk-zypp-dist-upgrade-cache to /var/cache/zypp and do su zypper dup to see if that fixes the problem.

I couldnt find anything similar to it.

How is it supposed to install a package in recovery mode ?

Could be also Phonehook or some other variant, it is case sensitive. To install packages in recovery mode you need to have the .rpms on SDCard or SSH them to the phone and then install them with rpm -command

Do you have a link for me? Which version do I need? And why zypper could fix the problem?

Does anybody know what

  • tracker-miner-fs 1)
  • messageserver5 2)

are ?

1 )
Failed to start Tracker metadata database store and lookup manager.
tracker-store.service: Failed with result 'exit-code'.
tracker-miner-fs.service: Failed with result 'exit-code.
2)
messageserver5.service: Failed with result 'exit-code'.

I did try, but:
[root@(none) /]# zypper dup
Medium not attached: plugin:/ssu?repo=adaptation0

Did I miss something?

Tracker ist the indexing tool which among other things presents pictures to gallery, music files to the media app and so on. It shouldn’t fail, but I guess it failing is non-critical.

messageserver5 is the service dealing with SMS and other messages. That’s pretty much a core function.

It does sound like the update didn’t finish and the system is “half-updated” at the moment.

Unless you have a very good reason you want to recover from this state, I’d just reset to factory settings from recovery mode and start anew. Poking around and fixing things is probably going to take more time than starting anew.

But before that, do you have the following files?

/var/log/systemboot.log
/var/log/systemupdate.log
/var/log/zypp/history

Can you put them, and the journal output, on pastebin or some such site so we can look at them in full?

Running the script, ended with the following error:
sqlite3: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory
This error is quite common in the journalctrl. Someone linked .66 to .63 to circumvent the problem. I cannot judge which implications follow linking it like this?

/usr/bin/contacts-tool list
doesnt produce any output unfortunatley

The good reason is saving my stuff. If I would be able to save my

How about this error? It seems to be a problem one… Has anybody solved it… except for @blizzz here ?

Now is only 3 times

Here the pastebin logs

I would appreciate, if somebody gives an answert to the post above as well.

For me in the update limbo-state the pkcon update just complained Failed to contact PackageKit: Could not connect: Connection refused and because there was no Internet-connection, version --dup would wait for eternity in REFRESHING CACHE AND DOWNLOADING PACKAGES.

But zypper worked and could finish the incomplete dist-update, so maybe it can help you also. Install at least zypper from these links and if it complains about missing depencies, download install them as well:

https://releases.jolla.com/releases/3.4.0.24/jolla/armv7hl//core/armv7hl/zypper-1.14.6+git4-1.5.1.jolla.armv7hl.rpm
https://releases.jolla.com/releases/3.4.0.24/jolla/armv7hl//core/armv7hl/augeas-libs-1.12.0+git2-1.5.1.jolla.armv7hl.rpm
https://releases.jolla.com/releases/3.4.0.24/jolla/armv7hl//core/armv7hl/readline-8.0+git1-1.4.1.jolla.armv7hl.rpm

Copy them to you phone, if you phone has encrypted /home-partition command following (other if no enctyption, skip to next step):

cryptsetup luksOpen /dev/sailfish/home whatever
mount /dev/mapper/whatever /rootfs/home

Then use chroot /rootfs and install zypper with rpm -Uvh /path/to/the/zypper-rpms/*.rpm -command.

Now command following commands:

mv /var/cache/zypp /var/cache/zypp-old
ln -s /home/.pk-zypp-dist-upgrade-cache /var/cache/zypp
su
zypper dup
rm /var/cache/zypp
mv /var/cache/zypp-old /var/cache/zypp

and then reboot your phone to see if it worked.

2 Likes

my problem seems to be different than yours