{"id":13711084,"url":"https://github.com/cbdevnet/jamdisk","last_synced_at":"2025-05-06T20:31:46.549Z","repository":{"id":68378677,"uuid":"133387449","full_name":"cbdevnet/jamdisk","owner":"cbdevnet","description":"Toolchain for creating custom initial RAM filesystems","archived":false,"fork":false,"pushed_at":"2021-04-19T14:20:09.000Z","size":11,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-13T21:44:50.913Z","etag":null,"topics":["initramfs","initramfs-generator","initrd","linux-boot"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbdevnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-05-14T16:02:13.000Z","updated_at":"2021-04-19T14:20:12.000Z","dependencies_parsed_at":"2023-02-23T11:00:21.138Z","dependency_job_id":null,"html_url":"https://github.com/cbdevnet/jamdisk","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/cbdevnet%2Fjamdisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbdevnet%2Fjamdisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbdevnet%2Fjamdisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbdevnet%2Fjamdisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbdevnet","download_url":"https://codeload.github.com/cbdevnet/jamdisk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252764390,"owners_count":21800685,"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":["initramfs","initramfs-generator","initrd","linux-boot"],"created_at":"2024-08-02T23:01:04.269Z","updated_at":"2025-05-06T20:31:46.138Z","avatar_url":"https://github.com/cbdevnet.png","language":"Shell","readme":"# jamdisk\n\n**jamdisk** is a minimal framework for building [initial RAM filesystems (initramfs)](https://wikipedia.org/wiki/Initramfs)\nfiles used for system initalization during boot.\nUsually, these are generated by your operating system (if you even need them) and simply mount the actual root file system before transitioning to it.\n\nThey can, however, be used as powerful minimal environments for things like system and disk management, disaster\nrecovery or system setup.\n\n**jamdisk** wants to make it easy to create initial RAM filesystems for such purposes by abstracting the\ncomplications (such as fiddling with library dependencies) away, while still staying as minimal as possible.\n\n## Usage\n\n**jamdisk** supports two primary methods of customization. To create your own project, you can use one or both\nof them, though most projects will require both.\n\n### The project script\n\nThe project script is run by jamdisk while the image is being built and can be used to extend the ramdisk\nenvironment with additional tools, libraries and kernel modules. As most hardware won't work without the proper\ndrivers loaded, this section is very important. If you don't use it, your project will be limited to the capabilites\nof the default BusyBox.\n\nSimply create a file named `projectname.script` in your jamdisk directory and fill it with calls to the following\nfunctions:\n\n* `want_bin \u003cprogram binary\u003e`: Copy a binary executable to the initramfs. This also recursively includes shared libraries the binary depends on.\n* `want_lib \u003cshared library\u003e`: Include a shared library in your initramfs, including its dependencies.\n* `want_module \u003ckernel module name\u003e`: Include a kernel module and its dependencies in the initramfs. Included kernel modules will be loaded by the init script.\n* `want_dir \u003cabsolute directory path\u003e`: Include a complete directory by an absolute path (the directory will be available at the same path in the booted system).\n* `want_file \u003cabsolute file path\u003e`: Include a single file by its absolute path (the file will be available at the same path in the booted system).\n\nNote that all binaries, modules and files you want to include in the initramfs have to exist (i.e., be installed) on the system running jamdisk.\n\n### The project override directory\n\nTo add arbitrary files to your initramfs, such as program data or custom scripts, just create a directory named for\nyour project. This directory will be copied into the initramfs as-is, preserving symlinks if possible.\n\nIf present, the jamdisk init script will execute the `main` binary within the root of your project, which may\nalso be a script if the interpreter is correct and present within the initramfs. This can be used to implement\nmenus and other custom functionality.\n\n### Creating the image\n\nTo create an initramfs for your project, run `./jamdisk \u003cprojectname\u003e`. To create a minimal initramfs running\njust a shell, you can omit the argument. Note that jamdisk requires read access to the binaries it is instructed\nto include, so if you want to copy privileged binaries (e.g., from `/sbin`) to your initramfs, you need to run\njamdisk as root.\n\n### Booting the image\n\nAs jamdisk was created primarily with PXE boot environments in mind, it ships with an example [pxelinux configuration file](pxelinux.cfg).\njamdisk uses the kernel modules from the host on which it is run. This means that the appropriate kernel should be used to boot the resulting initramfs,\nthough in many cases, the ABI remains stable so other versions might work.\nIt is of course also possible to boot the resulting initramfs files from a bootloader of your choice (such as Grub, LiLo, etc).\n\nAny parameters passed to the initramfs (e.g. via an `APPEND` directive) are present in the `main` script of your project.\n\nWhen booting with PXELinux, setting the `SYSAPPEND 2` flag provides the init script with the MAC address of the interface used to PXE boot the system. This information can then be used by the script to configure networking.\n\n## The `stowaway` project\n\n**stowaway** was the original reason for the creation of jamdisk. It provides a simple, bootable interface to create\nand restore full-disk host backups quickly and without much configuration.\n\n# Author \u0026 Licensing\nSee [LICENSE.txt](LICENSE.txt)\n","funding_links":[],"categories":["Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbdevnet%2Fjamdisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbdevnet%2Fjamdisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbdevnet%2Fjamdisk/lists"}