errors reported during update after setting attrib +i on config file

at some point I ran
sudo chattr +i /etc/systemd/zram-generator.conf
sudo chattr +i /etc/systemd/zram-generator.conf
now when updating I get errors like
error: Staging deployment: Cleaning deployments: Removing ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0: unlinkat(zram-generator.conf): Operation not permitted
error: Staging deployment: Cleaning deployments: Removing ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0: unlinkat(zram-generator.conf): Operation not permitted
The update process runs as usual but I do get a prompt and an error message each time. Undoing the attribute change now doesn't seem to help.
37 Replies
HikariKnight
HikariKnight•2mo ago
did you remove it with sudo chattr -i /etc/systemd/zram-generator.conf
memo
memoOP•2mo ago
yes, but doing so didn't seem to make a difference
> sudo lsattr /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
----i----------------- /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
> sudo lsattr /etc/systemd/zram-generator.conf
---------------------- /etc/systemd/zram-generator.conf
> sudo lsattr /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
----i----------------- /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
> sudo lsattr /etc/systemd/zram-generator.conf
---------------------- /etc/systemd/zram-generator.conf
HikariKnight
HikariKnight•2mo ago
have you done any custom changes to it? why did you make it immutable to begin with?
memo
memoOP•2mo ago
a guide written for fedora (not bazzite) suggested doing so, I disabled zram to enable swap (and hoping to enable hibernation, but nevermind that)
HikariKnight
HikariKnight•2mo ago
just changing the file itself should be enough for updates to not touch it since your changes are prioritized try just restoring the original and moving the changes back you can find the original in /usr/etc/ rm or mv the file first then cp the original from /usr/etc/systemd/
memo
memoOP•2mo ago
originally there was no file, the guide I followed instructed to touch an empty file there to disable zram
HikariKnight
HikariKnight•2mo ago
thats odd because we setup zram through that file
HikariKnight
HikariKnight•2mo ago
this is for fedora workstation which is not the same as fedora silverblue or fedora kinoite
memo
memoOP•2mo ago
ah, I see I sudo cp /dev/null /etc/systemd/zram-generator.conf to disable it what did you mean "moving the changes back?"
HikariKnight
HikariKnight•2mo ago
you had not sent the link, i assumed you had edited the file
memo
memoOP•2mo ago
now I'm looking to remedy the situation where I have this immutable file in my /ostree/ I'm not looking to re-enable zram
HikariKnight
HikariKnight•2mo ago
when maybe consider, delete the file copy original back remove content from the copied original tada šŸŽ‰ becaus /ostree should never be edited directly its literally the physical location of your /
memo
memoOP•2mo ago
why would copying the original back help?
HikariKnight
HikariKnight•2mo ago
becase removing the immutability from the file didnt help so remove the file reference completely and see if that helps which you do by deleting then copying the new file and then just empty the file since you dont want anything in it or just delete the file and re-touch it, whichever makes you happy
memo
memoOP•2mo ago
in /etc/systemd ? will this address the immutable file in /ostree/ ?
HikariKnight
HikariKnight•2mo ago
please just try and if you have had 2 updates while it has been immutable, go into both deployments (ostree:0 and ostree:1) and make the file mutable again
memo
memoOP•2mo ago
that gives an error,
chattr: Read-only file system while setting flags on /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
chattr: Read-only file system while setting flags on /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
HikariKnight
HikariKnight•2mo ago
/etc is not read only literally only /usr is read only when the rest of the system goes read only you either have a corrupt btrfs filesystem or you have messed up something
memo
memoOP•2mo ago
> findmnt -T /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/
TARGET SOURCE FSTYPE OPTIONS
/sysroot /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root] btrfs ro,relatime,seclabel,compress-force=zstd:1,ssd,discard=async,space_cache=v2,commit=120,subvolid=256,subvol=/root
> findmnt -T /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/
TARGET SOURCE FSTYPE OPTIONS
/sysroot /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root] btrfs ro,relatime,seclabel,compress-force=zstd:1,ssd,discard=async,space_cache=v2,commit=120,subvolid=256,subvol=/root
the rest of the system is not read-only
HikariKnight
HikariKnight•2mo ago
yeah well /sysroot which is / and /usr is read only which is correct
memo
memoOP•2mo ago
and that is where the immutable file is
HikariKnight
HikariKnight•2mo ago
yes in /etcwhich is not immuatble
memo
memoOP•2mo ago
I'm guessing a copy was made or something during the update process and I got stuck with an immutable file where there shouldn't be one
findmnt -T /etc/
TARGET SOURCE FSTYPE OPTIONS
/etc /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root/ostree/deploy/fedora/deploy/ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d.0/etc]
btrfs rw,relatime,seclabel,compress-force=zstd:1,ssd,discard=async,space_cache=v2,commit=120,subvolid=256,
findmnt -T /etc/
TARGET SOURCE FSTYPE OPTIONS
/etc /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root/ostree/deploy/fedora/deploy/ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d.0/etc]
btrfs rw,relatime,seclabel,compress-force=zstd:1,ssd,discard=async,space_cache=v2,commit=120,subvolid=256,
the current /etc/ is not ro as expected
HikariKnight
HikariKnight•2mo ago
sudo chattr -i /etc/systemd/zram-generator.conf
sudo rm /etc/systemd/zram-generator.conf
sudo touch /etc/systemd/zram-generator.conf
sudo chattr -i /etc/systemd/zram-generator.conf
sudo rm /etc/systemd/zram-generator.conf
sudo touch /etc/systemd/zram-generator.conf
come back when you have tried that and rebooted on both ostree:0 and ostree:1
memo
memoOP•2mo ago
after that I still have one immutable file there
---------------------- /ostree/deploy/fedora/deploy/ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/4cd00129b0746ec4249dbb656a2b29ece719ccc281404f884216d407b6ea85b0.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/5e321d07971f56c6d16f500c4efca6f89a34a92c0e606c12df35f918d2d05299.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/07abefebf12b7c5153d0435ecaa3ece8c5f335c1938b71bd89ee875bdb8fd7ed.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/4871a6a53018b792a604b51924132c57c96233b76eb38e7afee0f6c85e670d8e.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/45636fa0543cfba9be19540474e14bd495a2cd47c41f56330b4d1c215121b75e.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/80bf2ad1e8365baeee2f3beedcd012b453c28055df5a51501756dce2bed175f8.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/3ee8925c12279ac3f9816befdd38ce4fec1190e767bb02d2965daa66cda9312d.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/95e56500b4f4a04fdcd64e7ed8be2b79f7b987413b84973be5388699af2c2944.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/066d49ddb7f04e4db0e7de29063f14ba7363e99dbd9ade5ef795ac75c5b5d851.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/e4810b9552f6ae9df382f275f13dce3f1dfc43652520de375446b80c0ff77cfd.0/etc/systemd/zram-generator.conf
----i----------------- /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/4cd00129b0746ec4249dbb656a2b29ece719ccc281404f884216d407b6ea85b0.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/5e321d07971f56c6d16f500c4efca6f89a34a92c0e606c12df35f918d2d05299.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/07abefebf12b7c5153d0435ecaa3ece8c5f335c1938b71bd89ee875bdb8fd7ed.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/4871a6a53018b792a604b51924132c57c96233b76eb38e7afee0f6c85e670d8e.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/45636fa0543cfba9be19540474e14bd495a2cd47c41f56330b4d1c215121b75e.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/80bf2ad1e8365baeee2f3beedcd012b453c28055df5a51501756dce2bed175f8.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/3ee8925c12279ac3f9816befdd38ce4fec1190e767bb02d2965daa66cda9312d.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/95e56500b4f4a04fdcd64e7ed8be2b79f7b987413b84973be5388699af2c2944.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/066d49ddb7f04e4db0e7de29063f14ba7363e99dbd9ade5ef795ac75c5b5d851.0/etc/systemd/zram-generator.conf
---------------------- /ostree/deploy/fedora/deploy/e4810b9552f6ae9df382f275f13dce3f1dfc43652520de375446b80c0ff77cfd.0/etc/systemd/zram-generator.conf
----i----------------- /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
HikariKnight
HikariKnight•2mo ago
rpm-ostree status -v
memo
memoOP•2mo ago
State: idle
AutomaticUpdates: disabled
Deployments:
ā— ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable (index: 0)
Digest: sha256:d109e30673c243e8826b1053674317800a607f89ce08ccfa4eab5e6537478b36
Version: 41.20250216.1 (2025-02-17T16:40:17Z)
Commit: ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d
Staged: no
StateRoot: fedora

