All Projects → arcmags → Ramroot

arcmags / Ramroot

Licence: gpl-3.0
Load root file system to ram during boot.

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Ramroot

Anlinux Adfree
AnLinux, Ad free version.
Stars: ✭ 127 (-33.16%)
Mutual labels:  archlinux
Ansible Aur
Ansible module to manage packages from the AUR
Stars: ✭ 149 (-21.58%)
Mutual labels:  archlinux
An Idiots Guide To Installing Arch On A Lenovo Carbon X1 Gen 6
so you wanted to install arch huh
Stars: ✭ 165 (-13.16%)
Mutual labels:  archlinux
Anlinux Resources
Image and Script for LinuxOnAndroid App
Stars: ✭ 135 (-28.95%)
Mutual labels:  archlinux
Rofi
A large collection of Rofi based custom Menu, Applets, Launchers & Powermenus.
Stars: ✭ 2,907 (+1430%)
Mutual labels:  archlinux
Spotcommander
The most intuitive and feature-rich remote control for Spotify for Linux
Stars: ✭ 152 (-20%)
Mutual labels:  archlinux
Asus Fan Control
🌀 Fan control for ASUS devices running Linux.
Stars: ✭ 120 (-36.84%)
Mutual labels:  archlinux
Image Bootstrap
⛅️ Creates (chroots and) bootable virtual machine images; command line tool (Python 3)
Stars: ✭ 178 (-6.32%)
Mutual labels:  archlinux
Slim themes
A Beautiful Collection Of SLiM Themes.
Stars: ✭ 148 (-22.11%)
Mutual labels:  archlinux
Archweb
Arch Linux website code
Stars: ✭ 161 (-15.26%)
Mutual labels:  archlinux
Archinstall
Arch Linux installer - guided, templates etc.
Stars: ✭ 140 (-26.32%)
Mutual labels:  archlinux
Pacback
Advanced Version Control for Arch Linux
Stars: ✭ 146 (-23.16%)
Mutual labels:  archlinux
Termux Os
All in One Termux Os..!! (New)
Stars: ✭ 150 (-21.05%)
Mutual labels:  archlinux
Archfi
Arch Linux Fast Installer : tutorial installer
Stars: ✭ 2,156 (+1034.74%)
Mutual labels:  archlinux
Kernel Modules Hook
Keeps your Arch Linux fully functional after a kernel upgrade
Stars: ✭ 175 (-7.89%)
Mutual labels:  archlinux
Cylon
A CLI TUI menu driven bash shell script supporting updates, maintenance, backups and system checks for an Arch based Linux distro
Stars: ✭ 121 (-36.32%)
Mutual labels:  archlinux
Arch Boxes
Arch-boxes provides automated builds of the Arch Linux releases for different providers and post-processors (read-only mirror)
Stars: ✭ 149 (-21.58%)
Mutual labels:  archlinux
Alterlinux
Alter Linux - ArchLinux-derived OS made in Japan aimed at being usable by anyone
Stars: ✭ 179 (-5.79%)
Mutual labels:  archlinux
Ugrub
Create an ultimate multiboot USB flash drive with Grub2 bootloader
Stars: ✭ 177 (-6.84%)
Mutual labels:  archlinux
Tmoe Linux
🍭Without any basic knowledge of linux shell,you can easily install and configure a GNU/Linux graphical desktop environment on 📱Android termux and 💻WSL .🍰You can also run VSCode on your android phone.🍹Graphical qemu manager,🐋support running docker on Android.配置WSL和安卓手机的linux容器,桌面环境,主题美化,远程桌面,音频服务,镜像源,uefi开机启动项,webdav(nginx),fcitx输入法以及qemu-system虚拟机...
Stars: ✭ 149 (-21.58%)
Mutual labels:  archlinux

======= ramroot

Run Linux entirely from RAM! This is customizable mkinitcpio_ hook that completely loads the root file system to a zram partition during the initramfs_ boot stage.

WARNING

ramroot is currently not working with any kernel 5.10+.

Usage

During early system boot, the ramroot initcpio hook determines the host machine's total ram and prompts the user y/n to load the root file system to zram if enough space is available.

A ramroot helper script easily enables/disables and/or generates additional ramroot config files.

Installation

This package is available in the AUR_ for easy installation. A basic config file is created during initial installation.

Requirements

Arch Linux ramroot is designed specifically to work with the Arch Linux boot process_. These scripts work with slight modifications on other distributions from time to time, however this not officially supported

mkinitcpio A dependency of the linux package. This is included here as linux is no longer included in the Arch Linux base package set.

Configuration

/etc/ramroot.conf

This file is an ash shell script. Many common bash builtins are not available here and the syntax tends to be a bit stricter. The fallback config file can be viewed at /usr/lib/ramroot/ramroot.conf.

