apt fails to install package duo to the lack of space and "read-only filesystem"
-
A fresh installation of UT 20.04 OTA-7 (Kernel 4.14.188) on top of MIUI 12.0.3.0 (as recommended) on Redmi Note 9S (Curtana) 128G/6G model starts with
apt --fix-broken install -y Reading package lists... Building dependency tree... Reading state information... Reading package lists... Building dependency tree... Reading state information... Correcting dependencies... Done The following additional packages will be installed: libqt5webenginecore5 lomiri-system-settings morph-browser ofono-sailfish Suggested packages: dbus-property-service The following packages will be upgraded: libqt5webenginecore5 lomiri-system-settings morph-browser ofono-sailfish 4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 37 not fully installed or removed. Need to get 0 B/38.3 MB of archives. After this operation, 28.7 kB disk space will be freed. (Reading database ... 58923 files and directories currently installed.) Preparing to unpack .../lomiri-system-settings_1.0.2+0~20250103193628.4+ubports20.04~1.gbp88d1d4_arm64.deb ... Unpacking lomiri-system-settings (1.0.2+0~20250103193628.4+ubports20.04~1.gbp88d1d4) over (1.0.2+0~20241118132006.2+ubports20.04~1.gbp85ad55) ... dpkg: error processing archive /var/cache/apt/archives/lomiri-system-settings_1.0.2+0~20250103193628.4+ubports20.04~1.gbp88d1d4_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/lomiri-system-settings-datahome-migration.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/lomiri-system-settings-datahome-migration.sh'): Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/usr/share/session-migration/scripts/lomiri-system-settings-datahome-migration.sh': Read-only file system Preparing to unpack .../libqt5webenginecore5_5.15.17+ubports-0ubports1+0~20241130061241.34+ubports20.04~1.gbp59f037_arm64.deb ... Unpacking libqt5webenginecore5:arm64 (5.15.17+ubports-0ubports1+0~20241130061241.34+ubports20.04~1.gbp59f037) over (5.15.17+ubports-0ubports1+0~20240710053755.33+ubports20.04~1.gbpaa7865) ... dpkg: error processing archive /var/cache/apt/archives/libqt5webenginecore5_5.15.17+ubports-0ubports1+0~20241130061241.34+ubports20.04~1.gbp59f037_arm64.deb (--unpack): cannot copy extracted data for './usr/lib/aarch64-linux-gnu/libQt5WebEngineCore.so.5.15.17' to '/usr/lib/aarch64-linux-gnu/libQt5WebEngineCore.so.5.15.17.dpkg-new': failed to write (No space left on device) dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Preparing to unpack .../morph-browser_1.1.0+0~20241130183815.3+ubports20.04~1.gbp19319b_arm64.deb ... Unpacking morph-browser (1.1.0+0~20241130183815.3+ubports20.04~1.gbp19319b) over (1.1.0+0~20241111200040.2+ubports20.04~1.gbp015483) ... dpkg: error processing archive /var/cache/apt/archives/morph-browser_1.1.0+0~20241130183815.3+ubports20.04~1.gbp19319b_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/morph-browser-name-change.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/morph-browser-name-change.sh'): Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/usr/share/session-migration/scripts/morph-browser-name-change.sh': Read-only file system Preparing to unpack .../ofono-sailfish_1.29+git8-0ubports1~20250106162152.2~95520b4+ubports20.04_arm64.deb ... Unpacking ofono-sailfish (1.29+git8-0ubports1~20250106162152.2~95520b4+ubports20.04) over (1.29+git8-0ubports1~20240527210340.1~66073d0+ubports20.04) ... dpkg: error processing archive /var/cache/apt/archives/ofono-sailfish_1.29+git8-0ubports1~20250106162152.2~95520b4+ubports20.04_arm64.deb (--unpack): unable to create '/etc/ofono/main.conf.dpkg-new' (while processing './etc/ofono/main.conf'): Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/etc/ofono/main.conf': Read-only file system dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/lomiri-system-settings_1.0.2+0~20250103193628.4+ubports20.04~1.gbp88d1d4_arm64.deb /var/cache/apt/archives/libqt5webenginecore5_5.15.17+ubports-0ubports1+0~20241130061241.34+ubports20.04~1.gbp59f037_arm64.deb /var/cache/apt/archives/morph-browser_1.1.0+0~20241130183815.3+ubports20.04~1.gbp19319b_arm64.deb /var/cache/apt/archives/ofono-sailfish_1.29+git8-0ubports1~20250106162152.2~95520b4+ubports20.04_arm64.deb
system partition is mounted as [Read-Write] through
UT Tweak Tool
.Here's the output of disk, partition and volume spaces and mount points, hope it's useful:
mount | grep 'on / ' /dev/mapper/system on / type ext4 (rw,realtime,errors=remount-ro,data=ordered)
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 512.4M 1 loop /var/lib/lxc/android/rootfs sda 8:0 0 114.9G 0 disk ├─sda1 8:1 0 8K 0 part ├─sda2 8:2 0 32M 0 part /var/lib/lxc/android/rootfs/mnt/vendor/persist ├─sda3 8:3 0 1M 0 part ├─sda4 8:4 0 512K 0 part ├─sda5 8:5 0 512K 0 part ├─sda6 8:6 0 128M 0 part ├─sda7 8:7 0 1G 0 part ├─sda8 8:8 0 128M 0 part ├─sda9 8:9 0 128M 0 part ├─sda10 8:10 0 64K 0 part ├─sda11 8:11 0 64K 0 part ├─sda12 8:12 0 16M 0 part /var/lib/lxc/android/rootfs/metadata ├─sda13 8:13 0 384M 0 part ├─sda14 8:14 0 384M 0 part ├─sda15 8:15 0 16M 0 part ├─sda16 259:0 0 8M 0 part ├─sda17 259:1 0 8G 0 part └─sda18 259:2 0 104.7G 0 part /userdata sdb 8:16 0 8M 0 disk ├─sdb1 8:17 0 7M 0 part └─sdb2 8:18 0 128K 0 part sdc 8:32 0 8M 0 disk ├─sdc1 8:33 0 7M 0 part └─sdc2 8:34 0 128K 0 part sdd 8:48 0 128M 0 disk ├─sdd1 8:49 0 104K 0 part ├─sdd2 8:50 0 128K 0 part └─sdd3 8:51 0 1M 0 part sde 8:64 0 4G 0 disk ├─sde1 8:65 0 512K 0 part ├─sde2 8:66 0 4M 0 part ├─sde3 8:67 0 512K 0 part ├─sde4 8:68 0 256M 0 part /var/lib/lxc/android/rootfs/vendor/firmware_mnt ├─sde5 8:69 0 1M 0 part /var/lib/lxc/android/rootfs/vendor/bt_firmware ├─sde6 8:70 0 4M 0 part ├─sde7 8:71 0 32M 0 part ├─sde8 8:72 0 8M 0 part ├─sde9 8:73 0 32M 0 part /var/lib/lxc/android/rootfs/vendor/dsp ├─sde10 8:74 0 512K 0 part ├─sde11 8:75 0 512K 0 part ├─sde12 8:76 0 512K 0 part ├─sde13 8:77 0 128K 0 part ├─sde14 8:78 0 64K 0 part ├─sde15 8:79 0 2M 0 part ├─sde16 259:3 0 2M 0 part ├─sde17 259:4 0 512K 0 part ├─sde18 259:5 0 4M 0 part ├─sde19 259:6 0 512K 0 part ├─sde20 259:7 0 256M 0 part ├─sde21 259:8 0 1M 0 part ├─sde22 259:9 0 4M 0 part ├─sde23 259:10 0 32M 0 part ├─sde24 259:11 0 8M 0 part ├─sde25 259:12 0 32M 0 part ├─sde26 259:13 0 512K 0 part ├─sde27 259:14 0 512K 0 part ├─sde28 259:15 0 512K 0 part ├─sde29 259:16 0 128K 0 part ├─sde30 259:17 0 64K 0 part ├─sde31 259:18 0 2M 0 part ├─sde32 259:19 0 2M 0 part ├─sde33 259:20 0 4K 0 part ├─sde34 259:21 0 1M 0 part ├─sde35 259:22 0 256K 0 part ├─sde36 259:23 0 8M 0 part ├─sde37 259:24 0 32.7M 0 part ├─sde38 259:25 0 4K 0 part ├─sde39 259:26 0 1M 0 part ├─sde40 259:27 0 8M 0 part ├─sde41 259:28 0 2M 0 part ├─sde42 259:29 0 64M 0 part ├─sde43 259:30 0 128K 0 part ├─sde44 259:31 0 32K 0 part ├─sde45 259:32 0 32K 0 part ├─sde46 259:33 0 512K 0 part ├─sde47 259:34 0 28K 0 part ├─sde48 259:35 0 512K 0 part ├─sde49 259:36 0 1M 0 part ├─sde50 259:37 0 64K 0 part ├─sde51 259:38 0 128M 0 part ├─sde52 259:39 0 24M 0 part ├─sde53 259:40 0 64K 0 part ├─sde54 259:41 0 24M 0 part └─sde55 259:42 0 128M 0 part sdf 8:80 0 128M 0 disk ├─sdf1 8:81 0 104K 0 part ├─sdf2 8:82 0 2M 0 part ├─sdf3 8:83 0 2M 0 part ├─sdf4 8:84 0 10M 0 part └─sdf5 8:85 0 128K 0 part zram0 254:0 0 3G 0 disk
df -h Filesystem Size Used Avail Use% Mounted on udev 2.2G 932K 2.2G 1% /dev tmpfs 557M 4.2M 553M 1% /run /dev/sda18 103G 156M 98G 1% /userdata /dev/mapper/system 2.9G 2.9G 40M 99% / /dev/loop0 512M 486M 16M 97% /android tmpfs 2.8G 4.0K 2.8G 1% /etc/fstab tmpfs 2.8G 8.0K 2.8G 1% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 2.8G 0 2.8G 0% /sys/fs/cgroup tmpfs 2.8G 0 2.8G 0% /media tmpfs 2.8G 48K 2.8G 1% /tmp tmpfs 2.8G 0 2.8G 0% /var/lib/openvpn/chroot/tmp tmpfs 2.8G 0 2.8G 0% /var/lib/sudo /dev/mapper/vendor 1.2G 1.2G 0 100% /android/vendor /dev/sda12 12M 72K 11M 1% /android/metadata /dev/sde4 256M 128M 128M 50% /android/vendor/firmware_mnt /dev/sde9 28M 21M 6.7M 76% /android/vendor/dsp android_mnt 2.8G 0 2.8G 0% /mnt /dev/sda2 27M 2.4M 24M 9% /mnt/vendor/persist /dev/sde5 64M 848K 64M 2% /android/vendor/bt_firmware android_apex 2.8G 0 2.8G 0% /android/apex halium-overlay-devices 2.9G 2.9G 40M 99% /etc/deviceinfo/devices halium-overlay-ofono 2.9G 2.9G 40M 99% /etc/ofono halium-overlay-device-configs 2.9G 2.9G 40M 99% /usr/share/repowerd/device-configs workaround-session-migration-mtime 2.8G 48K 2.8G 1% /usr/share/session-migration/scripts tmpfs 557M 68K 557M 1% /run/user/32011
parted -l Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sda: 123GB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 32.8kB 8192B ssd 2 32.8kB 33.6MB 33.6MB ext4 persist 3 33.6MB 34.6MB 1049kB misc 4 34.6MB 35.2MB 524kB keystore 5 35.2MB 35.7MB 524kB frp 6 35.7MB 170MB 134MB minidump 7 170MB 1244MB 1074MB ext4 cust 8 1244MB 1378MB 134MB recovery 9 1378MB 1512MB 134MB recoverybak 10 1512MB 1512MB 65.5kB vbmeta_system 11 1512MB 1512MB 65.5kB vbmeta_systembak 12 1512MB 1529MB 16.8MB ext4 metadata 13 1529MB 1932MB 403MB ext4 cache 14 1932MB 2334MB 403MB exaid 15 2334MB 2351MB 16.8MB gsort 16 2351MB 2359MB 8389kB ffu 17 2359MB 10.9GB 8590MB super 18 10.9GB 123GB 112GB ext4 userdata Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sdb: 8389kB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 7365kB 7340kB xbl 2 7365kB 7496kB 131kB xbl_config Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sdc: 8389kB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 7365kB 7340kB xblbak 2 7365kB 7496kB 131kB xbl_configbak Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sdd: 134MB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 131kB 106kB ALIGN_TO_128K_1 2 131kB 262kB 131kB cdt 3 262kB 1311kB 1049kB ddr Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sde: 4295MB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 549kB 524kB aop 2 549kB 4743kB 4194kB tz 3 4743kB 5267kB 524kB hyp 4 5267kB 274MB 268MB modem msftdata 5 274MB 275MB 1049kB bluetooth 6 275MB 279MB 4194kB mdtpsecapp 7 279MB 313MB 33.6MB mdtp 8 313MB 321MB 8389kB abl 9 321MB 354MB 33.6MB ext4 dsp 10 354MB 355MB 524kB keymaster 11 355MB 355MB 524kB cmnlib 12 355MB 356MB 524kB cmnlib64 13 356MB 356MB 131kB devcfg 14 356MB 356MB 65.5kB qupfw 15 356MB 358MB 2097kB imagefv hidden 16 358MB 360MB 2097kB uefisecapp 17 360MB 361MB 524kB aopbak 18 361MB 365MB 4194kB tzbak 19 365MB 366MB 524kB hypbak 20 366MB 634MB 268MB modembak 21 634MB 635MB 1049kB bluetoothbak 22 635MB 639MB 4194kB mdtpsecappbak 23 639MB 673MB 33.6MB mdtpbak 24 673MB 681MB 8389kB ablbak 25 681MB 715MB 33.6MB ext4 dspbak 26 715MB 715MB 524kB keymasterbak 27 715MB 716MB 524kB cmnlibbak 28 716MB 716MB 524kB cmnlib64bak 29 716MB 717MB 131kB devcfgbak 30 717MB 717MB 65.5kB qupfwbak 31 717MB 719MB 2097kB imagefvbak hidden 32 719MB 721MB 2097kB uefisecappbak 33 721MB 721MB 4096B devinfo 34 721MB 722MB 1049kB dip 35 722MB 722MB 262kB apdp 36 722MB 730MB 8389kB spunvm 37 730MB 765MB 34.2MB splash 38 765MB 765MB 4096B limits 39 765MB 766MB 1049kB toolsfv 40 766MB 774MB 8389kB logfs 41 774MB 776MB 2097kB cateloader 42 776MB 843MB 67.1MB logdump 43 843MB 843MB 131kB storsec 44 843MB 844MB 32.8kB multiimgoem 45 844MB 844MB 32.8kB multiimgqti 46 844MB 844MB 524kB uefivarstore 47 844MB 844MB 28.7kB secdata 48 844MB 845MB 524kB catefv 49 845MB 846MB 1049kB catecontentfv 50 846MB 846MB 65.5kB vbmeta 51 846MB 980MB 134MB boot 52 980MB 1005MB 25.2MB dtbo 53 1005MB 1005MB 65.5kB vbmetabak 54 1005MB 1030MB 25.2MB dtbobak 55 1030MB 1165MB 134MB bootbak Model: SKhynix H9HQ15AECMADAR (scsi) Disk /dev/sdf: 134MB Sector size (logical/physical): 4096B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 24.6kB 131kB 106kB ALIGN_TO_128K_2 2 131kB 2228kB 2097kB modemst1 3 2228kB 4325kB 2097kB modemst2 4 4325kB 14.8MB 10.5MB fsg 5 14.8MB 14.9MB 131kB fsc Model: Unknown (unknown) Disk /dev/zram0: 3221MB Sector size (logical/physical): 4096B/ 4096B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 3221MB 3221MB linux-swap(v1)
I can see that '/' is full, what why would this happen on a fresh installation of UT?
I used the offcial installer and enabled all 3 options (repartition, wipe, install)
-
@linux_dude said in apt fails to install package duo to the lack of space and "read-only filesystem":
I can see that '/' is full, what why would this happen on a fresh installation of UT?
The adage: "Nothing in life is easy. But if it is too hard, you are probably doing it wrong." comes to mind here.
You are trying to use apt (to install / update) on UT. UT is set up as an immutable distro. As such the root filesystem is read-only and updates are provided as delta's to the previously expected state of the system. Because of this, it is not necessary for there to be much free space in the / partition, which is read-only anyway. In consequence
apt
is not supported, neither is making the / partition read/write.Packages that are installed from the Open Store are installed in /userdata, which as you can see does have ample free space. You could tweak apt to install to the writeable area too. One such initiative is Crackle. Search for that in the forums for more info. It doesn't make everything work as yet, but you might want to contribute to the effort.
Another option, depending on what it is you need to install, is to create a Libertine container (also search for that).
Be advised that as a rule, services do not run in a Libertine container, but can be made to work with Crackle.
An up and coming option is to run snaps. On 20.04 they have to be enabled with the Snapz0r app from the Open Store, which also requires certain features to be available in your devices kernel.
Current limitations with snaps are: Not all GUI apps work, and of those that do, there is no native OSK support.
-
@arubislander why though? I've tested some CLI and GUI apps from apt and they worked just I expected (aside from scaling), it wouldn't be much to shrink /userdata 10-20 GiB and expand the / partition with it.
How easy is it to do that? Because they seem to be configured and partitioned in an awkward way (to me). Can you help me with it? -
@linux_dude said in apt fails to install package duo to the lack of space and "read-only filesystem":
@arubislander why though?
Because UT aims to be Mobile Linux for Human Beings.
I've tested some CLI and GUI apps from apt and they worked just I expected (aside from scaling),
In that case, these apps would also run in a Libertine container. Please look into that option.
it wouldn't be much to shrink /userdata 10-20 GiB and expand the / partition with it.
How easy is it to do that? Because they seem to be configured and partitioned in an awkward way (to me).Maybe. I don't know. I know that existing android partitions are reused and repurposed. I am not sure if any additional partitions are made, or that these are all vendor determined. (maybe the layout needs to be just so, so that "vendor blobs" function?). Anyhow, the way things are laid out differs from device to device, and is determined in large part by the porter of the device.
Can you help me with it?
I am no expert in this area. So I cannot help you with resizing partitions. The only device I have successfully fiddled with the partitions on was the Meizu Pro 5. Since then I have found that respecting the philosophy of the OS, and finding ways to do what I need within those confines, works better in the long run.
-
Hi @linux_dude
The partition size is fixed on Ubuntu touch.
There is no debate about it.I use to say that if you cannot work around those limitations, you shouldn't do it at risk of damaging your system.
Ubuntu Touch has an immutable filesystem for consistency across devices, stability, and ease of use and maintainability.If you want to install desktop apps on your device, the beta version of what is supported are snaps.
You can use snapz0r from the open-store to enable it on your device.
You can also use Libertine like @arubislander already mentioned.
Or you can find another way (that I won't explain because of previous § )Know one thing though, it's on purpose and people working on the system itself know better than me.
If you know better, feel free to join the effort and contribute to our current issues to demonstrate your skills.
It's the best way to be heard.