1
0
Fork 0
mirror of https://github.com/elysium-os/mkimg.git synced 2026-07-08 18:17:41 +02:00
Tiny tool for creating partitioned disk images
  • Go 87.9%
  • Nix 12.1%
Find a file
2026-01-06 18:25:20 +02:00
.gitignore Initial commit 2024-03-24 03:02:27 +01:00
flake.lock feat: major rework, eliminated the toml configuration in favor of cli configuration 2025-09-03 19:32:10 +03:00
flake.nix chore: update nix flake 2025-12-08 21:05:57 +02:00
go.mod feat: major rework, eliminated the toml configuration in favor of cli configuration 2025-09-03 19:32:10 +03:00
go.sum feat: major rework, eliminated the toml configuration in favor of cli configuration 2025-09-03 19:32:10 +03:00
LICENSE chore: bump license to 2026 2026-01-06 18:25:20 +02:00
main.go fix: fsCopy 2025-11-05 20:56:39 +02:00
README.md docs: update readme 2025-09-03 23:36:27 +03:00

mkimg

mkimg is a tiny tool to simplify the process of creating partitioned disk images.

Usage

mkimg [options]

--partition string, -p string
Create a partition in the image (see more).

--name string, --dest string, -o string
Path or name of destination image (default: "mkimg.img").

--first-sector uint
Sector number of the first partition (default: 2048).

--protective-mbr, --pmbr
Whether to set a protective mbr or not (default: false).

--bootsector string
Path to a bootsector if wanted.

--help, -h
Show help.

Partition

The partition option takes a set of key value entries separated by colons. The key values are separated by equal signs. The valid keys are:

Key Value Partition Type Description
type fs, file The type of the partition.
name string The name of the partition.
gpt-type string (UUID) GPT type of the partition.
file string (path) file Path to a file that will be written into the partition as raw data.
fs-type fat32 fs Filesystem type of the FS partition.
fs-size number (mb) fs Size of the FS partition in mb.
fs-root string (path) fs Path to a directory that will be copied in as the root of the FS partition.
fs-files string (see description) fs List of files or directories that will be copied into the FS partition. Paths in the string are separated by a #. An explicit destination can be defined by adding an @ followed by a path after the source path. If no explicit destination has been defined the destination will be the basename of the source path at the root of the filesystem.