I agree completely - I have done this a couple of times on my Xperia X (F5122), and it is the best way to do it (by that I mean that it isn’t a hack that may cause problems later, but keeps consistency with with the way that the filesystems are set up to begin with). If you want some more background on what is going on before following the instructions, search for something like “LVM guide”. The diagram and explanations here may be helpful.
I really would like to have an option (shell script?) to do this automatically from Linux computer similar to the flash process! The commands from the gitlab link (above) seems too complex for me.
Thanks to @oroesler, I tested this Extend SailfishOS rootfs with a hidden, unused partition.-Oskar Roesler’s Blog on my XA2.
It is great.
Before:
Instructions in terminal:
pvcreate /dev/disk/by-partlabel/system_a
vgextend sailfish /dev/disk/by-partlabel/system_a
#If you get messages similar to this:
#/dev/mmcblk0rpmb: read failed after 0 of 4096 at 4186112: Input/output error
#Don’t worry.
lvextend sailfish/root -l +100%Free
resize2fs /dev/mapper/sailfish-root
Done!
Result:
Read the article carefully though, as I suppose one can totally ruin their installation.
Edit:
It was under 4.4.0.? though.
I didn’t try on 4.5.0.18 as room is sufficient atm.
The only downside is that cloning phones with dd to have a backup one is not working with this trick.
edit: another downside is that SFOS can’t be reflashed without to reflash Android first.
Yes, but he biggest downside is as mentioned in the blog entry:
“Additionally, you won’t be able to reflash SailfishOS without reflashing Android first.”
As Jolla’s new mantra since SailfishOS 4 is “it does not matter if upgrading SailfishOS is unstable and tends to break an SailfishOS installation, because reflashing is so easy” (as stated by Jovirkku multiple times here at FSO), I perceive this as a significant drawback; much more than simple cloning via dd
cannot work, because the LVM root volume is distributed across two partitions. BTW, backing up on file-system level via tar
requires more knowledge and understanding but is superior to trivial backing up on block device level via dd
.
Yes, thank you, I forgot that.
I was re-reading it and wanted to add it right away.
Also, I wanted to add the article on the wiki.
Superior than backing up with dd, you mean?
This is impossible, these actions technically must be performed at the recovery console, which can be operated from your Linux computer via an USB cable.
Basically you are asking for someone else to take the responsibility for executing a few critical commands: This cannot work, because all responsibility for using Free Software (= “Open Source Software”) is always on the user.
The commands from the gitlab link (above) seems too complex for me.
You stated this multiple times, but never mentioned what appears to be “too complex for you”. I cannot think of anything simpler than the current step-by-step guide, but am sure open to any specific suggestions how to improve it.
As stated before, if you really do something wrong (performing steps in the wrong order, significantly mistype commands etc.) usually you will see error messages indicating your wrong-doing, but at worst you have to re-flash SailfishOS, so backup your data first (as always with such low-level LVM and filesystem changes). “Bricking your device” is basically impossible with these actions (as I also stated before when you expressed this fear of yours elsewhere at FSO), but I will never say “never”, because I have no idea what ideas users have to do things differently (i.e., wrong).
If you are so afraid, but OTOH so keen on gaining more space on your root volume, why don’t you try on a non-production device (an old Xperia X is fully sufficient for that).
If you mean my “Guide: Installing SailfishX on Xperias” or specific parts of it, I am glad, if you link to it (for specific parts, the links in the “Table of content” are suitable), but strongly oppose copying any content: Any copied content will be outdated (“stale”) from the moment you copy it! You will not be able to keep up with changes, because the mechanisms to notify you about changes are weak and it is tedious, completely superfluous work to copy every new change (and again, and again, and …). To avoid copying content is one of the principal reasons why web-links have been invented.
Nono, I meant: to point to the wiki’s book about expanding root partition, which contains oroesler’s method.
But maybe you could make a link to your guide in this subsection?
And I’d be interested and curious if you want/have time to elaborate about tar backup method. Maybe here, where you began to talk about it?
No, I will not link to stuff, which …
- I have not quality assured personally: i.e., practically tested multiple times.
- has obvious and significant drawbacks over the solution I present and use: i.e., is inferior from my perspective.
- is not a generic solution: i.e., only works on specific devices, which does not fit to a guide for all devices SailfishX supports.
- I have no idea how long it is maintained: Most guides become unmaintained after a couple of months, in contrast to mine (multiple ones), which undergo regular maintenance since their inceptions (starting 2017). I also usually mark information as outdated or not covering newer devices, which most guides by others do not.
It does not make any sense to duplicate information further and further (it usually does not become any better by doing so): Search the WWW, this is common knowledge for more than 35 years. My intention was only to indicate that.
Alternatively (and better suited for command line beginners) use a backup software specifically designed for this purpose, as restic
or many others.
A misunderstanding which sticks… I am sorry if my English is involved.
I meant I wanted to add in my first post on this thread, a link to, not only oroesler blog, but also to his wiki. (Or even better, replace the link to his blog by a link to his wiki, so users discover it and also can access/add other informations).
Then, I meant that you could add a link into the wiki, pointing to your guide. (not in your guide to the wiki).
So, people would have more chances to discover your article.
Regarding tar
, what I am interested to know - and I searched on the forum and in your guide to check if you already wrote about that - is not how tar works, but from where you use it in SFOS and what you do backup.
Do you backup /home
directory or the whole filesystem with tar?
From where do you achieve this: Terminal while the device is running or from recovery console, or as root within a second user while your regular user is not used? ect.
I meant a script running on the Linux computer while the phone is connected as you wrote.
edit: similar to the flashing script.
I will do so for training.
IMHO rather the lack of context, i.e. writing too tersely (which ultimately results in writing much more, than being concise in the first place).
I meant I wanted to add in my first post on this thread, a link to, not only oroesler blog, but also to his wiki. (Or even better, replace the link to his blog by a link to his wiki, so users discover it and also can access/add other informations).
Do as you like, I cannot see how or why this would involve me.
Then, I meant that you could add a link into the wiki, pointing to your guide. (not in your guide to the wiki).
Again: Do as you like, why do you try to involve me? Everybody is welcome to link to my guides (I just oppose copying anything from them without having a sustainable maintenance concept).
Regarding
tar
, what I am interested to know - and I searched on the forum and in your guide to check if you already wrote about that - is not how tar works, but from where you use it in SFOS and what you do backup.
- “How it works”: Do read its
man page
thoroughly, even if you are not interested. - “from where you use it in SFOS and what you do backup”: As with any other Linux or UNIX installation.
- “Do you backup
/home
directory or the whole filesystem with tar”: This is the same! Do as it fits best for you. Usually I backup both file-systems of a SailfishOS installation:/
and/home
- “From where do you achieve this: Terminal while the device is running or from recovery console,”: If you would have searched the WWW for
tar backups
, you know that single-user mode is only necessary for restoring (often, but not always), only in corner cases for creating backups. - “as root within a second user while your regular user is not used?”: Better do not use
tar
for backups, if that is a serious question (see alsotar
man-page) and basic UNIX user concepts are not well understood.
TL;DR:I am not your interactive UNIX guide, I feel abused by repeatedly trying to achieve that.
Ok, understood. Thank you for detailing and my apologies for the time waste.
Thank you, everyone who replied here!
I’d like to put that in relation to the available free space rather than the size of the volume.
A few 10 MB here and there adds up to 435 MB, which would roughly amount to an 80% increase in free space for me. That would get me over the upgrade threshold by a significant margin.
Well, that’s not me Instead I decided to ditch App Support plus MLS, OSM Scout Server (map data were already on the SD card) and Pure Maps.
I failed uninstalling syncthing, because pkcon remove
claimed that the package reported to be installed by pkcon search
wasn’t installed after all
This gathered enough space to upgrade all the way to 4.5.0.19. So mission accomplished, in a sense. I will not restore all the stuff I removed, but make a clean-slate start by flashing the latest release and expanding the root partition.
I’ve set up a new phone using @olf’s guide and am in the process of migrating. This comes with some issues (nemo/defaultuser, failing .ics
export/import) that I want to resolve before flashing the Xperia X.
Again, thank you for all the knowledge shared here!
[Edit to properly tag @olf]
Before every upgrade i check/delete/uninstall the following to gain 500MB free space.
Check: /opt/alien/usr/share
CHUM
mimic
Osmscout
Bassoon Tracker
Unistall from Storeman
rpncalc
Jupii