{"id":954,"date":"2025-02-05T17:13:56","date_gmt":"2025-02-05T16:13:56","guid":{"rendered":"https:\/\/blogs.igalia.com\/berto\/?p=954"},"modified":"2025-02-05T17:13:56","modified_gmt":"2025-02-05T16:13:56","slug":"keeping-your-system-wide-configuration-files-intact-after-updating-steamos","status":"publish","type":"post","link":"https:\/\/blogs.igalia.com\/berto\/2025\/02\/05\/keeping-your-system-wide-configuration-files-intact-after-updating-steamos\/","title":{"rendered":"Keeping your system-wide configuration files intact after updating SteamOS"},"content":{"rendered":"\n<p><strong>Introduction<\/strong><\/p>\n\n\n\n<p>If you use SteamOS and you like to install third-party tools or modify the system-wide configuration some of your changes might be lost after an OS update. Read on for details on why this happens and what to do about it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>As you all know SteamOS uses an immutable root filesystem and users are not expected to modify it because all changes are lost after an OS update.<\/p>\n\n\n\n<p>However this does <em>not<\/em> include configuration files: the <code>\/etc<\/code> directory is not part of the root filesystem itself. Instead, it&#8217;s a writable <a href=\"https:\/\/wiki.archlinux.org\/title\/Overlay_filesystem\">overlay<\/a> and all modifications are actually stored under <code>\/var<\/code> (together with all the usual contents that go in that filesystem such as logs, cached data, etc).<\/p>\n\n\n\n<p><code>\/etc<\/code> contains important data that is specific to that particular machine like the configuration of known network connections, the password of the main user and the SSH keys. This configuration needs to be kept after an OS update so the system can keep working as expected. However the update process also needs to make sure that other changes to <code>\/etc<\/code> don&#8217;t conflict with whatever is available in the new version of the OS, and there have been issues due to some modifications unexpectedly persisting after a system update.<\/p>\n\n\n\n<p><a href=\"https:\/\/store.steampowered.com\/news\/app\/1675200\/view\/4676514574283544994\" data-type=\"link\" data-id=\"https:\/\/store.steampowered.com\/news\/app\/1675200\/view\/4676514574283544994\">SteamOS 3.6<\/a> introduced a new mechanism to decide what to to keep after an OS update, and the system now keeps a list of configuration files that are allowed to be kept in the new version. The idea is that only the modifications that are known to be important for the correct operation of the system are applied, and everything else is discarded<sup data-fn=\"cb7bca55-baed-41a7-8881-b3ed11d30e3a\" class=\"fn\"><a href=\"#cb7bca55-baed-41a7-8881-b3ed11d30e3a\" id=\"cb7bca55-baed-41a7-8881-b3ed11d30e3a-link\">1<\/a><\/sup>.<\/p>\n\n\n\n<p>However, many users want to be able to keep additional configuration files after an OS update, either because the changes are important for them or because those files are needed for some third-party tool that they have installed. Fortunately the system provides a way to do that, and users (or developers of third-party tools) can add a configuration file to <code>\/etc\/atomic-update.conf.d<\/code>, listing the additional files that need to be kept.<\/p>\n\n\n\n<p>There is an example in <code>\/etc\/atomic-update.conf.d\/example-additional-keep-list.conf<\/code> that shows what this configuration looks like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"644\" src=\"https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf-940x644.jpg\" alt=\"\" class=\"wp-image-955\" style=\"width:655px;height:auto\" srcset=\"https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf-940x644.jpg 940w, https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf-580x397.jpg 580w, https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf-768x526.jpg 768w, https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf-624x428.jpg 624w, https:\/\/blogs.igalia.com\/berto\/files\/2025\/02\/atomic-update-conf.jpg 966w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><\/a><figcaption class=\"wp-element-caption\">Sample configuration file for the SteamOS updater<\/figcaption><\/figure>\n\n\n\n<p>Developers who are targeting SteamOS can also use this same method to make sure that their configuration files survive OS updates. As an example of an actual third-party project that makes use of this mechanism you can have a look at the <a href=\"https:\/\/github.com\/DeterminateSystems\/nix-installer\">DeterminateSystems Nix installer<\/a>:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/DeterminateSystems\/nix-installer\/blob\/v0.34.0\/src\/planner\/steam_deck.rs#L273\">https:\/\/github.com\/DeterminateSystems\/nix-installer\/blob\/v0.34.0\/src\/planner\/steam_deck.rs#L273<\/a><\/p>\n\n\n\n<p>As usual, if you encounter issues with this or any other part of the system you can check the <a href=\"https:\/\/github.com\/ValveSoftware\/SteamOS\/issues\" data-type=\"link\" data-id=\"https:\/\/github.com\/ValveSoftware\/SteamOS\/issues\">SteamOS issue tracker<\/a>. Enjoy!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n<ol class=\"wp-block-footnotes\"><li id=\"cb7bca55-baed-41a7-8881-b3ed11d30e3a\"> A copy is actually kept under <code>\/etc\/previous<\/code> to give the user the chance to recover files if necessary, and up to five previous snapshots are kept under <code>\/var\/lib\/steamos-atomupd\/etc_backup<\/code>  <a href=\"#cb7bca55-baed-41a7-8881-b3ed11d30e3a-link\" aria-label=\"Jump to footnote reference 1\">\u21a9\ufe0e<\/a><\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>Introduction If you use SteamOS and you like to install third-party tools or modify the system-wide configuration some of your changes might be lost after an OS update. Read on for details on why this happens and what to do about it. As you all know SteamOS uses an immutable root filesystem and users are [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"[{\"id\":\"cb7bca55-baed-41a7-8881-b3ed11d30e3a\",\"content\":\" A copy is actually kept under <code>\\\/etc\\\/previous<\\\/code> to give the user the chance to recover files if necessary, and up to five previous snapshots are kept under <code>\\\/var\\\/lib\\\/steamos-atomupd\\\/etc_backup<\\\/code> \"}]"},"categories":[7,3,8,9,10,12],"tags":[35,28,30,29],"class_list":["post-954","post","type-post","status-publish","format-standard","hentry","category-debian","category-english","category-gnome","category-gpul","category-igalia","category-free-software","tag-nix","tag-steam","tag-steam-deck","tag-steamos"],"_links":{"self":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts\/954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/comments?post=954"}],"version-history":[{"count":14,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts\/954\/revisions"}],"predecessor-version":[{"id":970,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/posts\/954\/revisions\/970"}],"wp:attachment":[{"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/media?parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/categories?post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.igalia.com\/berto\/wp-json\/wp\/v2\/tags?post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}