{"id":20885567,"url":"https://github.com/tomdionysus/ramdisk","last_synced_at":"2025-04-19T12:40:30.041Z","repository":{"id":214814427,"uuid":"737422706","full_name":"tomdionysus/ramdisk","owner":"tomdionysus","description":"An experimental/teaching project to create a linux block driver kernel module for a ramdisk.","archived":false,"fork":false,"pushed_at":"2024-01-08T05:37:33.000Z","size":36,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T10:45:07.874Z","etag":null,"topics":["block-device","device","kernel-module","linux","ramdisk"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomdionysus.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":"2023-12-31T01:12:50.000Z","updated_at":"2024-12-06T19:42:16.000Z","dependencies_parsed_at":"2023-12-31T02:27:37.023Z","dependency_job_id":"367c6ea4-c78c-4c11-96d2-3e29a7936534","html_url":"https://github.com/tomdionysus/ramdisk","commit_stats":null,"previous_names":["tomdionysus/ramdisk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdionysus%2Framdisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdionysus%2Framdisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdionysus%2Framdisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdionysus%2Framdisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomdionysus","download_url":"https://codeload.github.com/tomdionysus/ramdisk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243268087,"owners_count":20263803,"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":["block-device","device","kernel-module","linux","ramdisk"],"created_at":"2024-11-18T08:13:52.526Z","updated_at":"2025-03-12T18:11:48.509Z","avatar_url":"https://github.com/tomdionysus.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ramdisk\n\nAn experimental/teaching project to create a linux block driver kernel module for a ramdisk - reimplementing [brd](https://docs.kernel.org/admin-guide/blockdev/ramdisk.html).\n\nThis is a kernel module that implements an in-memory blockstore, as a device `/dev/ramdisk`. The device is 100Mb in size.\n\nThe project is based on [Oleg Kutkov's article from 2020](https://olegkutkov.me/) - [Linux block device driver](https://olegkutkov.me/2020/02/10/linux-block-device-driver/).\n\nThe Linux block device API varies over different versions of the kernel, please see the following table for the branch which is compatible given your distro:\n\n| Linux Distribution | Version             | Linux Kernel          | Branch                                   |\n|--------------------|---------------------|-----------------------|------------------------------------------|\n| Ubuntu             | 22.04 LTS           | 5.15.0-91-generic     | [linux-5.15.x](../../tree/linux-5.15.x)  |\n| Ubuntu             | 22.04 LTS           | 6.2.0-39-generic      | [linux-6.2.x](../../tree/linux-6.2.x)    |\n| Alpine             | 3.19.0              | 6.6.7-0-lts           | [linux-6.2.x](../../tree/linux-6.2.x)    |\n| Raspberry Pi OS    | Debian GNU/Linux 11 | 6.1.21-v8+            | [linux-6.1.x](../../tree/linux-6.1.x)    |\n| Fedora             | 39                  | 6.5.6-300.fc39.x86_64 | [linux-6.2.x](../../tree/linux-6.2.x)    |\n\n    \nThese branches have been tested only with the specific distros and kernels. If your distro isn't listed, use the branch closest to your Linux kernel version - you can get the linux kernel version of your distro with the following:\n\n```bash\nuname -r\n```\n\nIt is my hope this might be useful as a starting point if you're writing your own block devices.\n\n## Status\n\nramdisk has been tested working in Jan 2024 on the platforms and kernels above, and can be considered BETA.\n\n## Build tools, linux headers, kernel module tools\n\nPlease follow the build instructions [for your distro](docs/build_distros.md).\n\n## Example Usage\n\nThese commands should show the device at `/dev/ramdisk`, format the ramdisk for ext4, create a mount directoy `/rdtest` and then mount the ramdisk at that mountpoint. The last `lsblk` will show the ramdisk mounted at that path.\n\n```bash\nmake load\nlsblk -l\nmkfs.ext4 /dev/ramdisk\nmkdir /rdtest\nmount /dev/ramdisk /rdtest\nlsblk -f\n```\n\n## Benchmark\n\nYou can measure the peformance of the ramdisk with `dd`. This assumes you mounted it at `/rdtest` as above:\n\n```bash\ndd if=/dev/zero of=/rdtest/testfile bs=1M count=50 oflag=direct\n```\n\n## License\n\nramdisk is licensed under the GNU General Public License v3. Please see [LICENSE](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdionysus%2Framdisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdionysus%2Framdisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdionysus%2Framdisk/lists"}