After any changes are made to /etc/ramroot.conf, a user must execute ramroot -E or mkinitcpio -P in order for those changes to be built into a new initramfs image.

All UUID (or PARTUUID) values must include the proper UUID= prefix. A mountpath is an absolute mount path (as given in /etc/fstab). Every size is a whole number of mebibytes with no-suffix.

mounts_zram Defines additional mounts to load to zram during initramfs. A mount consists of the UUID separated from the mountpath by a colon. Multiple mounts are separated by spaces or newlines.

mounts_null Defines mounts to specifically ignore by ramroot. The UUID is optional for these mounts. These will not be loaded to zram or mounted normally. If / is specified in mounts_null, ramroot will skip loading altogether.

ps_default Default zram y/n prompt value. Valid values are yes or no.

ps_timeout Boot prompt timeout, positive integer between 1 and 33. After this many seconds, the zram y/n prompt will assume the ps_default value.

ram_min Minimum amount of free ram required.

zram_min Minimum amount of free zram required. If both this and ram_min cannot be satisfied, the boot prompt automatically selects no.

ram_pref Preferred amount of free ram. If both ram_min and zram_min are satisfied, additional memory is allocated to ram up to this preferred ram value.

zram_max Maximum amount of free zram to create. Once ram_pref is satisfied, the amount of free zram is further extended to zram_max.

All remaining memory is allocated towards ram.

/etc/ramroot.z/

The structure of this directory mirrors the hierarchy of the root file system. Upon a successful sync to zram, any files and directories contained in /etc/ramroot/ are non-persistently overwritten to the root directory.

This can be used to load any number of custom scripts, binaries, configs, etc when boot from zram. Just a few use case examples for this include: a custom zram hostname at /etc/ramroot.z/etc/hostname, enable autologin when boot from zram via a /etc/ramroot.z/etc/systemd/system/[email protected]/override.conf file, or even add more sudo access with drop in files in /etc/ramroot.z/etc/sudoers.d/.

Any files copied from /etc/ramroot/ to / in this manner preserve all ownerships. Also note that symbolic links (rather than their target files) will be overwritten by this action (due to the fact that they aren't resolved yet during early initramfs).

~/.ramroot.z/

Any files contained within a .ramroot.z directory in a user's home folder are non-persistently overwritten to their home folders upon a sync to zram as above.

Ramroot Script

ramroot <options>

Options

-C, --config-gen Attempt to detect the root file system partitions and generate a new config file.

-D, --disable Remove ramroot hook from /etc/mkinitcpio.conf and rebuild initramfs image.

-E, --enable Add ramroot hook to /etc/mkinitcpio.conf and rebuild initramfs image.

-o, --output <FILE> Save new config to FILE instead of /etc/mkinitcpio.conf.

-Y, --yes Overwrite output files without asking.

-H, --help Display help text and exit.

Notes

The file system transfer to ram takes several minutes. As soon as the boot process is complete, the boot media can be safely removed.

Remember that all changes to files in ram are completely lost when the host machine is power cycled. To persistently update the system and edit files, boot the device without transferring the filesystem to ram.

Keep a clean and trimmed down system to maintain faster zram sync times. Arch Linux stores downloaded packages in /var/cache/pacman/pkg/. After every update, if no problems occur, consider removing old packages_.

Also, keep in mind that higher quality (more expensive) USB flash drives often exhibit a dramatic improvement in zram sync times.

Credits

This project was motivated greatly in part by the liveroot_ package and by several inquisitive forum posts_.

:Author: Chris Magyar

:Version: 2.0.2

:License: GPL 3.0

:Donate(xmr): 41dUPANhvCvLUuRVJpUc9cRFnsLHzWiTPUhyuamrVwa61xoP uxZaD6R28cLqxEhTaC6LuwcHtkbUi2uELDD88MoQHJKePvP

.. _AUR: https://aur.archlinux.org/packages/ramroot/ .. _mkinitcpio: https://wiki.archlinux.org/index.php/mkinitcpio .. _zram: https://en.wikipedia.org/wiki/Zram .. _initramfs: https://en.wikipedia.org/wiki/Initial_ramdisk .. _boot process: https://wiki.archlinux.org/index.php/Arch_boot_process .. _build hook: https://wiki.archlinux.org/index.php/mkinitcpio#Build_hooks .. _runtime hook: https://wiki.archlinux.org/index.php/mkinitcpio#Runtime_hooks .. _HOOKS: https://wiki.archlinux.org/index.php/mkinitcpio#HOOKS .. _MODULES: https://wiki.archlinux.org/index.php/mkinitcpio#MODULES .. _arch-usb: http://valleycat.org/arch-usb/arch-usb.html .. _old packages: https://wiki.archlinux.org/index.php/pacman#Cleaning_the_package_cache .. _liveroot: https://github.com/bluerider/liveroot .. _forum posts: https://bbs.archlinux.org/viewtopic.php?id=178963

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].