Resizing root filesystem
-
Documenting my solution here in case anyone is facing the same problem.
Installing Ubuntu Touch on Fairphone 4 will create a root filesystem with almost no free space, making it impossible to install packages. Writing to the root filesystem is not officially supported in Ubuntu Touch and not how it is intended to be used by regular users, but it is needed for example to test things with
ubports-qa
.This may brick your phone, proceed at your own risk
This will wipe your data as reverting to Android is required.
-
The FP4 uses dynamic partitions which must be resized with "userspace fastbootd", which also does not work on Ubuntu Touch on the FP4. Therefore one must first revert to Android. (Install Android 11, keep bootloader unlocked.)
-
Boot to fastbootd.
a. Boot to "bootloader" mode (with the phone powered off, hold volume down and connect USB; this is the usual "fastboot mode"), then runfastboot reboot fastboot
.
b. Alternatively, set up USB debugging and runadb reboot fastboot
. -
When the phone shows the fastbootd menu, manually set up partitioning as required by Ubuntu Touch (refer to the actions listed at https://github.com/ubports/installer-configs/blob/master/v2/devices/FP4.yml#L137).
a.fastboot delete-logical-partition system_ext_a
b. Repeat the above forsystem_ext_b
,product_a
,product_b
,system_b
,vendor_b
,odm_b
.
c.fastboot resize-logical-partition system_a 5368709120
(this is the step we do differently than the installer)
d.fastboot reboot bootloader
-
Run the UBports Installer, select the option to bootstrap and to wipe userdata. Unselect the option to set up partitioning. Install as usual. It should detect your device correctly. It will also prompt you to reboot in bootloader mode but you are already in the correct mode for installation so simply click ok.
-
-
2.b. should read
adb reboot fastboot
-
@artur_ said in Resizing root filesystem:
2.b. should read
adb reboot fastboot
I've edited that for you. You can do that for your own posts, too. Use the menu with the three dots at the bottom right of your posts.