…on an unencrypted XA2+. The 4.5 recovery image is available and I would like to tackle the problem as suggested by nthn ([Release notes] Sauna 4.6.0.11 - #176 by nthn).
To uninstall the callrecorder and the OSM scout server with rpm -e I first have to chroot and mount. I would also like to back up the /home folder to my unmounted sdcard if possible.
Since Sailfish 4.0 the sdcard should actually be located here "/run/media/nemo/uuid (yes, my user is still nemo, so I would like to restore the system and not reflash it). Ergo I enter in the shell of the restore menu:
chroot /rootfs and
mount /dev/mapper/sailfish-home /mnt
I don’t know how to mount my SD card. I don’t think I can get any further with "mount /dev/mmcblk1p1 /mnt. But could ha have a look at what is in /dev. If I could somehow get these problems under control with you, it would be my turn to copy /home. Because of the symlinks I don’t know what would be better cp or a backup image with dd. I am not a Linux freak - but I would be happy if you could help me.
This is what I did first, in that order:
cryptsetup open /dev/mapper/sailfish-home myhome
mount /dev/mapper/myhome /rootfs/home
chroot /rootfs
After that you can check with fdisk -l
* which partition your sd card is (most likely /dev/mmcblk1p1
) and mount it to any empty, unused folder. E.g. /media/sdcard1
.
BTW you might want to add this thread to this wiki: https://forum.sailfishos.org/t/post-festum-sauna-4-6/
And thanks for the hint, I didn’t think to look at the developer release thread to fix my own botched upgrade.
* oops, fdisk -l
does not work inside the chroot but blkid
does.
I have now backed up my /home and tried to uninstall callrecorder and the OSM scout server. Both were not installed on my system.
~ # rpm -e --noscripts harbour-callrecorder
error: package harbour-callrecorder is not installed
~ # rpm -e --noscripts osm-scout-server
error: package osm-scout-server is not installed
~ #
I also looked under /usr/share/applications.
First of all, I have made adjustments to your suggestions, as I have a non-encrypted system. I don’t have the /rootfs directory either. /home is directly in the root. So I mounted that. Here are the commands for an unencrypted system:
chroot /rootfs
mount /dev/mapper/sailfish-home /home
If you now want to copy /home to your SD card, I have done the following.
mkdir -p /mysdcard
mount /dev/mmcblk1p1 /mysdcard
To check how large /home is:
du -hsc ./home
Then the following (setting up a directory and copying it over):
mkdir /mysdcard/Phone
cp -apr ./home /mysdcard/Phone/
ls -al /mysdcard/Phone
Now I have to follow the instructions from nthn (link above). A ~ # cd /home/.pk-zypp-dist-upgrade-cache resulted in the following:
/home/.pk-zypp-dist-upgrade-cache # ls
packages raw solv
/home/.pk-zypp-dist-upgrade-cache #
There are 18 subdirectories in packages alone, not all of which look like system directories. Unfortunately I have a visitor now, so I have not yet been able to examine the other directories - perhaps rpm’s from 4.6 have already been deleted. I just wanted to record the status quo here.
If you have zypper installed, you can try following (saved me once from failed 3.4 update):
[root@Sailfish nemo]# mv /var/cache/zypp /var/cache/zypp-old
[root@Sailfish nemo]# ln -s /home/.pk-zypp-dist-upgrade-cache /var/cache/zypp
[root@Sailfish nemo]# zypper dup
[root@Sailfish nemo]# rm /var/cache/zypp
[root@Sailfish nemo]# mv /var/cache/zypp-old /var/cache/zypp
[root@Sailfish nemo]# reboot
Alternative_1
Thanks for the tip. Since my error description “4x” a bright screen with “no apps started” is the same as nthn’s solution description, I had reinforced it. Unfortunately, I realized that I hadn’t installed the offending apps at all - so the only option before reflashing was to try and see if I could get lucky. However, as I only had 1.8 GB free on /home and 3.2GB on /root this time, I wanted to clean up a bit before perhaps just trying “sfos-upgrade”.
So here’s my question: Can I delete everything in “/home/.pk-zypp-dist-upgrade-cache” and in “.zypp-cache”?
Alternative_2 according to nthn:
Since there are a lot of subdirectories in /home/.pk-zypp-dist-upgrade-cache in the 3 directories (packages, raw, solv) (also only from developer repositories of many apps, which then of course have nothing to do with the system), I would like to know in which directories the system rpm’s are located.
Shoot, I just saw that you can recognize the correct subdirectories by the date.
For example, the app directory looks like this:
~ # ls -al /home/.pk-zypp-dist-upgrade-cache/packages/apps/apps/armv7hl
total 1152
drwxr-xr-x 2 root root 4096 Jun 19 23:11 .
drwxr-xr-x 4 root root 4096 May 14 2021 ..
-rw-r--r-- 1 root root 147904 Jun 19 23:11 jolla-calendar-1.1.15.1-1.13.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 162429 Jun 19 23:11 jolla-email-1.1.43-1.12.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 86916 Jun 19 23:11 jolla-email-settings-1.1.43-1.12.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 209596 Jun 19 23:11 jolla-mediaplayer-1.3.13-1.7.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 77305 Jun 19 23:11 jolla-notes-1.0.24-1.6.3.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 40035 Jun 19 23:11 jolla-notes-settings-1.0.24-1.6.3.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 59361 Jun 19 23:11 libjollamediaplayer-1.3.13-1.7.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 81783 Jun 19 23:11 sailfish-components-calendar-qt5-1.1.15.1-1.13.1.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 230741 Jun 19 21:40 sailfish-office-1.6.8-1.8.3.jolla.armv7hl.rpm
-rw-r--r-- 1 root root 54553 Jun 19 23:11 sailfish-utilities-0.1.22-1.9.1.jolla.armv7hl.rpm
~ #
…then I know what @nthn means. All but 1 package (Jun 19 21:40) have the date of the upgrade attempt. But the date of 21:40 is also correct, as I had interrupted the upgrade process.
This is of course hard work - the question of alternative_1 remains: Can I delete all the contents of the cache directories before I try “sfos-upgrade”?
Instead of deleting, just rename them?
You know how to get in via recovery if the need should arise?
There are only these two alternatives for me. Either I try it the way nthn does (see above), in which case I have to create a
find -name \*rpm | xargs rpm -Uvh
in each subdirectory. A certain sequence must be followed. You therefore have to find out by trial and error which directory to install first.
The “packages” subdirectory alone has 13 subdirectories containing upgrade rpm’s.
The other two directories will certainly look the same. This procedure is therefore very, very tedious until you have found the correct sequence.
The other alternative is to delete the cache update files to free up space. Renaming them doesn’t help - or what do you think?
I am already in the shell of the recovery (point 3 in the menu) and would then use a
/usr/bin/sfos-upgrade
That would just be another attempt at try and error. I also don’t know whether I can even start this in the recovery shell.
Sorry, I had a brainfart. Please disregard.