Problems when trying to resize the root partition

So, I’ve been trying unsuccessfully to resize the root partition.
One of the issues that I have is the following:


 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 you continue, this may void your warranty. Are you really SURE? [y/N] y
/dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
/dev/mmcblk0rpmb: read failed after 0 of 4096 at 4128768: Input/output error
/dev/mmcblk0rpmb: read failed after 0 of 4096 at 4186112: Input/output error
/dev/mmcblk0rpmb: read failed after 0 of 4096 at 4096: Input/output error
/dev/mmcblk1: read failed after 0 of 4096 at 0: Input/output error
/dev/mmcblk1: read failed after 0 of 4096 at 62537007104: Input/output error
/dev/mmcblk1: read failed after 0 of 4096 at 62537064448: Input/output error
/dev/mmcblk1: read failed after 0 of 4096 at 4096: Input/output error
/dev/mmcblk1p1: read failed after 0 of 4096 at 62520229888: Input/output error
/dev/mmcblk1p1: read failed after 0 of 4096 at 62520287232: Input/output error
/dev/mmcblk1p1: read failed after 0 of 4096 at 0: Input/output error
/dev/mmcblk1p1: read failed after 0 of 4096 at 4096: Input/output error
2 logical volume(s) in volume group “sailfish” now active
Thu Mar 3 12:53:01 UTC 2022

Type your devicelock code and press [ENTER] key:
(please note that the typed numbers won’t be shown for security reasons)

The second problem would be that the e2fsck -f /dev/sailfish/home reports a ton of issues:
Just one for reference:

/ # e2fsck -f /dev/sailfish/home
e2fsck 1.45.4 (23-Sep-2019)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks…
Superblock has an invalid journal (inode 8).
Clear? cancelled!
e2fsck: The journal superblock is corrupt while checking journal for home
e2fsck: Cannot proceed with file system check

and if I run this with a -y option, these would be fixed, or so it would seem, because after that, the device is locked, because the lock code is no longer valid (hash file messed up during these file system fixes?). I’ve seen this problem in one of other threads here, but there is no definite solution.
So, the following thing I did is to reset the device back to factory state, choosing the option #1 in the recovery menu. That cleared everything alright, but upon another try of e2fsck, the same issues arose. How is that possible, and more importantly, how can I get around this problem?
Thanks!

P.S. I can’t really get a hang of this formatting system in the thread… :confused:
What would be the markup for code/console?

BTW, the guide that I was following was this one:
https://speefak.spdns.de/oss_lifestyle/sailfish-os-systempartition-vergroessern/
It’s in German, but it’s just a rehash of the following guide:
https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-33-increasing-the-root-lvm-volume-size

Which version of SFOS? Are you sure your home volume is not encrypted?

Well, I’ve installed originally 4.2.0.21, but then I upgraded to 4.3.0.15, but after that factory reset, it went back to 4.2.0.21.
Ah, yes, the user data is encrypted. But the recovery always asks for the passcode, so I assumed that should not be an issue. Any way to remove the encryption, and perform the resize?

If I remember correctly the original howto on jolla together also had a section for encrypted devices

Ah okay, will look into it. Thanks!

Yes, the instructions are a bit different for encrypted home.

But aside from home being encrypted, why do you think e2fsck is reporting so many issues with the file system? I’m guessing I should address that first?

I don’t know exactly, but in the resizing guide, you can find the following comment:

When executing the steps of either section 3.3.2 ( a or b ), you may encounter the output (e.g. of a lvm lvresize command):
/dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
This specific error message is harmless and rather a bug.
Mind that any other error message likely constitutes a real error.

2 Likes

Aaahh… Okay, sounds reasonable enough…
Ok, I’m gonna try the procedure for the encrypted devices, and get back once I’m done. Thanks and thanks to @davidrasch

Just a quick update. The guide for the encrypted devices did work, even though there were some of these Input/Output errors reported, which was a bit discerning.
Nevertheless, thank you both @davidrasch and @phklrz, much appreciated!

1 Like

The canonical link for “Guide: Installing SailfishX on Xperias” is this one.

I still maintain it and update it occasionally. Please report issues with this guide at its issue tracker there.

The version at Together.Jolla.com (TJC) is outdated, because the TJC forum was switched to read-only in the year 2020.

Hence you really should use the section 3.3 Increasing the “root” LVM volume size at Gitlab, not the stale one at TJC or the ones from the year 2019 (each only covering a specific, unencrypted device) by Speefak, PCFE or seiichiro0185.

As always: Please do read thoroughly before applying such critical steps.
Mistyping, executing steps in the wrong order etc. may arise the need to perform a “factory reset”, to re-flash or even brick your device.

2 Likes

Oh, okay, I was completely unaware of that guide. These two guides that I’ve mentioned I found just googling around. I guess googles bots aren’t doing their best job… :confused:
Anyway, I’ve managed to resize the partition, didn’t brick the device, didn’t have to re-flash, but did have to wipe the partitions a few times… :relieved:
In any case, thanks for the update!

2 Likes

Does resizing somehow affect data already present on either of the partitions, or are they kept intact?

If you do it correctly, your data should remain intact.

3 Likes

I’ve just successfully resized root to 4 GB. 1,6 GB used and still more than 2,3 GB free on root makes me really happy :smiley:

2 Likes