{
    "mode": "man",
    "parameter": "fixparts",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/fixparts/8/json",
    "generated": "2026-06-13T22:42:24Z",
    "synopsis": "fixparts device",
    "sections": {
        "NAME": {
            "content": "fixparts - MBR partition table repair utility\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "fixparts device\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "FixParts  (aka  fixparts)  is  a text-mode menu-driven program for repairing certain types of\nproblems with Master Boot Record (MBR) partition tables. The program has three design  goals,\nalthough a few additional features are supported, as well:\n\n\n*      It  can  remove  stray  GUID Partition Table (GPT) data, which can be left behind on a\ndisk that was once used as a GPT disk but then incompletely converted to the more com‐\nmon (as of 2011) MBR form.\n\n\n*      It  can  repair  mis-sized extended partitions -- either partitions that extend beyond\nthe physical end of the disk or that overlap with nearby primary partitions.  FixParts\nis  designed  in  such a way that this type of repair occurs automatically, so if it's\nthe only problem with your disk, you can launch the program and then immediately  save\nthe partition table, making no manual changes, and the program will fix the problem.\n\n\n*      You  can  change primary partitions into logical partitions or vice-versa, within con‐\nstraints imposed by the MBR data structures.\n\n\nAdditional features include the ability to change partition type codes or boot/active  flags,\nto delete partitions, and to recompute CHS values. With the possible exception of recomputing\nCHS values, these secondary features are better performed with fdisk, because  fixparts'  de‐\nsign  means  that it's likely to alter partition numbering even when such changes are not re‐\nquested.\n\nThe fixparts program employs a user interface similar to that of Linux's fdisk, but  fixparts\nis  much  more  specialized. Most importantly, you can't create new partitions with fixparts,\nalthough you can change primary/logical assignment.\n\nIn the MBR scheme, partitions come in three varieties:\n\n",
            "subsections": [
                {
                    "name": "primary",
                    "content": "These partitions are defined in the first sector of the hard disk and are  limited  in\nnumber  to four. Some OSes, such as Windows and FreeBSD, must boot from a primary par‐\ntition.\n\n"
                },
                {
                    "name": "extended",
                    "content": "Extended partitions are specialized primary partitions. They serve  as  holding  areas\nfor logical partitions.\n\n"
                },
                {
                    "name": "logical",
                    "content": "A  disk  can contain an arbitrary number of logical partitions (fixparts, however, im‐\nposes a limit of 124 logical partitions). All the logical partitions reside  inside  a\nsingle  extended  partition,  and are defined using a linked-list data structure. This\nfact means that every logical partition must be preceded by at least one sector of un‐\nallocated space to hold its defining data structure (an Extended Boot Record, or EBR).\n\n\nThese  distinctions  mean  that  primary  and logical partitions cannot be arbitrarily inter‐\nspersed. A disk can contain one to three primary partitions, a block of one or  more  logical\npartitions,  and  one  to  three more primary partitions (for a total of three primary parti‐\ntions, not counting the extended partition). Primary partitions may not be sandwiched between\nlogical partitions, since this would mean placing a primary partition within an extended par‐\ntition (which is just a specific type of primary partition).\n\nUnlike most disk utilities, fixparts' user interface ignores extended partitions. Internally,\nthe program discards the information on the original extended partition and, when you tell it\nto save its changes, it generates a new extended partition to contain the then-defined  logi‐\ncal  partitions. This is done because most of the repairs and manipulations the tool performs\nrequire generating a fresh extended partition, so keeping the original in the user  interface\nwould only be a complication.\n\nAnother  unusual  feature of fixparts' user interface is that partition numbers do not neces‐\nsarily correlate with primary/logical status. In most utilities, partitions 1-4 correspond to\nprimary partitions, whereas partitions 5 and up are logical partitions. In fixparts, any par‐\ntition number may be assigned primary or logical status, so long as the rules for layout  de‐\nscribed  earlier  are  obeyed. When the partition table is saved, partitions will be assigned\nappropriately and then tools such as the Linux kernel and fdisk will give  them  conventional\nnumbers.\n\nWhen it first starts, fixparts performs a scan for GPT data. If the disk looks like a conven‐\ntional GPT disk, fixparts refuses to run. If the disk appears to be a conventional  MBR  disk\nbut  GPT signatures are present in the GPT primary or secondary header areas, fixparts offers\nto delete this extraneous data. If you tell it to do so, the program  immediately  wipes  the\nGPT header or headers. (If only one header was found, only that one header will be erased, to\nminimize the risk of damaging a boot loader or other data that might  have  overwritten  just\none of the GPT headers.)\n\nWith  the  exception  of  optionally erasing leftover GPT data when it first starts, fixparts\nkeeps all changes in memory until the user writes changes with the w command. Thus,  you  can\nadjust  your  partitions  in  the  user interface and abort those changes by typing q to quit\nwithout saving changes.\n\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "The fixparts utility supports no command-line options, except for specification of the target\ndevice.\n\nMost interactions with fixparts occur with its interactive text-mode menu. Specific functions\nare:\n\n\na      Toggle the active/boot flag. This flag is required by some boot loaders and OSes.\n\n\n\nc      Recompute the cylinder/head/sector (CHS) values for  all  partitions.  CHS  addressing\nmode  is largely obsolete, but some OSes and utilities complain if they don't like the\nCHS values. Note that fixparts' CHS values are likely to be incorrect on disks smaller\nthan about 8 GiB except on Linux.\n\n\nl      Change a partition's status to logical. This option will only work if the current par‐\ntition layout supports such a change. Note that if changing a  partition's  status  in\nthis way is not currently possible, making some other change may make it possible. For\ninstance, omitting a partition that precedes the target partition may enable  convert‐\ning a partition to logical form if there had been no free sectors between the two par‐\ntitions.\n\n\no      Omit a partition. Once omitted, the partition will still appear in the fixparts parti‐\ntion  list, but it will be flagged as omitted. You can subsequently convert it to pri‐\nmary or logical form with the r or  l  commands,  respectively.  When  you  save  your\nchanges with w, though, the partition will be lost.\n\n\np      Display  basic  partition summary data. This includes partition's number, the boot/ac‐\ntive flag's status, starting and ending sector numbers,  primary/logical/omitted  sta‐\ntus,  whether  or  not  the partition may be converted to logical form, and the parti‐\ntion's MBR types code.\n\n\nq      Quit from the program without saving your changes.  Use this option if you just wanted\nto view information or if you make a mistake and want to back out of all your changes.\n\n\nr      Change a partition's status to primary. This option will only work if the current par‐\ntition layout supports such a change. Note that every partition can theoretically  be‐\ncome a primary partition, although in some configurations, making this change will re‐\nquire omitting some partitions.  If fixparts refuses to allow changing a partition  to\nprimary,  you  may  need  to convert other partitions to logical form or omit them en‐\ntirely.\n\n\ns      Sort partition entries. This option orders partitions in the display  to  match  their\non-disk  positions, which can make understanding the disk layout easier in some cases.\nThis option has no effect on the ultimate ordering of logical  partitions,  which  are\nsorted  before  being saved. The order of primary partitions in the final saved parti‐\ntion table may be affected by this option. In both cases, as already noted, the parti‐\ntion  numbers displayed by fixparts may not be the same as those used by the kernel or\ndisplayed by other partitioning tools.\n\n\nt      Change a partition's type code. You enter the type code using a  one-byte  hexadecimal\nnumber.\n\n\nw      Write data. Use this command to save your changes and exit from the program.\n\n\n?      Print the menu. Type this command (or any other unrecognized command) to see a summary\nof available options.\n\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Known bugs and limitations include:\n\n\n*      The program compiles correctly only on Linux, FreeBSD, Mac OS X, and  Windows.   Linux\nversions  for  x86-64  (64-bit),  x86 (32-bit), and PowerPC (32-bit) have been tested,\nwith the x86-64 version having seen the most testing. Under FreeBSD, 32-bit (x86)  and\n64-bit  (x86-64) versions have been tested. Only 32-bit versions for Mac OS X and Win‐\ndows have been tested.\n\n\n*      The FreeBSD version of the program can't write changes to the  partition  table  to  a\ndisk  when existing partitions on that disk are mounted. (The same problem exists with\nmany other FreeBSD utilities, such as gpt, fdisk, and  dd.)  This  limitation  can  be\novercome by typing sysctl kern.geom.debugflags=16 at a shell prompt.\n\n\n*      The  program  can load only up to 128 partitions (4 primary partitions and 124 logical\npartitions). This limit can be raised by changing the #define  MAXMBRPARTS  line  in\nthe basicmbr.h source code file and recompiling.\n\n\n*      The  program  can  read partitions only if the disk has correct LBA partition descrip‐\ntors. These descriptors should be present on any disk over 8 GiB in size or on smaller\ndisks partitioned with any but very ancient software.\n\n\n*      The  program makes no effort to preserve partition numbers. This can have consequences\nfor boot loaders and for mounting filesystems via /etc/fstab. It may be  necessary  to\nedit configuration files or even to re-install your boot loader.\n\n\n*\n\nThe program may change the order of partitions in the partition table.\n\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Primary author: Roderick W. Smith (rodsmith@rodsbooks.com)\n\nContributors:\n\n* Yves Blusseau (1otnwmz02@sneakemail.com)\n\n* David Hubbard (david.c.hubbard@gmail.com)\n\n* Justin Maggard (justin.maggard@netgear.com)\n\n* Dwight Schauer (das@teegra.net)\n\n* Florian Zumbiehl (florz@florz.de)\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "cfdisk(8), cgdisk(8), fdisk(8), mkfs(8), parted(8), sfdisk(8), gdisk(8), sgdisk(8).\n\nhttp://en.wikipedia.org/wiki/Masterbootrecord\n\nhttp://www.rodsbooks.com/fixparts/\n\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The fixparts command is part of the GPT fdisk package and is available from Rod Smith.\n\n\n\nRoderick W. Smith                               1.0.8                                    FIXPARTS(8)",
            "subsections": []
        }
    },
    "summary": "fixparts - MBR partition table repair utility",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "cfdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cfdisk/8/json"
        },
        {
            "name": "cgdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/cgdisk/8/json"
        },
        {
            "name": "fdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/fdisk/8/json"
        },
        {
            "name": "mkfs",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mkfs/8/json"
        },
        {
            "name": "parted",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/parted/8/json"
        },
        {
            "name": "sfdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sfdisk/8/json"
        },
        {
            "name": "gdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/gdisk/8/json"
        },
        {
            "name": "sgdisk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sgdisk/8/json"
        }
    ]
}