Skip to content

A lightweight Rust-based tool to inspect and analyze disk partitions on Linux systems.

License

Notifications You must be signed in to change notification settings

thebigmatchplayer/rdisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdisk

rdisk is a simple Rust CLI tool to detect the partition scheme of a disk device or disk image file. It checks whether the disk uses MBR (Master Boot Record) or GPT (GUID Partition Table) by reading the raw disk bytes.


Features

  • Detects MBR by checking the boot signature at bytes 510-511 (0x55 0xAA).
  • Detects GPT by reading the GPT header signature "EFI PART" at byte 512.
  • Returns an error if neither signature is found.

Usage

Build the program:

cargo build --release

Copy the built binary to /usr/local/bin/rdisk

sudo cp rdisk /usr/local/bin/rdisk

Run the program with the disk device or disk image file as an argument:

sudo rdisk /dev/sda

Example output:

/dev/sda is GPT
/dev/loop6 is MBR

About

A lightweight Rust-based tool to inspect and analyze disk partitions on Linux systems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages