{"id":13441059,"url":"https://github.com/arcmags/ramroot","last_synced_at":"2026-03-16T08:37:59.468Z","repository":{"id":51225843,"uuid":"104217451","full_name":"arcmags/ramroot","owner":"arcmags","description":"Load root file system to ram during boot.","archived":false,"fork":false,"pushed_at":"2022-08-16T06:00:58.000Z","size":197,"stargazers_count":264,"open_issues_count":1,"forks_count":22,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-08-01T03:32:51.654Z","etag":null,"topics":["archlinux","initramfs","mkinitcpio","mkinitcpio-hook","ramfs","zram"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arcmags.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-20T13:13:26.000Z","updated_at":"2024-07-07T03:35:10.000Z","dependencies_parsed_at":"2022-09-07T17:23:42.843Z","dependency_job_id":null,"html_url":"https://github.com/arcmags/ramroot","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcmags%2Framroot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcmags%2Framroot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcmags%2Framroot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcmags%2Framroot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arcmags","download_url":"https://codeload.github.com/arcmags/ramroot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221752233,"owners_count":16874950,"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":["archlinux","initramfs","mkinitcpio","mkinitcpio-hook","ramfs","zram"],"created_at":"2024-07-31T03:01:29.462Z","updated_at":"2025-12-28T10:17:55.606Z","avatar_url":"https://github.com/arcmags.png","language":"Shell","funding_links":[],"categories":["HarmonyOS","archlinux","Shell"],"sub_categories":["Windows Manager"],"readme":"=======\nramroot\n=======\n\nRun Linux entirely from RAM! This is a customizable mkinitcpio_ hook that\ncompletely loads the root file system to a zram partition during the initramfs_\nboot stage.\n\n\nUsage\n=====\n\nDuring early system boot, the ramroot initcpio hook determines the host\nmachine's total ram and prompts the user y/n to load the root file system to\nzram if enough space is available.\n\nA ramroot helper script easily enables/disables and/or generates additional\nramroot config files.\n\nInstallation\n------------\n\nThis package is available in the AUR_ for easy installation. A basic config\nfile is created during initial installation.\n\nRequirements\n------------\n\nArch Linux\n    ramroot is designed specifically to work with the Arch Linux `boot\n    process`_. These scripts work with slight modifications on other\n    distributions from time to time, however this not officially supported\n\nmkinitcpio\n    Create custom initial ramdisk image.\n\n\nConfiguration\n=============\n\n/etc/ramroot.conf\n-----------------\n\nThis file is an ash shell script. Many common bash builtins are not available\nhere and the syntax tends to be a bit stricter. The fallback config file can be\nviewed at */usr/lib/ramroot/ramroot.conf*.\n\nAfter any changes are made to */etc/ramroot.conf*, a user must execute\n``ramroot -E`` or ``mkinitcpio -P`` in order for those changes to be built into\na new initramfs image.\n\nAll *UUID* (or *PARTUUID*) values must include the proper ``UUID=`` prefix. A\n*mountpath* is an absolute mount path (as given in */etc/fstab*). Every size is\na whole number of *mebibytes* with *no-suffix*.\n\n``mounts_zram``\n    Additional mounts loaded to zram when ramroot is active. A mount consists\n    of the *UUID* separated from the *mountpath* by a colon. Multiple mounts\n    are separated by spaces or newlines.\n\n``mounts_null``\n    Mounts excluded when ramroot is active. The *UUID* is optional for these\n    mounts. These will not be loaded to zram or mounted normally. If */* is\n    specified in ``mounts_null``, ramroot will skip loading altogether.\n\n``ps_default``\n    Default zram boot y/n prompt value. Valid values are *yes* or *no*.\n\n``ps_timeout``\n    zram boot prompt timeout, positive integer between 1 and 32. After this\n    many seconds, the prompt will select the ``ps_default`` value.\n\n``ram_min``\n    Minimum amount of free ram required.\n\n``zram_min``\n    Minimum amount of free zram required. If both this and ``ram_min`` cannot\n    be satisfied, the zram boot prompt will automatically select *no*.\n\n``ram_pref``\n    Preferred amount of free ram. Additional memory is allocated to ram up to\n    this preferred value.\n\n``zram_max``\n    Maximum amount of free zram. If ``ram_pref`` is satisfied, free zram is\n    increased to ``zram_max``.\n\nAll remaining memory is allocated towards ram.\n\n/etc/ramroot.z/\n---------------\n\nThe structure of this directory mirrors the hierarchy of the root file system.\nUpon a successful sync to zram, any files and directories contained in\n*/etc/ramroot/* are non-persistently overwritten to the root directory.\n\nThis can be used to load any number of custom scripts, binaries, configs, etc\nwhen boot from zram. A few use case examples for this include: a custom zram\nhostname at */etc/ramroot.z/etc/hostname*, enable autologin when boot from zram\nvia a */etc/ramroot.z/etc/systemd/system/getty@tty1.service.d/override.conf*\nfile, or even add more sudo access with drop in files in\n*/etc/ramroot.z/etc/sudoers.d/*.\n\nAny files copied from */etc/ramroot.z/* to */* in this manner preserve all\nownerships. Be wary that any symbolic links (rather than their target files)\nwill be overwritten by this action as they aren't resolved yet during early\ninitramfs.\n\n~/.ramroot.z/\n-------------\n\nAny files contained within a *~/.ramroot.z* directory in a user's home\nfolder are non-persistently overwritten to their home folders upon a\nsync to zram as described in */etc/ramroot.z/* above.\n\n\nRamroot Script\n==============\n\n``ramroot \u003coptions\u003e``\n\nOptions\n-------\n\n``-C, --config-gen``\n    Attempt to detect the root file system partitions and generate a new config\n    file.\n\n``-D, --disable``\n    Remove ramroot hook from */etc/mkinitcpio.conf* and rebuild initramfs\n    image.\n\n``-E, --enable``\n    Add ramroot hook to */etc/mkinitcpio.conf* and rebuild initramfs image.\n\n``-o, --output \u003cFILE\u003e``\n    Save new config to *FILE* instead of */etc/mkinitcpio.conf*.\n\n``-Y, --yes``\n    Overwrite output files without asking.\n\n``-H, --help``\n    Display help text and exit.\n\n\nNotes\n=====\n\nThe file system transfer to zram takes several minutes. As soon as the boot\nprocess is complete, the boot media can be safely removed.\n\nRemember that all changes to files in zram are completely lost when the host\nmachine is power cycled. To persistently update the system and edit files, boot\nthe device without transferring the filesystem to zram.\n\nKeep a clean and trimmed down system to maintain faster zram sync times. Arch\nLinux stores downloaded packages in */var/cache/pacman/pkg/*. Consider removing\n`old packages`_ after system updates.\n\nHigher quality (more expensive) USB flash drives exhibit a dramatic improvement\nin zram sync times.\n\n\nCredits\n=======\n\nThis project was motivated greatly in part by the liveroot_ package and by\nseveral inquisitive `forum posts`_.\n\n:Author:\n    Chris Magyar\n\n:Version:\n    2.0.2\n\n:License:\n    GPL 3.0\n\n:Donate(xmr):\n    41dUPANhvCvLUuRVJpUc9cRFnsLHzWiTPUhyuamrVwa61xoP\n    uxZaD6R28cLqxEhTaC6LuwcHtkbUi2uELDD88MoQHJKePvP\n\n\n.. _AUR: https://aur.archlinux.org/packages/ramroot/\n.. _mkinitcpio: https://wiki.archlinux.org/index.php/mkinitcpio\n.. _zram: https://en.wikipedia.org/wiki/Zram\n.. _initramfs: https://en.wikipedia.org/wiki/Initial_ramdisk\n.. _boot process: https://wiki.archlinux.org/index.php/Arch_boot_process\n.. _build hook: https://wiki.archlinux.org/index.php/mkinitcpio#Build_hooks\n.. _runtime hook: https://wiki.archlinux.org/index.php/mkinitcpio#Runtime_hooks\n.. _HOOKS: https://wiki.archlinux.org/index.php/mkinitcpio#HOOKS\n.. _MODULES: https://wiki.archlinux.org/index.php/mkinitcpio#MODULES\n.. _arch-usb: http://valleycat.org/arch-usb/arch-usb.html\n.. _old packages: https://wiki.archlinux.org/index.php/pacman#Cleaning_the_package_cache\n.. _liveroot: https://github.com/bluerider/liveroot\n.. _forum posts: https://bbs.archlinux.org/viewtopic.php?id=178963\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcmags%2Framroot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcmags%2Framroot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcmags%2Framroot/lists"}