Free Tools for Viewing and Editing
Partition Tables and/or OS Boot Records
|
A NOTE about PowerQuest : |
Get a FREE set of Windows tools by PowerQuest
from the Symantec FTP site for displaying and editing
your Partition Tables and Boot Records... my page here will show
you which files to download:
Partition Info and Partition Editor for Win 9x/Win NT/Win2k/WinXP.
1.
MBRFIX.EXE 1.3.0.0
(Author: Kåre Smith; of Systemintegrasjon AS; for Windows™ NT/2000, XP, 2003,
Vista and Windows 7). This links to a very nice page describing all the program's commands.
![]() |
Kåre has not only made sure you cannot easily mess
things up when all you want to do is save or restore your MBR sector, but he's also added lots of extras (more than 'fixmbr';
and there's even a 64-bit version)! MBRFix can be |
2. Sector Inspector. This
Microsoft® Windows Tool has worked just fine on Win 2000, XP, 2003, Vista, 7 systems. Very useful (and
somewhat easier to use than
Svend's
32-bit "FINDPART getsect" utility for Windows). You can dump any range of sectors in either text or binary
forms and write those files back to any disk! Find out how to download SecInspect.exe's install program from this page:
Try this
MS download page, or search for "Sector Inspector" here:
http://www.microsoft.com/windowsserver2003/techinfo/reskit/tools/default.mspx
[NOTE: We didn't say much about this utility in the past, due to what appeared to be a problem on our Win2000 system whenever
we attempted to create a binary backup file of an MBR sector using its "-backup" command:
secinspect -backup PhysicalDrive0 mbrsect.bin 0 1
Whenever it attempted to "lock" the drive (which was in use), we saw a WARNING message saying it couldn't do so; adding:
"Are you sure you want to continue?" But after trying SecInspect again
a year or so later, on a Windows XP (SP2) workstation, it worked just fine:
C:\>secinspect -backup PhysicalDrive0 mbrsect.bin 0 1 0001.033 Sector Inspector Copyright Microsoft Corporation 2003 =========================================================================== Performing backup of sector range. Source Device : \\.\PhysicalDrive0. Destination file : mbrsect.bin. Start LBN : 0 Number of sectors : 1 Granularity : 1 Sector Inspector is attempting to lock the volume \\.\PhysicalDrive0. Backing up requested sector range. . 1 of 1 sectors were backed up. |
If you look inside the included secinspect.chm HELP file, you'll see on the "Backing up a sector range" page the same WARNING message, so we assume Microsoft included this dire warning only to let you know that you could be overwriting critical information on the same disk you are reading from?]
In order to make a copy of the first 100 sectors of your first hard disk ("PhysicalDrive0"), just ENTER on the command line (use
any name you want for <file name>):
secinspect -backup PhysicalDrive0 <file name> 0 100
As the name implies, however, Sector Inspector is primarily used to produce a very nice text output of your MBR, Partition Table(s) and Volume Boot Records for every disk connected to your computer; which you could e-mail to us if you ever needed an analysis of your disk. (Of course, if your PC cannot boot, then you'd need to be able to connect that disk as a slave drive on another PC running Sector Inspector!)
One of the things that makes Sector Inspector very useful is the fact it will display and interpret the data for every Volume Boot
Record (VBR) in a system's Extended Partition; it's not limited to just the partition(s) listed in the Master Boot Record. Therefore, it can give you detailed information about every partition on every
disk. (Note: We do have a complaint though: Each Logical Volume's VBR is listed in the output with the same exact title of "Logical Volume". Why couldn't a different number be
assigned to each volume inside the Extended Partition as is done for the Primary Partitions? And if a volume has a Backup sector, it's always be labeled "Partition #1"; which
can be rather confusing the first time you see it, so always note the sector/LBA count, to see where these volumes are located on the disk.)
Here's a dump of Sector Inspector's commands:
C:\Tools\SI\>secinspect -h
0001.033
Sector Inspector Copyright Microsoft Corporation 2003
===========================================================================
Command Line Help
===========================================================================
Display Help Screen
SECINSPECT.EXE -h
SECINSPECT.EXE -?
Generate a standard report that includes a complete hex dump.
SECINSPECT.EXE
Generate Report with no hex dump information.
SECINSPECT.EXE -n
Dump a sector range using 64 bit LBN.
SECINSPECT.EXE -dsec DeviceName LBN NumberOfSectors
Example: SECINSPECT.EXE -dsec \\.\c: 63 2
Dump a sector range using Cylinder, Head, Sector notation.
SECINSPECT.EXE -dchs PhysicalDrive C/H/S NumberOfSectors
Example: SECINSPECT.EXE -dchs PhysicalDrive0 5/121/12 30
Dump a file in hex.
SECINSPECT.EXE -dfile FileName
Save a sector range as a binary .DSK file.
SECINSPECT.EXE -backup DeviceName FileName LBN NumberOfSectors
Example: SECINSPECT.EXE -backup c: d:\backup.dsk 0 63
Restore a sector range from a binary .DSK file.
SECINSPECT.EXE -restore DeviceName FileName LBN [CONFIRM]
Example: SECINSPECT.EXE -restore PhysicalDrive2 d:\backup.dsk 0
Example: SECINSPECT.EXE -restore c: d:\backup.dsk 0 CONFIRM
Display FILETIME as UTC time
SECINSPECT.EXE -TIME 64BitHex
|
NOTE: The file secinspect.exe is all you really need and it's only 32KiB (32,768 bytes). Put it together with the following batch file on a thumb drive as another useful tool to help your friends! If you install the free archive program 7-zip on your PC, you'll be able to open Sector Inspector's .msi install file (the 7-zip web page doesn't even mention it opens .MSI files!) and extract only the executable and .chm Help file from inside Sector Inspector's winrkupd.cab file; without having to install it.
|
NOTE: Sector Inspector does not state the total capacity
in sectors for any drive (whether hard disk, flash or other). It provides only the maximum number of FULL cylinders a drive
can be partitioned with for its given Head and Sector values. For example, with a 320 GB hard disk connected to a PC, Sector
Inspector states (output file) it has "38,913 Cylinders, 255 Heads, 63
Sectors Per Track," for a total of: 625,137,345 sectors; exactly the same number of sectors mentioned in a note about
the last of its three NTFS partitions: "Partition #3 NTFS backup
boot sector at LBN 625137344" (starting with LBN 0). However, if we use a utility that queries all
the data provided by the drive, we find this disk actually has a total of 625,140,335 accessible sectors. The difference in
this case being 2,990 sectors. |
SIrun.bat is a simple Batch (*.bat) program you can use to automate running Sector Inspector on a Windows computer without having to open a Command Line Interface (CLI). We also decided to have it record the date and time it was run and to add subsequent runs to an existing file rather than overwrite it. Just copy and paste the following lines into a text editor, such as Notepad, save the file as "SIrun.bat" in the same folder as secinspect.exe and either double-click on the Batch program (or use "Run") to execute it. Sector Inspector's output will then quickly appear in a NOTEPAD window:
@echo off if exist secinspect.exe goto okrun echo. echo. echo Did not find secinspect.exe in this folder, you echo must place secinspect.exe in the same folder as echo SIrun.bat for me to work. echo. echo Press any key to close this window. pause > nul goto close :okrun echo -------------- >> SIout.txt echo Date and time: >> SIout.txt date /t >> SIout.txt time /t >> SIout.txt echo. >> SIout.txt secinspect.exe >> SIout.txt start notepad SIout.txt :close exit
If you want Sector Inspector to print the data without showing all the hex bytes in the MBR and VBR sectors, just add the switch "-n" like this: "secinspect -n > SIout.txt". As a matter of fact, with more time we could create a more advanced Batch program that would give you a choice of how to print out the data, and which command to run!
3.
MBRWizard
2.00 Roger Layton is this tool's author; no one else! Please see our NOTE* below about sites that tried to sell his software as their own! We've kept an archive
copy of v. 1.52 (MBRWiz page) (with MD5 sums) if you're interested; (versions 1.52/1.53 are still available; backup site for
MBRWizard
v. 1.52; SIMTEL).
There are executables for Linux, MS-DOS and for all versions of Windows® (Win9x thru XP/2003) available! This program can do much more than PQ's MBRUTIL (see next item); especially since it's not limited to just the first HDD as MBRUTIL is. Here are only some of its functions (Command Prompt style):
MBRWiz - Version 1.52 for Windows XP/2K/PE November 13, 2003
Copyright (c) 2002-2003 Roger Layton http://mbr.bigr.net
Usage: MBRWiz [/option]
/List List MBR Entries
/Disk=# Selects the disk to use. 0 is used if not specified
/Hide=# Hides the Partition number specified by #, or * for all
/Unhide=# Unhides the Partition number specified by #, or * for all
/Active=# Activates the Partition specified by # {See: /BootMenu below!}
/Inactive=# De-activates the Partition number specified by #, or * for all
/Del=# Deletes the partition specified by # {Note: Just from Partition Table!}
/Wipe=# 1=Wipes the MBR, 2-Wipes the first 63 sectors of disk
/Save=x Saves the MBR to filename 'x'
/Restore=x Reads and restores the Disk MBR from filename 'x'
/ShowFile=x Shows contents of an existing MBR backup file named 'x'
/BootMenu Allows user to select an active partition from a menu
{Note: This is simply another form of the /Active command; not a boot manager!}
/Sort Sort MBR Entries by disk location
/IsSorted Returns 0 if MBR partitions are already sorted
/Shutdown=# 1-Forces OS shutdown, 2-Forces OS Reboot
/Result Shows Errorlevel code
* NOTE: There were at least two web sites illegally trying to sell this program as their own! Only Roger's copyright notifications were altered by these criminals! So, BE CAREFUL... Do some research before buying any software, and do not become a fool by paying a criminal for someone else's work; and possibly getting a 'buggy' or nonfunctioning program instead.
4.
Free Copy/Restore MBR Utility from
PowerQuest; now owned by Symantec.
head.zip
(a 448 kb package of four utility programs) is
an excellent utility from PowerQuest because it can both save and
restore all 512-bytes of the MBR sector (that includes your Partition Table)
while even Windows 2000 or XP are still running! This little gem is hidden in
a .zip file as "MBRutil.exe"
along with its DOS version "MBRUTILD.EXE" [
plus a somewhat dangerous utility called "WipeTrk.exe"
which will erase Absolute sectors 1 through 62 (which the PQ 'ReadMe.txt' file
refers to as "sectors 2 through 63" -- they begin counting sectors
with a 1 rather than a 0, so the MBR is sector 1 in their text file). If you
execute WipeTrk.exe with no parameters it
will immediately zero-out every byte of Abs. sectors 1 - 62 without any
warning! ] MBRutil.exe
will display the following when run with no parameters:
MBRUtil Copyright (c) 2002 PowerQuest Corporation
Invalid arguments
Usage:
MBRutil.exe [/?] [/S[H]=<fileName>] [/R[H]=<fileName>]
/S Save MBR (sector 1 only) to <fileName>
/SH Save entire first head to <fileName>
/R Restore MBR (sector 1 only) from <fileName>
/RH Restore entire first head from <fileName>
For example, to save your boot drive's MBR as the
file "MyMBR.bin" you would enter the following at a command prompt (in a DOS box):
mbrutil
/S=MyMBR.bin
To restore (or overwrite -- it won't ask you!) the MBR sector from a saved file,
say "MBR1s.bin," you would simply enter:
mbrutil
/R=MBR1s.bin
(most likely you'd be doing this from a real DOS prompt after booting
from a floppy and using MBRUTILD instead).
Unfortunately, (or actually fortunately for anyone
who mistakenly runs this program) PQ's "WipeTrk.exe" does NOT zero-out
any MBR bytes! So, if you're having a problem with a Partition Table entry which
FDISK refuses to delete, you'll need to use either DELpart
or our own ZAP63:
5.
ZAP63.zip
(just 3kb) is an Assembly program which
uses INT13 to 'zero-out' every byte of the first 63 sectors of any
hard drive you choose.
MD5 sum of ZAP.COM (new version 1.4) = 32b9c9f746b9bb19742980adbde3e4af
(MD5 sum of older version;
v 1.3 = 1f78bd078613b771fc5f00075e89dfd1).
This program is based on the original 'ZAP' utility (which wiped-out 128 sectors; too many sectors in our opinion! So, we made this 63-sector wipe-out version instead). It's ideal for quickly zeroing-out the MBR plus the next 62 sectors; which may contain old boot overlays, managers or possibly viruses. NOTE: Your computer may contain some valuable information in the sectors between the MBR (first one on the disk) and first VBR (Volume Boot Record) sector, such as computer HDD IDs, so examine (e.g., using HxD) and save them before using this utility!
For those who really want to 'start all
over again' though, we recommend spending the time to 'zero-out' every byte
of the whole disk with a program from the disk drive's manufacturer. By doing so, you may fix
some "bad sectors" while carrying out the whole process! For more info on
HDD-wiping, see: our WIPE page.
6. DiskProbe from Microsoft®; if you can find it on your install CD (e.g., WinXP SP2 has it under \SUPPORT\TOOLS), it's sort of like getting a free Disk Editor for Win NT/2000/XP. (Too bad it doesn't understand "Dynamic Disks"!) I suggest skipping whatever long process may be involved in trying to install just DiskProbe from there, and instead: Open the SUPPORT.CAB file and extract the following files into some folder of your choice:
07/21/2001 07:13PM 1,165 dskprobe.cnt 08/17/2001 02:03PM 94,720 dskprobe.exe 07/21/2001 07:13PM 50,501 dskprobe.hlp 07/21/2001 07:13PM 1,748,480 dskprtrb.doc
The .doc file has a large amount of data and illustrations about the layout of system areas on disk drives; I advise you to get a 'second opinion' before making use of anything you read there in a 'critical operation' though, since it might contain errors!
NOTE: With the release of HxD (see below), there's really no need to even consider using DiskProbe!
If you need an easy Disk Editor to make manual changes to your Partition Tables, take this
link to my FreeTools review page about the PhysTechSoft-Disk
Editor (PTS-DE); if you still use boot floppies under DOS, this is a great tool.
(If you want to try running it under Windows 9x, please read the CAUTION NOTE
below the download link before doing so!)
(Again, PTS-DE might be a useful tool on a boot diskette; especially if your computer won't boot up, but being only a 16-bit DOS tool it can not be used under Windows 2000/XP/2003/Vista). However, HxD is the ideal FREE Windows disk editor:
See our Hex Editor page for more pictures (and a tutorial which makes use of HxD to provide an image file of MS-DOS 1.10).
HxD is a Hex Editor for editing either binary files or hard disk sectors from within Windows! This makes it
the first FREE Disk Editor that can do many of the things people purchase a commercial editor like
WinHex for! HxD continues to be improved by its author, who is still
interested in any bugs you might possibly find and open to suggestions! HxD already has all the basic features
you need: Both Hex and ASCII (including Unicode) search and replace, and it will open files, memory locations, hard
drives (as either logical or physical) and disk image files too!
TestDisk
(Version 6.11; April 19, 2009). Check out the latest features at the website!
This gem may amaze you with how quickly it can find
"lost partitions" and restore them! The
software basically finds any deleted partitions, then allows you to write the
necessary data into your Partition Table(s) within a few minutes! (Be sure to read the helpful 'Wiki pages' documentation! TestDisk also
comes with a newer program, PhotoRec
- The digital photograph and MANY other file-types recovery tool.)
IMPORTANT FEATURE: As of v6.5, TestDisk can now COPY any file (or recurse through whole subfolders) from within a "lost partition" without having to first restore and reboot the computer; ideal for someone who forgot to save some data before deleting a partition and for some odd reason, you still can't access the partition any other way.
We strongly advise you to first run this tool on known good drives, without using any of its write functions while first learning how to use it. If possible, you may also wish to use some discarded drive(s) for experiments in testing all of its features! When you are fully confident in how to use TD, recovery operations should be less of a hassle.
Choose from many precompiled executables: TestDisk can run under all Windows and DOS (such as after booting up with a Win98 Boot Disk with the DPMI server program; CWSDPMI.EXE that's included in the download), or Linux (there's a static version you can use under almost any Linux OS) operating systems. There's even a binary for MAC OS X (10.x) too! Apart from these, you may compile from source code for some other OSs.
However, TestDisk will recognize and can recover partitions of at least the following types (check site for all the latest file systems):
BeFS (BeOS),
BSD disklabel (Free BSD / Open BSD / Net BSD),
CramFS (Compressed File System),
EXT2/EXT3 (Linux),
FAT12, FAT16 and FAT32 (DOS or Windows),
HFS and HFS+, (Hierarchial FS),
JFS (IBM's Journaled FS),
Linux Swap (1 and 2),
Linux Raid (1, 4, 5 and 6),
LVM and LVM2 (Linux Logical Volume Manager),
MAC Partition Map,
Netware NSS,
NTFS (Windows NT / 2000 / XP / 2003),
ReiserFS (1 and 2; 3.5 and 3.6),
UFS and UFS2(Sun or BSD),
and XFS (SGI's Journaled FS).
![]() | This is a revision of a free program we saw at Power Quest (before they ceased
to exist). It will help you check if both the CHS Tuples and the LBA Sector numbers found in a Partition Table match. |
If you're seeking info specifically for the Windows™ Vista or
Windows™ 7 operating systems for use on multi-booting disks, we suggest visiting
Multibooter's here: http://www.multibooters.co.uk/.
If a commercial company desires to have a PC workstation boot into more than one
OS, they often turn to commercial software such as: System Commander 2000 by
V Communications, Partition Magic by
PowerQuest (Note: If you want to purchase Partition
Magic 8.01, sorry, but Symantec discontinued selling it: "Due to changing consumer usage trends and
Symantec’s desire to offer the highest quality and most innovative solutions for the latest operating systems, Symantec has
discontinued Norton Partition Magic 8.0."), Acronis OS Selector 5.0 (previously Boot
Wizard) by
Acronis or OSL2000
by osloader.com to replace their standard MBRs.
If you're running a Linux OS on the system, using GRUB or LILO are viable alternatives as are the
BOOT.INI file from an existing Windows NT/2000/XP OS, or BOOTMGR
and BCDEDIT with a Windows™ 7 OS install.
NOTE: The easiest way to try out, say, Ubuntu Linux version 10.04 LTS (Lucid Lynx), or later, on a Basic MBR,
ordinary Win7 PC (i.e., the disk is not encrypted; no TPM hardware in use), is to use the built-in SHRINK capabilities
of the Windows 7 "Disk Management" utility to shrink the size of your Main Windows partition (NOTE: It must be the
last partition on the disk drive! CAUTION: A number of 'brand name' PCs have extra partitions added by the PC manufacturer
which can cause all sorts of difficulties for those attempting such tasks!) to create, say, at least 25 GB of un-partitioned
free space at the end of the disk for Linux to install into. But before doing so, be sure to make a copy of your Windows
7 MBR sector. You may contact us for further assistance.
The Ranish Partition Manager (very out-dated now!)
For those who don't require much support, there are FREE programs, including an interactive MBR which can be obtained
from Mikhail Ranish: the Ranish Partition Manager and Boot Manager
http://www.ranish.com/part/. Download the stable freeware version 2.37.12 (which includes source code), or try his latest program.
Place a floppy in your A:\ drive and run PM's Install.bat to save all the Partition information from your drive(s) to the floppy! [ Why?
Because the Partition Table data for your particular drive(s) can NEVER be refreshed or recovered by running an FDISK /MBR command; which simply replaces the MBR
code! ]
Ranish's program, part.exe (in version 2.37.12 or part_cmd.exe
in the newer beta set), is also 'Console' enabled which means it can be used rather effectively in Batch files too! For the details, open a DOS-Window at
the folder where part.exe exists, then enter: part -? at the prompt
(do NOT use -h as this is a command to HIDE partitions!!).
A nice little graphically enhanced and interactive MBR system called XOSL (Extended Operating
System Loader). Unfortunately, its development seems to have been abandoned! Since this FREE system promoted the Ranish Partition Manager, it appears that
Mikhail Ranish has given it some room on his own site for downloading:
http://www.ranish.com/part/xosl.htm;
you'll find a link there to the author's own web site.
Real Hard Disk Research
Most of the data
on these pages are the result of my own testing using various versions of FDISK
on real working hard drives which were methodically examined in detail with
various disk editors and other utility software.
Since
I also believe in having multiple sources, especially on technical topics, I've
placed some other web sites here with references to disk drives, the MBR and
OS Boot Records. [But remember to check and
double-check before using any information from the Internet, as subtle errors
exist in many magazines and on web sites.]:
Ray Knight's Home Page
[ Ray's pages are quite informative. He also lists many sources. But I'm sure
he'd agree that without a specific statement, neither of us want you to think
that we've validated all the data on those pages simply because we list
them as references. ]
List of Partition Identifiers for PCs by Andries Brouwer
Detailed listing of almost every different
type of partition that has ever been used on a PC.
( I do however wish that he'd used a different font for the 'identifiers'
rather than the same lower-case letters as his text! ) His second page (titled:
Properties of partition tables) may be confusing to many (including the
way some terms are used), but it does contain some real problems people have
had with different OSs (section 2.8) and large drives (section 2.7) as various
bugs or limits have been encountered in the course
of our ever increasing hard disk sizes!
You can write to me using this: online
reply form. (It opens in a new window.)
MBR and Boot Records Index
The Starman's Realm Index Page