{"id":17134306,"url":"https://github.com/fnichol/arch-linux-installer","last_synced_at":"2025-10-19T02:58:37.000Z","repository":{"id":66119224,"uuid":"230983788","full_name":"fnichol/arch-linux-installer","owner":"fnichol","description":"Arch Linux with ZFS installer","archived":false,"fork":false,"pushed_at":"2023-06-28T05:00:00.000Z","size":168,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T09:57:02.325Z","etag":null,"topics":["arch-linux","archlinux","encryption","installer","zfs","zfsonlinux"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fnichol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2019-12-30T21:43:27.000Z","updated_at":"2024-05-16T21:11:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"38287676-52c3-459b-8de8-bc0c6b4c3435","html_url":"https://github.com/fnichol/arch-linux-installer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Farch-linux-installer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Farch-linux-installer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Farch-linux-installer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Farch-linux-installer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnichol","download_url":"https://codeload.github.com/fnichol/arch-linux-installer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688543,"owners_count":21145763,"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":["arch-linux","archlinux","encryption","installer","zfs","zfsonlinux"],"created_at":"2024-10-14T19:44:35.029Z","updated_at":"2025-10-19T02:58:31.960Z","avatar_url":"https://github.com/fnichol.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arch Linux Installer\n\n|         |                                           |\n| ------: | ----------------------------------------- |\n|      CI | [![CI Status][badge-ci-overall]][ci]      |\n| License | [![Crate license][badge-license]][github] |\n\n**Table of Contents**\n\n\u003c!-- toc --\u003e\n\n## Usage\n\n### `install`\n\nYou can use the `-h`/`--help` flag to get:\n\n```console\n$ ./bin/install --help\ninstall 0.1.0\n\nArch Linux with ZFS installer.\n\nUSAGE:\n    install [FLAGS] [OPTIONS] \u003cDISK\u003e \u003cNETIF\u003e\n\nFLAGS:\n    -e, --encrypt     Encrypts the partition for the zpool\n                      (default: no)\n    -h, --help        Prints help information\n    -I, --hibernation Enables hibernation/resume (WARNING: experimental!)\n                      (default: no)\n    -S, --suffix      Appends a unique suffix to zpool names\n    -V, --version     Prints version information\n    -W, --no-swap     Do not include a swap partition\n                      (default: create swap)\n\nOPTIONS:\n    -b, --boot-part=\u003cPART\u003e      Choose a boot partition for type partition\n                                (ex: nvme0n1p3)\n    -E, --encrypt-pass=\u003cFILE\u003e   Read the root pool password from file\n                                (default: prompt)\n    -l, --legacy-part=\u003cPART\u003e    Choose a legacy BIOS boot partition for\n                                type partition (ex: nvme0n1p5)\n    -p, --partition=\u003cTYPE\u003e      Choose a partitioning type (default: whole)\n                                (values: existing, remaining, whole)\n    -P, --root-pass=\u003cFILE\u003e      Read initial root password from file\n                                (default: prompt)\n    -r, --root-part=\u003cPART\u003e      Choose a root partition for type partition\n                                (ex: nvme0n1p4)\n    -s, --swap-part=\u003cPART\u003e      Choose a swap partition for type partition\n                                (ex: nvme0n1p2)\n    -t, --timezone=\u003cTZ\u003e         Timezone (ex: `America/Edmonton')\n                                (default: `UTC')\n        --bpool-size=\u003cSIZE\u003e     Size for boot pool partition, using sgdisk\n                                sizes (default: 4G)\n        --esp-size=\u003cSIZE\u003e       Size for ESP partition if using whole\n                                partitioning type, using sgdisk sizes\n                                (default: 4G)\n        --rpool-size=\u003cSIZE\u003e     Size for root pool partition, using sgdisk\n                                sizes (default: empty, uses all remaining)\n        --swap-size=\u003cSIZE\u003e      Size for swap partition if enabled, using\n                                sgdisk sizes (default: size of RAM)\n\nARGS:\n    \u003cDISK\u003e      The disk to use for installation (ex: `nvme0n1')\n                This can be found by using the `lsblk' program.\n    \u003cNETIF\u003e     The network interface to setup for DHCP (ex: `ens33')\n                This can be found by using the `ip addr' program.\n\nEXAMPLES:\n    Example 1 Installing with default behavior\n      The following command installs Arch Linux using the whole disk,\n      with a swap partition, without encryption, and a timezone of\n      `UTC'.\n\n      # install nvme0n1 ens33\n\n    Example 2\n      The following command installs Arch Linux using the whole disk,\n      without a swap partition, with root pool encryption, and a\n              timezone of Mountain time in North America.\n\n      # install --encrypt --no-swap -timezone=America/Edmonton \\\n        nvme0n1 ens33\n\n    Example 3\n      The following command installs Arch Linux using the remaining space\n      on the disk, with a swap partition, without encryption, and a\n      timezone of `UTC'.\n\n      # install --partition=remaining nvme0n1 ens33\n\nAUTHOR:\n    Fletcher Nichol \u003cfnichol@nichol.ca\u003e\n\n```\n\n### `remote-install`\n\nYou can use the `-h`/`--help` flag to get:\n\n```sh\n./bin/remote-install --help\n\n```\n\n## Custom Version of Kernel\n\nIf the version of `archzfs-linux` requires an older version of `linux` and\n`linux-headers` you can download an older version of each of these from the\nrolling release archives at:\nhttps://archive.archlinux.org/repos/YYYY/MM/DD/core/os/x86_64/. You can create\nan `override/` directory which will be used by `archiso/build` to add an\n`[override]` Arch repository and will start a web server to serve up packages\nback to itself. For this, you'll also need to run `repo-add` (on an Arch system)\nin that directory to prepare the metadata files.\n\n```sh\n./libexec/run-with-docker\n```\n\n```sh\ncd archiso\n```\n\n```sh\nmkdir override\ncd override\n\nversion=5.3.13.1-1\ndate=2019/12/02\nurl=\"https://archive.archlinux.org/repos/$date/core/os/x86_64\"\n```\n\n```sh\nfor u in $url/linux{,-headers}-${version}.arch1-1-x86_64.pkg.tar.zst{,.sig}; do\n  curl -SfL $u -o $(basename $u)\ndone\nrepo-add override.db.tar.xz *.pkg.tar.zst\n```\n\n## Recovering a System with ArchISO\n\nStart the system with an Archiso USB key or CD/DVD image mounted to boot from.\n\n### Login\n\n_(Optional)_ Once booted, the system may require network connectivity if it\nisn't plugged into wired networking. In this case, connect to a Wifi network\nwith:\n\n```sh\nwifi-menu\n```\n\n_(Optional)_ If it's easier to connect to the system remotely, then use SSH and\nconnect with the `root` user. To ignore the randomly generated server key use\n`ssh` options with:\n\n```sh\nssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$HOST\n```\n\n### Find Partitions\n\nLet's start by setting up some variables for the _boot_ and _root_ ZFS pools:\n\n```sh\nboot_pool=bpool\nroot_pool=rpool\n```\n\nTo find the EFI System Partition (ESP):\n\n```sh\nesp_dev=\"$(fdisk -l | awk '/EFI System$/ { print $1 }')\"\n```\n\n### Import Pools\n\nNext, import the ZFS pools with:\n\n```sh\nzpool import -N -d /dev/disk/by-id -R /mnt \"$root_pool\"\nzpool import -N -d /dev/disk/by-id -R /mnt \"$boot_pool\"\n```\n\n### (Optional) Opening Encrypted Partitions\n\nIf the _root_ pool is encrypted then decrypt it with:\n\n```sh\nzfs load-key \"$root_pool\"\n```\n\n### Mount Filesystems\n\nThe ZFS filesystems need to be mounted in a particular order to replicate how\nthey would be presented on a booted system:\n\n```sh\n# Root fs has `canmount=off` so must be mounted explicitly first\nzfs mount \"$root_pool/ROOT/default\"\n\n# Boot fs has `mountpoint=legacy` so must be mounted with target\nmount -t zfs \"$boot_pool/BOOT/default\" /mnt/boot\n\n# Remaining fs can be auto-mounted\nzfs mount -a\n```\n\nFinally, the ESP can be mounted:\n\n```sh\nmount \"$esp_dev\" /mnt/boot/efi\n```\n\n### Chroot into System\n\nNow that the filesystem is setup, enter a `chroot` with:\n\n```sh\narch-chroot /mnt /bin/bash\n```\n\nAnd when done, `exit` to exit the `chroot`:\n\n```sh\nexit\n```\n\n### Unmount Filesystems\n\nUnmounting the filesystems work in the reverse order of mounting:\n\n```sh\numount /mnt/boot/efi\nzfs unmount -a\numount /mnt/boot\nzfs unmount \"$root_pool/ROOT/default\"\n```\n\n### Export Pools\n\nEnsure that the ZFS pools are exported so they will cleanly import on the next\nsystem boot:\n\n```sh\nzpool export \"$boot_pool\"\nzpool export \"$root_pool\"\n```\n\n### Reboot\n\nAnd finally, reboot while ensuring that the USB key or CD/DVD is removed on\nbootup:\n\n```sh\nreboot\n```\n\n## References\n\n### ZFS Root Installation Reference Materials\n\n- [OpenZFS: Arch Linux](https://openzfs.github.io/openzfs-docs/Getting%20Started/Arch%20Linux/index.html)\n- [OpenZFS: Arch Linux Root on ZFS](https://openzfs.github.io/openzfs-docs/Getting%20Started/Arch%20Linux/Root%20on%20ZFS/0-overview.html)\n- [Full disk encryption, including /boot: Unlocking LUKS devices from GRUB](https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html)\n- [Installing Arch Linux on ZFS](https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_ZFS)\n- [Arch Linux ZFS](https://wiki.archlinux.org/index.php/ZFS)\n- [Arch Linux Installation Guide](https://wiki.archlinux.org/index.php/Installation_guide)\n- [Arch Linux on ZFS - Part 1: Embed ZFS in Archiso](https://ramsdenj.com/2016/06/23/arch-linux-on-zfs-part-1-embed-zfs-in-archiso.html)\n- [Arch Linux on ZFS - Part 2: Installation](https://ramsdenj.com/2016/06/23/arch-linux-on-zfs-part-2-installation.html)\n- [Installing archlinux with zfs](https://github.com/PositronicBrain/archzfs/blob/master/Install.md)\n- [Arch Linux Wiki: dm-crypt/System configuration](https://wiki.archlinux.org/title/Dm-crypt/System_configuration#Boot_loader)\n- [How to change the hash-spec and iter-time of an existing dm-crypt LUKS device?](https://unix.stackexchange.com/questions/101343/how-to-change-the-hash-spec-and-iter-time-of-an-existing-dm-crypt-luks-device)\n- [Install Arch Linux on ZFS with Native ROOT Encryption](https://ashu.io/blog/arch-zfs-enc/)\n\n### Package Repository Links\n\n- Archzfs: http://archzfs.com/archzfs/x86_64/\n- https://archive.archlinux.org/packages/l/linux/\n- https://archive.archlinux.org/packages/l/linux-headers/\n- Arch Archive by date:\n  https://archive.archlinux.org/repos/2018/04/19/core/os/x86_64/\n\n## Code of Conduct\n\nThis project adheres to the Contributor Covenant [code of\nconduct][code-of-conduct]. By participating, you are expected to uphold this\ncode. Please report unacceptable behavior to fnichol@nichol.ca.\n\n## Issues\n\nIf you have any problems with or questions about this project, please contact us\nthrough a [GitHub issue][issues].\n\n## Contributing\n\nYou are invited to contribute to new features, fixes, or updates, large or\nsmall; we are always thrilled to receive pull requests, and do our best to\nprocess them as fast as we can.\n\nBefore you start to code, we recommend discussing your plans through a [GitHub\nissue][issues], especially for more ambitious contributions. This gives other\ncontributors a chance to point you in the right direction, give you feedback on\nyour design, and help you find out if someone else is working on the same thing.\n\n## Authors\n\nCreated and maintained by [Fletcher Nichol][fnichol] (\u003cfnichol@nichol.ca\u003e).\n\n## License\n\nLicensed under the Mozilla Public License Version 2.0 ([LICENSE.txt][license]).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the MPL-2.0 license, shall be\nlicensed as above, without any additional terms or conditions.\n\n[badge-check-format]:\n  https://img.shields.io/cirrus/github/fnichol/arch-linux-installer.svg?style=flat-square\u0026task=check\u0026script=format\n[badge-check-lint]:\n  https://img.shields.io/cirrus/github/fnichol/arch-linux-installer.svg?style=flat-square\u0026task=check\u0026script=lint\n[badge-ci-overall]:\n  https://img.shields.io/cirrus/github/fnichol/arch-linux-installer.svg?style=flat-square\n[badge-license]: https://img.shields.io/badge/License-MPL%202.0%20-blue.svg\n[ci]: https://cirrus-ci.com/github/fnichol/arch-linux-installer\n[ci-master]: https://cirrus-ci.com/github/fnichol/arch-linux-installer/master\n[code-of-conduct]:\n  https://github.com/fnichol/arch-linux-installer/blob/master/CODE_OF_CONDUCT.md\n[fnichol]: https://github.com/fnichol\n[github]: https://github.com/fnichol/arch-linux-installer\n[issues]: https://github.com/fnichol/arch-linux-installer/issues\n[license]:\n  https://github.com/fnichol/arch-linux-installer/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnichol%2Farch-linux-installer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnichol%2Farch-linux-installer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnichol%2Farch-linux-installer/lists"}