Hi all,
I have been using Fedora IOT for a few months now but really struggle with some basic administrative tasks. The documentation if very limited so I am looking for some help here. If you don’t want to read all the context, I have summed up everything in a few questions directly bellow
Context
After a few weeks of usage I always end up in a situation where updates fails with:
$ sudo rpm-ostree update
[...]
Resolving dependencies... done
error: Could not depsolve transaction; 4 problems detected:
Problem 1: The operation would result in removing the following protected packages: systemd
Problem 2: The operation would result in removing the following protected packages: systemd
Problem 3: The operation would result in removing the following protected packages: systemd
Problem 4: The operation would result in removing the following protected packages: systemd
The list of the packages to update does include systemd related ones. But this shouldn’t be an issue:
The first failure you presented may due to some additional packages that you have installed or layered onto your system. If you could share the output of rpm-ostree status, that would be helpful for additional diagnosis. (If the root cause was lack of available storage, you would have received a different error.)
It looks like you are using LVM for your storage, so you may be able to adjust the Logical Volumes (LVs) that you are using. Notably, it appears that the fedora_fedora--iot-home LV has 325G allocated to it and only 26G used, so there appears to be some unused space that you could reallocate.
You may be able to use lvreduce to shrink the size of that LV and then lvextend to increase the size of fedora_fedora--iot-root. You should adjust the size of your filesystem after doing those LV operations; how you do this depends on which filesystem you have used, i.e. ext4, xfs, etc.
I’d recommend backing up any data on your system before doing this; additionally, it would probably be safest to do these operations booted into a Live ISO or the like. Adjusting storage + filesystems of your root partition while booted into that root partition can have disasterous results.
You can do some maintenance with the rpm-ostree cleanup command. I would suggest using rpm-ostree cleanup --base --repomd, which cleanup any temporary files and the cached RPM repo metadata.
I was able to shrink the home partition and extend the root one. I am sharing the instructions here as it could help others in the future:
Make sure to backup any important data
Boot a live Fedora Desktop to make sure the /boot and /home partitions are not mounted
Shrink down the home partition (here I only want it to be 300gb) sudo lvreduce -r -L 300g /dev/fedora_fedora-iot/home
Check how much free space you now have sudo vgdisplay
Pay attention to this line in particular: Free PE / Size XXXXX / 12.34 GiB
Resize the root partition to use this free space
Replace “XXXXX” with the number of blocks from previous command. Make sure to put the “+” before so it gets added to current size instead of being interpreted as the target size sudo lvextend -r -l +XXXXX /dev/fedora_fedora-iot/root
I was able to get rid of the following errors by removing the akmod-nvidia & xorg-x11-drv-nvidia packages:
The operation would result in removing the following protected packages: systemd
I was then able to perform the update. But now I cannot re-install the two packages as it throws the same error. I tried removing RPM Fusion sources, no luck.
The behavior is always the same. Installing both packages from a fresh install always work. However after some time and a few updates, it breaks.
It could related to akmods, which might require a different systemd version than the one installed ? In any case I am not quite sure how I could fix the install and prevent Fusion packages to interfere with systemd
It could be that the packages provided by RPM Fusion need newer versions of systemd than what is available in Fedora. Usually this resolves itself as the newer version becomes available in Fedora or the dependencies for the RPM Fusion provided packages are adjusted. Though this is just speculation and could be wildly incorrect.