{"id":31129112,"url":"https://github.com/p14c31355/isobemak","last_synced_at":"2026-05-23T01:06:24.186Z","repository":{"id":277034904,"uuid":"931111206","full_name":"p14c31355/isobemak","owner":"p14c31355","description":"iso be make (wip)","archived":false,"fork":false,"pushed_at":"2025-09-14T12:43:41.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-14T14:20:49.768Z","etag":null,"topics":["iso","iso9660"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p14c31355.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-11T18:27:10.000Z","updated_at":"2025-09-14T12:03:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"526c1d75-01d2-46b2-a91e-41479f1a8da5","html_url":"https://github.com/p14c31355/isobemak","commit_stats":null,"previous_names":["yoshitakanaraoka/boajs_tutorial","p14c31355/boajs_tutorial","p14c31355/isobemak"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/p14c31355/isobemak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p14c31355%2Fisobemak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p14c31355%2Fisobemak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p14c31355%2Fisobemak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p14c31355%2Fisobemak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p14c31355","download_url":"https://codeload.github.com/p14c31355/isobemak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p14c31355%2Fisobemak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275696227,"owners_count":25511352,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["iso","iso9660"],"created_at":"2025-09-18T01:54:44.272Z","updated_at":"2026-05-23T01:06:24.181Z","avatar_url":"https://github.com/p14c31355.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# isobemak\n\n**isobemak** is a Rust crate for creating bootable ISO 9660 images with UEFI and BIOS support. It can generate standard ISO images or hybrid isohybrid images that can boot from both optical media and USB drives.\n\n## Features\n\n- ISO 9660 Filesystem Creation: Generates standard ISO 9660 filesystem structures\n- UEFI Boot Support: Creates UEFI-bootable images with proper ESP (EFI System Partition) handling\n- BIOS/El Torito Boot Support: Provides legacy BIOS boot capability\n- Hybrid Isohybrid Images: Generates hybrid images that can boot both as optical media and USB drives with GPT/MBR structures\n- FAT32 ESP Creation: Automatically creates FAT32-formatted EFI System Partitions for UEFI booting\n- Additional EFI Boot Files: Supports including extra EFI binaries (e.g. GRUBX64.EFI) in the ESP FAT image\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nisobemak = \"0.2.5\"\n```\n\n## Usage\n\nThe primary function is `build_iso`, which takes a configured `IsoImage` and generates the ISO file.\n\n### Basic Example\n\n```rust\nuse isobemak::{build_iso, IsoImage, IsoImageFile, BootInfo, UefiBootInfo};\nuse std::path::PathBuf;\n\nlet isolinux_bin_path = PathBuf::from(\"path/to/isolinux.bin\");\nlet kernel_path = PathBuf::from(\"path/to/kernel\");\nlet bootx64_efi_path = PathBuf::from(\"path/to/BOOTX64.EFI\");\nlet iso_output_path = PathBuf::from(\"bootable.iso\");\n\nlet iso_image = IsoImage {\n    volume_id: Some(\"basic\".to_string()),\n    files: vec![\n        IsoImageFile {\n            source: kernel_path.clone(),\n            destination: \"kernel\".to_string(),\n        },\n    ],\n    boot_info: BootInfo {\n        bios_boot: None,\n        uefi_boot: Some(UefiBootInfo {\n            boot_image: bootx64_efi_path.clone(),\n            kernel_image: kernel_path.clone(),\n            destination_in_iso: \"EFI/BOOT/BOOTX64.EFI\".to_string(),\n            additional_efi_boot_files: Vec::new(),\n        }),\n    },\n};\n\n// Create a standard UEFI-bootable ISO\nlet (iso_path, _temp_fat, _iso_file, _fat_size) = build_iso(\u0026iso_output_path, \u0026iso_image, false)?;\n```\n\n### Hybrid Isohybrid Example\n\n```rust\nuse isobemak::{build_iso, IsoImage, IsoImageFile, BootInfo, BiosBootInfo, UefiBootInfo};\nuse std::path::PathBuf;\n\nlet isolinux_bin_path = PathBuf::from(\"path/to/isolinux.bin\");\nlet kernel_path = PathBuf::from(\"path/to/kernel\");\nlet bootx64_efi_path = PathBuf::from(\"path/to/BOOTX64.EFI\");\nlet iso_output_path = PathBuf::from(\"hybrid.iso\");\n\nlet iso_image = IsoImage {\n    volume_id: Some(\"hybrid\".to_string()),\n    files: vec![\n        IsoImageFile {\n            source: kernel_path.clone(),\n            destination: \"kernel\".to_string(),\n        },\n    ],\n    boot_info: BootInfo {\n        bios_boot: Some(BiosBootInfo {\n            boot_image: isolinux_bin_path.clone(),\n            destination_in_iso: \"isolinux/isolinux.bin\".to_string(),\n        }),\n        uefi_boot: Some(UefiBootInfo {\n            boot_image: bootx64_efi_path.clone(),\n            kernel_image: kernel_path.clone(),\n            destination_in_iso: \"EFI/BOOT/BOOTX64.EFI\".to_string(),\n            additional_efi_boot_files: Vec::new(),\n        }),\n    },\n};\n\n// Create a hybrid isohybrid ISO that can boot from both CD/DVD and USB\nlet (iso_path, _temp_fat, _iso_file, _fat_size) = build_iso(\u0026iso_output_path, \u0026iso_image, true)?;\n```\n\n### Hybrid Isohybrid with GRUBX64.EFI\n\n```rust\nuse isobemak::{build_iso, IsoImage, IsoImageFile, BootInfo, UefiBootInfo};\nuse std::path::PathBuf;\n\nlet bootx64_path = PathBuf::from(\"path/to/BOOTX64.EFI\");\nlet grubx64_path = PathBuf::from(\"path/to/GRUBX64.EFI\");\nlet kernel_path = PathBuf::from(\"path/to/kernel\");\nlet iso_output_path = PathBuf::from(\"hybrid_grub.iso\");\n\nlet iso_image = IsoImage {\n    volume_id: Some(\"hybrid\".to_string()),\n    files: vec![\n        IsoImageFile {\n            source: kernel_path.clone(),\n            destination: \"kernel\".to_string(),\n        },\n    ],\n    boot_info: BootInfo {\n        bios_boot: None,\n        uefi_boot: Some(UefiBootInfo {\n            boot_image: bootx64_path.clone(),\n            kernel_image: kernel_path.clone(),\n            destination_in_iso: \"EFI/BOOT/BOOTX64.EFI\".to_string(),\n            additional_efi_boot_files: vec![\n                (\"GRUBX64.EFI\".to_string(), grubx64_path.clone()),\n            ],\n        }),\n    },\n};\n\n// Create a hybrid isohybrid ISO with GRUBX64.EFI in the ESP\nlet (iso_path, _temp_fat, _iso_file, _fat_size) = build_iso(\u0026iso_output_path, \u0026iso_image, true)?;\n```\n\n## How It Works\n\n### Standard ISO Creation\n\n1. Filesystem Preparation: Creates an ISO 9660 filesystem structure with directories and file records\n2. Boot Catalog Creation: Generates an El Torito boot catalog pointing to boot images\n3. Volume Descriptors: Writes Primary Volume Descriptor, Boot Record Volume Descriptor, and Volume Descriptor Set Terminator\n4. File Copying: Copies all specified files into the ISO at their designated locations\n\n### Isohybrid (Hybrid) Creation\n\nFor hybrid images, the process additionally includes:\n\n1. EFI System Partition Creation: Generates a FAT32-formatted disk image containing the UEFI bootloader and kernel\n2. Additional EFI Files: Includes any extra EFI binaries (e.g. GRUBX64.EFI) in the ESP\n3. ESP Embedding: Embeds the EFI System Partition into the ISO at a specific location (LBA 34)\n4. MBR/GPT Structures: Adds Master Boot Record and GUID Partition Table structures to make the image USB-bootable\n5. Hybrid Boot Catalog: Creates boot catalog entries for both BIOS (MBR) and UEFI (ESP) booting\n\n## API Overview\n\n### Core Functions\n\n- `build_iso(iso_path: \u0026Path, image: \u0026IsoImage, is_isohybrid: bool)` - Main ISO creation function\n\n### Configuration Structures\n\n- `IsoImage` - Top-level configuration containing files and boot information\n- `IsoImageFile` - Specifies source file and destination path in ISO\n- `BootInfo` - Contains optional BIOS and UEFI boot configurations\n- `BiosBootInfo` - BIOS/El Torito boot settings\n- `UefiBootInfo` - UEFI boot settings including ESP creation and optional additional EFI files\n\n### Builder Pattern Alternative\n\nFor more control, you can use the `IsoBuilder`:\n\n```rust\nuse isobemak::{IsoBuilder, BootInfo, BiosBootInfo, UefiBootInfo};\nuse std::fs::File;\nuse std::path::{Path, PathBuf};\n\nlet mut builder = IsoBuilder::new();\nbuilder.set_isohybrid(true);\n\nbuilder.add_file(\"kernel\", PathBuf::from(\"my_kernel\"))?;\nbuilder.add_file(\"initrd.img\", PathBuf::from(\"my_initrd\"))?;\n\nlet boot_info = BootInfo {\n    bios_boot: Some(BiosBootInfo {\n        boot_image: PathBuf::from(\"isolinux.bin\"),\n        destination_in_iso: \"isolinux/isolinux.bin\".to_string(),\n    }),\n    uefi_boot: Some(UefiBootInfo {\n        boot_image: PathBuf::from(\"BOOTX64.EFI\"),\n        kernel_image: PathBuf::from(\"kernel\"),\n        destination_in_iso: \"EFI/BOOT/BOOTX64.EFI\".to_string(),\n        additional_efi_boot_files: Vec::new(),\n    }),\n};\n\nbuilder.set_boot_info(boot_info);\n\nlet mut iso_file = File::create(\"output.iso\")?;\nbuilder.build(\u0026mut iso_file, Path::new(\"output.iso\"), None, None)?;\n```\n\n## Project Structure\n\n- `src/lib.rs` - Main library exports and definitions\n- `src/iso/` - ISO 9660 filesystem implementation\n  - `builder.rs` - Core ISO building logic\n  - `iso_writer.rs` - File writing and descriptor creation\n  - `fs_node.rs` - Filesystem node representations\n  - `volume_descriptor.rs` - Volume descriptor structures\n  - `gpt/` - GUID Partition Table support for hybrid images\n- `src/fat.rs` - FAT32 ESP creation utilities\n- `src/utils.rs` - Utility functions and constants\n\n## Dependencies\n\n- `crc32fast` - CRC32 checksum calculation\n- `fatfs` - FAT filesystem manipulation\n- `uuid` - UUID generation for GPT partitions\n- `tempfile` - Temporary file handling\n- `regex` - Text processing utilities\n\n## License\n\nLicensed under both MIT and Apache 2.0 licenses.\n\n## Contributing\n\nContributions are welcome! Please see the contributing guide at `docs/CONTRIBUTING.md`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp14c31355%2Fisobemak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp14c31355%2Fisobemak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp14c31355%2Fisobemak/lists"}