{"id":18818024,"url":"https://github.com/szorfein/getch","last_synced_at":"2025-07-09T01:10:36.581Z","repository":{"id":56874030,"uuid":"294111596","full_name":"szorfein/getch","owner":"szorfein","description":"A script to install Gentoo | Void Linux.","archived":false,"fork":false,"pushed_at":"2024-10-15T08:13:31.000Z","size":544,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-15T11:51:51.202Z","etag":null,"topics":["boot","cli","dracut","ext4","genkernel","gentoo","grub2","hardened","installer","linux","luks","lvm2","script","systemd-boot","void","void-linux","voidlinux","zfs"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szorfein.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"szorfein","liberapay":"szorfein"}},"created_at":"2020-09-09T12:50:21.000Z","updated_at":"2025-04-18T13:09:26.000Z","dependencies_parsed_at":"2024-11-08T00:14:29.002Z","dependency_job_id":"9e060301-82e7-4e41-8461-83b8f4a4fae0","html_url":"https://github.com/szorfein/getch","commit_stats":{"total_commits":257,"total_committers":1,"mean_commits":257.0,"dds":0.0,"last_synced_commit":"fdc0d6073adcbf365901aa2af514dd794d4ce155"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/szorfein/getch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szorfein%2Fgetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szorfein%2Fgetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szorfein%2Fgetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szorfein%2Fgetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szorfein","download_url":"https://codeload.github.com/szorfein/getch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szorfein%2Fgetch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260988342,"owners_count":23093477,"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":["boot","cli","dracut","ext4","genkernel","gentoo","grub2","hardened","installer","linux","luks","lvm2","script","systemd-boot","void","void-linux","voidlinux","zfs"],"created_at":"2024-11-08T00:14:25.488Z","updated_at":"2025-07-09T01:10:36.565Z","avatar_url":"https://github.com/szorfein.png","language":"Ruby","funding_links":["https://patreon.com/szorfein","https://liberapay.com/szorfein"],"categories":[],"sub_categories":[],"readme":"# Getch\n\n\u003cdiv align=\"center\"\u003e\n\u003cbr/\u003e\n\n[![Gem Version](https://badge.fury.io/rb/getch.svg)](https://badge.fury.io/rb/getch)\n![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/szorfein/getch/rubocop-analysis.yml?branch=main)\n[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)\n![GitHub](https://img.shields.io/github/license/szorfein/getch)\n\n\u003c/div\u003e\n\nA CLI tool to install [Gentoo](https://www.gentoo.org/) (by compiling or in [binary](https://www.gentoo.org/news/2023/12/29/Gentoo-binary.html)) or [Void](https://voidlinux.org/) Linux with default:\n+ DNS over HTTPS (with [Quad9](https://www.quad9.net/)).\n+ Vim | Nano installed.\n+ Iptables installed (not configured).\n+ Sudo installed (not configured).\n+ [iwd](https://iwd.wiki.kernel.org/) installed if wifi is detected.\n+ No GUI installed.\n\nHardened System:\n+ sysctl.conf with TCP/IP stack hardening and more [Arch](https://wiki.archlinux.org/title/Sysctl)\n+ Kernel parameters enforced (dmesg restricted, kexec disabled, etc)\n+ Kernel source (Gentoo) patched with [bask](https://github.com/szorfein/bask).\n+ Musl optionnal\n\n## Description\nActually, Getch support only the `x86_64` architecture with the following archives:\n+ **Gentoo**: `stage3-amd64-systemd` or `stage3-amd64-musl` [Gentoo](https://www.gentoo.org/downloads/).\n+ **Void**: `rootfs tarball glibc` or `rootfs tarball musl` [Void](https://voidlinux.org/download/).\n\nFilesystem supported (with or without encryption)\n+ Ext4\n+ Lvm\n+ ZFS\n\nBoot Manager:\n+ **Gentoo**: Grub2 except on systemd without encryption.\n+ **Void**: use only Grub2.\n\nThe ISO images i was able to test and that works:\n+ [Archlinux](https://www.archlinux.org/download/)\n+ [Portia](https://github.com/szorfein/portia/releases): Custom Archiso that includes ZFS support and Ruby.\n* [Ubuntu 22.10](https://cdimage.ubuntu.com/releases/22.10/release/)\n* [Voidlinux](https://voidlinux.org/download/)\n\nYou can also use your current `linux` host, just pay attention to the disk that will be used.  \n\n## Dependencies\nGetch is build without external libs, so it only require `ruby \u003e= 2.6`.\n\nOn a live image of Void, you need to install `xbps-install -S ruby xz gptfdisk\nopenssl`.\n\n## Install\nGetch is cryptographically signed, so add my public key (if you haven’t already) as a trusted certificate.  \nWith `gem` installed:\n\n    $ gem cert --add \u003c(curl -Ls https://raw.githubusercontent.com/szorfein/getch/master/certs/szorfein.pem)\n    $ gem install getch -P HighSecurity\n\nIf you want to try from the source:\n\n    # git clone https://github.com/szorfein/getch\n    # cd getch\n    # ruby -I lib bin/getch -h\n\n## Usage\nJust ensure than the script is run with a root account.\n\n    # getch -h\n\nAfter an install by Getch, take a look on the [wiki](https://github.com/szorfein/getch/wiki).\n\n## Examples\nFor a french user on Gentoo:\n\n    # getch --disk sda --zoneinfo \"Europe/Paris\" --language fr_FR --keymap fr\n\nInstall Gentoo on LVM and use a different root disk `/dev/vdc`\n\n    # getch --disk vdc --format ext4 --lvm\n\nEncrypt your disk with LVM with a french keymap and in binary mode:\n\n    # getch --disk sda --format ext4 --lvm --encrypt --keymap fr --binary\n\nEncrypt with ext4 and create a new user `ninja`:\n\n    # getch --disk vda --format ext4 --encrypt --username ninja\n\nChange size of root in Gb (default 16 on lvm), swap in Mb (default use your\ncurrent total ram) with lvm.\n\n    # getch --disk sda -o void --lvm --root-size 10 --swap-size 4096\n\nWith ZFS, if used with `--encrypt`, it use the native ZFS encryption:\n\n    # getch --disk vda --format zfs\n\nWith `Void Linux` and `Musl` enable:\n\n    # getch --disk sda --os void --encrypt -k fr --musl\n\n## Troubleshooting\n\n#### Old VG for LVM\nIf a old volume group exist, `getch` may fail to partition your disk. You have to clean up your device before proceed with `vgremove` and `pvremove`. An short example how doing this with a volume group named `vg0`:\n\n    # vgdisplay | grep vg\n    # vgremove -f vg0\n    # pvremove -f /dev/sdb\n\n#### Encryption with GRUB\nTo decrypt your disk on GRUB, only the `us` keymap is working for now.\n\n#### ZFS with Grub\nBy default, if you use ZFS with `musl` or `voidlinux` the `/boot` partition is not mounted automatically, so before an update, mout the partition.\n\n    # zpool status\n    # zfs mount bpool/BOOT/void\n    # ls /boot\n\n#### ZFS with and without encryption\nFirst time on ZFS after 5min\n\n```txt\ndracut Warning: /dev/disk/by-uuid/\u003cDISK\u003e does not exist\n```\n\nDracut try to mount inexistent device. Just wait for enter in the shell and remove the disk uuid from `/lib/dracut/hooks/initqueue/finished/`\n\n    # ls /lib/dracut/hooks/initqueue/finished/*\n    # rm /lib/dracut/hooks/initqueue/finished/dev*\n    # exit\n\nDracut should finally start `mount-zfs.sh` and ask for a password if encrypted. After you first login, mount the `/boot` partition and recompile the initramfs and your good.\n\n+ For Gentoo: `emerge --config sys-kernel/gentoo-kernel-bin`\n+ For Voidlinux: `xbps-reconfigure -fa`\n\nIf it doesn't work, try to start script manually (always in the shell):\n\n    # . /lib/dracut/hooks/mount/98-mount-zsh.sh\n    # . /lib/dracut/hooks/mount/99-mount-root.sh\n    # exit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszorfein%2Fgetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszorfein%2Fgetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszorfein%2Fgetch/lists"}