(error fetching image metadata) (index: 1)
Timestamp: 2025-02-08T06:51:44Z
Commit: 4cd00129b0746ec4249dbb656a2b29ece719ccc281404f884216d407b6ea85b0
StateRoot: fedora
State: idle
AutomaticUpdates: disabled
Deployments:
ā— ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-nvidia:stable (index: 0)
Digest: sha256:d109e30673c243e8826b1053674317800a607f89ce08ccfa4eab5e6537478b36
Version: 41.20250216.1 (2025-02-17T16:40:17Z)
Commit: ebf5a24ccc1505a7e9715de466bcd867530521b77e501c5d87ba60862202028d
Staged: no
StateRoot: fedora

(error fetching image metadata) (index: 1)
Timestamp: 2025-02-08T06:51:44Z
Commit: 4cd00129b0746ec4249dbb656a2b29ece719ccc281404f884216d407b6ea85b0
StateRoot: fedora
HikariKnight
HikariKnight•2mo ago
yeah so your index 1 is broken
memo
memoOP•2mo ago
idk about fetching image metadata, I think that problem is newer than the unlink during upgrade problem also booting off the 2nd grub entry seemed fine
HikariKnight
HikariKnight•2mo ago
you ran the commands on both right? in both entries
memo
memoOP•2mo ago
oh, I understood you to say "reboot on both" I think I've resolved the issue by:
sudo mount -o remount,rw /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root] /sysroot
sudo chattr -i /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
# [reboot]
sudo rpm-ostree cleanup -b -r
sudo mount -o remount,rw /dev/mapper/luks-e47e47d1-2ff0-4fb4-b262-8568df2950e9[/root] /sysroot
sudo chattr -i /ostree/deploy/fedora/deploy/30eac2c7d8333cde2353b571d59a5f4c0eca4141d6b55c48ac5c90b2a1205de0.0/etc/systemd/zram-generator.conf
# [reboot]
sudo rpm-ostree cleanup -b -r
HikariKnight
HikariKnight•2mo ago
something like that was going to be my last resort since that can severely break things
memo
memoOP•2mo ago
I think what you suggested may have worked if I'd acted sooner
HikariKnight
HikariKnight•2mo ago
if it works and does not cause issues, good but avoid doing anything like that in the future, if you need to make something immutable make it not be a part of the root system, only a part of external mounts or your home šŸ™‚ your own changes to /etc are prioritized over what we provide with updates essentially if you have edited a file in etc, it will not be overwritten by an update if you delete a file though that is provided by an update, it will be restored on boot files like /etc/fstab however are local for you meaning you have the only valid copy, those will never be "restored" if deleted, thats just one way to brick your install so dont delete that
memo
memoOP•2mo ago
chattr +i was probably not strictly required even for plain fedora, but I didn't consider the effect it would have when following the instructions I'd found
HikariKnight
HikariKnight•2mo ago
if you want to restore a default file, the best way is to copy it from /usr/etc yeah i have no idea why they even recommended that anyways glad it works, but if you start seeing errors that might be side effects from this, consider a reinstall if you cant figure it out. if you see no errors, good, dont do anything and move on with your day šŸ™‚ anyways im going back to gaming, my friend has been waiting to start this bossfight for a bit now šŸ˜…

Did you find this page helpful?