{"id":2816,"date":"2020-09-04T17:00:58","date_gmt":"2020-09-05T00:00:58","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=2816"},"modified":"2020-09-04T17:00:58","modified_gmt":"2020-09-05T00:00:58","slug":"fedora-fun-with-zram","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=2816","title":{"rendered":"Fedora &#8211; Fun with ZRAM.."},"content":{"rendered":"<p><strong>Fedora 33<\/strong> will be using ZRAM as standard for swap, rather than a partition or swapfile on disk.\u00a0\u00a0\u00a0 I had no problem with this on a new F33 install (Odroid H2Plus) but after upgrading an existing Fedora 32 system it refused to initialise, and &#8216;<span style=\"font-family: Courier New, Courier, monospace;\"><strong>\/dev\/zram0<\/strong><\/span>&#8216; did not exist.\u00a0\u00a0\u00a0 Research revealed that the documentation for much of this was very out-of-date, but I eventually managed to fix the problem..<\/p>\n<p>For older systems (Fedora 32 and earlier), the config file was <strong><span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/systemd\/zram-generator.conf<\/span><\/strong> &#8211; and this was blank.\u00a0\u00a0\u00a0 The &#8216;new&#8217; F33 config (with default parameters) is <strong><span style=\"font-family: Courier New, Courier, monospace;\">\/usr\/lib\/systemd\/zram-generator.conf<\/span><\/strong>.<\/p>\n<p>At boot time, the old\/empty config was still being accessed, and nothing was happening..\u00a0\u00a0 The fix is simple &#8211; just <span style=\"text-decoration: underline;\">delete<\/span> the old file at <strong><span style=\"font-family: Courier New, Courier, monospace;\">\/etc\/systemd\/zram-generator.conf<\/span> <\/strong>and reboot:<\/p>\n<p><code><strong><span style=\"font-family: Courier New, Courier, monospace;\">[root@rgz220 ~]# ll \/dev\/zram*<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">brw-rw---- 1 root disk 253, 0 Sep 4 16:29 \/dev\/zram0<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">[root@rgz220 ~]# swapon<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">NAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TYPE\u00a0\u00a0 \u00a0\u00a0 SIZE USED PRIO<\/span><\/strong><br \/>\n<strong><span style=\"font-family: Courier New, Courier, monospace;\">\/dev\/zram0 partition 4G\u00a0\u00a0 0B\u00a0\u00a0 100<\/span><\/strong><\/code><\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 September 5th 2020.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fedora 33 will be using ZRAM as standard for swap, rather than a partition or swapfile on disk.\u00a0\u00a0\u00a0 I had no problem with this on a new F33 install (Odroid H2Plus) but after upgrading an existing Fedora 32 system it refused to initialise, and &#8216;\/dev\/zram0&#8216; did not exist.\u00a0\u00a0\u00a0 Research revealed that the documentation for much of this <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=2816\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[706,1280,10,1238,11,14,15,19],"tags":[2303,2295,161,2304,352,381,2302],"class_list":["post-2816","post","type-post","status-publish","format-standard","hentry","category-alpha-release","category-boot","category-fedora","category-fix","category-hacks","category-kernel","category-linux-2","category-opinion","tag-dev-zram0-missing","tag-fedora-33","tag-fix","tag-old-config","tag-swap","tag-upgrade","tag-zram"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2816"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2816\/revisions"}],"predecessor-version":[{"id":2818,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/2816\/revisions\/2818"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}