{"id":22366699,"url":"https://github.com/vaeth/zram-init","last_synced_at":"2025-07-30T17:32:17.635Z","repository":{"id":2616940,"uuid":"3601070","full_name":"vaeth/zram-init","owner":"vaeth","description":"A wrapper script for the zram linux kernel module with zsh and openrc support","archived":false,"fork":false,"pushed_at":"2022-01-13T21:07:04.000Z","size":116,"stargazers_count":78,"open_issues_count":3,"forks_count":26,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-07-10T00:38:10.576Z","etag":null,"topics":["initscript","openrc","systemd","wrapper-script","zram"],"latest_commit_sha":null,"homepage":"http://www.mathematik.uni-wuerzburg.de/~vaeth/download/index.html#zram-init","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaeth.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-02T10:09:10.000Z","updated_at":"2024-05-24T08:48:41.000Z","dependencies_parsed_at":"2022-08-29T12:12:37.213Z","dependency_job_id":null,"html_url":"https://github.com/vaeth/zram-init","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaeth%2Fzram-init","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaeth%2Fzram-init/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaeth%2Fzram-init/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaeth%2Fzram-init/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaeth","download_url":"https://codeload.github.com/vaeth/zram-init/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228164524,"owners_count":17879085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["initscript","openrc","systemd","wrapper-script","zram"],"created_at":"2024-12-04T18:15:13.166Z","updated_at":"2025-07-30T17:32:17.624Z","avatar_url":"https://github.com/vaeth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zram-init\n\nA wrapper script for the zram kernel module with interactive and init support\n\n(C) Martin Väth (martin at mvath.de).\nMany thanks to all people in the `AUTHORS` file for contributing.\nThe license of this package is the GNU Public License GPL-2.\nSPDX-License-Identifier: GPL-2.0-only\n\nThis is a small helper script to setup a zram device as swap or as a ramdisk.\nAlso a __zsh completion__ file and __openrc__ and __systemd__ init-scripts\nare provided.\n\n## General instructions\n\nIf `zramctl` (from __\u003e=util-linux-2.26__) is available,\nthis is used by default.\n(Setting algorithm parameters requires __\u003e=util-linux-2.41__.)\nCurrently, this is not a dependency: a manual method is provided as a fallback.\nThe latter might be removed in a future release of this script.\n\nIf you want to use one of the options `-K` `-M` `-2` `-Z` to pass generic args,\nyou need `push.sh` (v2.0 or newer) in your `$PATH`, see\nhttps://github.com/vaeth/push/\n\nTo install this script, just copy the content of `sbin` into root's `$PATH`.\nTo obtain support for __zsh completion__, copy the content of `zsh` to\nzsh's `$fpath`.\nFor __openrc__ support, the content of openrc should go into `/etc`.\nFor __systemd__ support, the content of `systemd/system` should go into a\nsystemd unit directory (`pkg-config --variable=systemdsystemunitdir systemd`,\nusually `/lib/systemd/system` or `/usr/lib/systemd/system`) and be modified\nand enabled with `systemctl enable ...` for the desired setting.\n(Or install locally, e.g. directly into `/etc/systemd/system`).\nFor systemd and optionally also for openrc the content of `modprobe.d`\nshould go into `/lib/modprobe.d` or `/etc/modprobe.d` and be modified\nappropriately.\n\nTo use `LZ4` compression with zram your kernel needs to be compiled with\na corresponding options. Depending on your kernel version this might be\n\n- `CONFIG_ZRAM_LZ4_COMPRESS=y` (for older kernels)\n- `CONFIG_CRYPTO_LZ4=y` (for recent kernels)\n\n## Instructions for specific distributions\n\n### General\n\nTo install this script, you should use:\n\n```\nmake install # for installation to /usr/local\nmake PREFIX=/usr install  # /usr instead of /usr/local\n```\n\n### Gentoo based\n\nThere is an ebuild in the main gentoo tree (usually an older version)\nand in the mv overlay (current version).\n\n### Alpine Linux\n\nA __zram-init__ package is available.\n\n### Arch based\n\nTo install on Arch based distribution: install `zram-init` from AUR\n\nOnce installed, configure:\n```\nsudo cp /usr/lib/systemd/system/zram* /etc/systemd/system/\n```\n\n- Lets make your configuration tweaks in\n  ```\n    /etc/modprobe.d/zram.conf\n    /etc/systemd/system/zram_swap.service\n    /etc/systemd/system/zram_tmp.service\n    /etc/systemd/system/zram_var_tmp.service\n  ```\n\n- start\n  ```\n    sudo systemctl start zram_swap.service\n    sudo systemctl start zram_tmp.service\n    sudo systemctl start zram_var_tmp.service\n  ```\n\n- and finaly enable\n  ```\n    sudo systemctl enable zram_swap.service\n    sudo systemctl enable zram_tmp.service\n    sudo systemctl enable zram_var_tmp.service\n  ```\n\nOptional remove any swap references in `/etc/fstab`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaeth%2Fzram-init","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaeth%2Fzram-init","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaeth%2Fzram-init/lists"}