This program can read the contents of your drive's MBR, much like the popular Linux utility, fdisk.
It will print the following list of items (so long as they exist):
- Disk Signature
- Copy Protection
- Disk Size
- Partition Info (Traditional MBR supports up to 4 partitions)
- Partition Status
- Partition Type
- Starting CHS (Cylinder, Head, Sector) Triple
- Ending CHS (Cylinder, Head, Sector) Triple
- Starting LBA
- Ending LBA
- LBA Count
To build, execute the following commands:
autoreconf --install
./configure
make
You can run tests by running the following make command:
make && make check
If you get errors during testing, make sure you have already executed make
before make check
.
The reason for this is that the tests depend on files in the src/ directory, which need to be
built prior to building the tests
make install
You will need to add sudo to the previous command if your install directory needs superuser permissions
To run diskmbr, execute the following command:
sudo diskmbr </path/to/your-device>
Or if you didn't install it, build with make
, change directories to src/, and execute:
sudo ./diskmbr </path/to/your-device>
Don't forget to sudo for all devices that need superuser permissions!
For a normal object & executable removal, execute make clean
For a more thorough clean that removes Makefiles, execute make distclean
For the most thorough clean, removing cache files as well, execute make maintainer-clean