{"id":25649779,"url":"https://github.com/openchami/aria2-initrd","last_synced_at":"2025-10-10T04:13:20.617Z","repository":{"id":265554857,"uuid":"895140291","full_name":"OpenCHAMI/aria2-initrd","owner":"OpenCHAMI","description":"experimental repository for using aria2 to download the kernel/initrd over bittorrent","archived":false,"fork":false,"pushed_at":"2024-12-10T07:08:33.000Z","size":23,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-10T08:19:23.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/OpenCHAMI.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T16:22:04.000Z","updated_at":"2024-11-29T22:38:54.000Z","dependencies_parsed_at":"2024-11-29T23:16:49.872Z","dependency_job_id":null,"html_url":"https://github.com/OpenCHAMI/aria2-initrd","commit_stats":null,"previous_names":["openchami/aria2-initrd"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Faria2-initrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Faria2-initrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Faria2-initrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenCHAMI%2Faria2-initrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenCHAMI","download_url":"https://codeload.github.com/OpenCHAMI/aria2-initrd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240329427,"owners_count":19784450,"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":[],"created_at":"2025-02-23T14:33:46.705Z","updated_at":"2025-10-10T04:13:15.599Z","avatar_url":"https://github.com/OpenCHAMI.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aria2-initrd\n\nA minimal initrd implementation using `aria2` for downloading files during the early boot process. This project is designed for environments where fetching large files (e.g., container images or boot configurations) from remote sources is essential.\n\n## Features\n\n- **Containerized Build Process:** Uses a Docker container to ensure a consistent and reproducible build environment.\n- **Efficient File Downloads:** Utilizes [aria2](https://github.com/aria2/aria2), a lightweight and high-performance download utility supporting HTTP(S), FTP, and BitTorrent protocols.\n- **Lightweight Design:** Aimed at minimal environments, keeping the initrd as small as possible.\n- **Highly Configurable:** Supports passing custom download URLs and options through kernel parameters.\n- **Parallelism:** Leverages aria2's ability to perform concurrent downloads for faster bootstrapping.\n\n## Use Cases\n\n- **HPC Cluster Bootstrapping:** Fetching configuration files or images for stateless node setups.\n- **Diskless Systems:** Loading operating system components or tools directly into memory.\n- **Custom Deployment Workflows:** Downloading initialization resources for custom boot environments.\n\n## Getting Started\n\n### Prerequisites\n\n- Docker installed on your system.\n\n### Using the Pre-Built Container to Build the Initrd\n\nA pre-built container image is available on GitHub Container Registry (GHCR) to simplify the initrd building process.\n\n1. Pull the pre-built container:\n   ```bash\n   docker pull ghcr.io/openchami/aria2-initrd:latest\n   ```\n\n2. Run the container to build the initrd:\n   ```bash\n   docker run --rm -v \"$(pwd)/output:/output\" ghcr.io/openchami/aria2-initrd:latest\n   ```\n   The generated `initrd.img` will be located in the `output/` directory.\n\n3. Customize the kernel command line to include download parameters:\n   ```\n   initrd=initrd.img url=http://example.com/resource1,http://example.com/resource2\n   ```\n\n   Replace `http://example.com/resourceX` with the URLs of the files you want to download.\n\n### Kernel Parameters\n\n#### `url`\nComma-separated list of URLs to download. Example:\n```\nurl=http://example.com/file1,http://example.com/file2\n```\n\n#### `output_dir`\nOptional. Directory where files will be stored. Defaults to `/tmp`.\n\n#### `aria2_options`\nOptional. Custom aria2 options passed directly to the downloader. Example:\n```\naria2_options=\"--max-concurrent-downloads=4 --timeout=60\"\n```\n\n#### `next_kernel_params`\nThis parameter allows you to specify kernel parameters for the next boot phase.\n\nExample:\n```\nnext_kernel_params=\"url=http://example.com/new-initrd.img new_param=value quiet\"\n```\n\nDuring the boot process, the initrd will:\n1. Parse `next_kernel_params` from the kernel command line.\n2. Pass these parameters to the next kernel during the next boot phase, enabling workflows such as:\n   - **Stateless Systems:** Dynamically configure the next kernel boot.\n   - **Multiphase Boot Scenarios:** Apply different parameters for subsequent boot phases.\n\n\n# Testing\n\n1. Use [QEMU](https://www.qemu.org/) or another virtualization platform to test the generated initrd:\n   ```bash\n   qemu-system-x86_64 -kernel /path/to/vmlinuz -initrd output/initrd.img -append \"url=http://example.com/resource\"\n   ```\n\n2. Monitor the output logs to confirm the download process.\n\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Acknowledgments\n\n- Inspired by the flexibility and power of `aria2`.\n- Designed with HPC cluster bootstrapping and custom deployments in mind.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchami%2Faria2-initrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenchami%2Faria2-initrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenchami%2Faria2-initrd/lists"}