Diverting directories does not work of course, but we can divert the files...
root@p:~# apt install wireless-regdb Installing: wireless-regdb Summary: Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0 Download size: 7214 B Space needed: 23.6 kB / 6929 MB available Get:1 http://archive.ubuntu.com/ubuntu plucky/main amd64 wireless-regdb all 2024.10.07-0ubuntu1 [7214 B] Fetched 7214 B in 0s (26.7 kB/s) Selecting previously unselected package wireless-regdb. (Reading database ... 77949 files and directories currently installed.) Preparing to unpack .../wireless-regdb_2024.10.07-0ubuntu1_all.deb ... Unpacking wireless-regdb (2024.10.07-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/wireless-regdb_2024.10.07-0ubuntu1_all.deb (--unpack): unable to create '/lib/firmware/regulatory.db.dpkg-new' (while processing './lib/firmware/regulatory.db'): Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/lib/firmware/regulatory.db': Read-only file system Errors were encountered while processing: /var/cache/apt/archives/wireless-regdb_2024.10.07-0ubuntu1_all.deb Error: Sub-process /usr/bin/dpkg returned an error code (1) root@p:~# mkdir /lib/firmware.unused/ root@p:~# dpkg-divert --package boot-managed-by-snapd --divert /lib/firmware.unused/regulatory.db --no-rename /lib/firmware/regulatory.db Adding 'diversion of /lib/firmware/regulatory.db to /lib/firmware.unused/regulatory.db by boot-managed-by-snapd' root@p:~# dpkg-divert --package boot-managed-by-snapd --divert /lib/firmware.unused/regulatory.db.p7s --no-rename /lib/firmware/regulatory.db.p7s Adding 'diversion of /lib/firmware/regulatory.db.p7s to /lib/firmware.unused/regulatory.db.p7s by boot-managed-by-snapd' root@p:~# apt install wireless-regdb Upgrading: wireless-regdb Summary: Upgrading: 1, Installing: 0, Removing: 0, Not Upgrading: 0 1 not fully installed or removed. Download size: 0 B / 7214 B Space needed: 23.6 kB / 6929 MB available (Reading database ... 77953 files and directories currently installed.) Preparing to unpack .../wireless-regdb_2024.10.07-0ubuntu1_all.deb ... Unpacking wireless-regdb (2024.10.07-0ubuntu1) over (2024.10.07-0ubuntu1) ... Setting up wireless-regdb (2024.10.07-0ubuntu1) ... Processing triggers for man-db (2.13.0-1) ... -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to wireless-regdb in Ubuntu. https://bugs.launchpad.net/bugs/2096979 Title: wireless-regdb update problem at Ubuntu 24.04.1 TPM-backed Full Disk Encryption setup Status in boot-managed-by-snapd package in Ubuntu: Confirmed Status in wireless-regdb package in Ubuntu: Confirmed Bug description: I have an Ubuntu 24.04.1 TPM-backed Full Disk Encryption setup, there is a problem with last wireless-regdb update. Whenever I try to update the system, I get this error: The following packages will be upgraded: wireless-regdb 1 upgraded, 0 newly installed, 0 to remove and 19 not upgraded. 1 not fully installed or removed. Need to get 0 B/7.058 B of archives. After this operation, 1.024 B of additional disk space will be used. Do you want to continue? [Y/n] (Reading database ... 131856 files and directories currently installed.) Preparing to unpack .../wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb ... Unpacking wireless-regdb (2024.07.04-0ubuntu1~24.04.1) over (2022.06.06-0ubuntu2) ... dpkg: error processing archive /var/cache/apt/archives/wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb (--unpack): unable to create '/lib/firmware/regulatory.db.dpkg-new' (while processing './lib/firmware/regulatory.db'): Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/lib/firmware/regulatory.db': Read-only file system Errors were encountered while processing: /var/cache/apt/archives/wireless-regdb_2024.07.04-0ubuntu1~24.04.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I tried "sudo dpkg --purge --force-remove-reinstreq wireless-regdb" and got this error: dpkg: warning: overriding problem because --force enabled: dpkg: warning: package is in a very bad inconsistent state; you should reinstall it before attempting a removal (Reading database ... 131856 files and directories currently installed.) Removing wireless-regdb (2022.06.06-0ubuntu2) ... dpkg: error processing package wireless-regdb (--purge): cannot remove '/lib/firmware/regulatory.db.p7s': Read-only file system Processing triggers for man-db (2.12.0-4build2) ... Errors were encountered while processing: wireless-regdb I know snap pc-kernel has own firmware on immutable read-only filesystem. wireless-regdb package was on the system with no problem. How can I uninstall the package? or is this a bug with lastest wireless-regdb against snap pc-kernel install? To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/boot-managed-by-snapd/+bug/2096979/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp