1mpartition(1)               General Commands Manual              mpartition(1)
2
3
4

Name

6       mpartition - partition an MSDOS hard disk
7
8
9

Note of warning

11       This  manpage  has  been  automatically generated from mtools's texinfo
12       documentation, and may not be entirely accurate or complete.   See  the
13       end of this man page for details.
14

Description

16       The  mpartition command is used to create MS-DOS file systems as parti‐
17       tions.  This is intended to be used on non-Linux systems, i.e.  systems
18       where  fdisk  and  easy access to SCSI devices are not available.  This
19       command only works on drives whose partition variable is set.
20
21       mpartition -p drive
22       mpartition -r drive
23       mpartition -I [-B bootSector] drive
24       mpartition -a drive
25       mpartition -d drive
26       mpartition -c [-s sectors] [-h heads]
27       [-t cylinders] [-v [-T type] [-b
28       begin] [-l length] [-f]
29
30
31
32       Mpartition supports the following operations:
33
34       p      Prints a command line to recreate the partition for  the  drive.
35              Nothing  is  printed  if  the  partition  for  the  drive is not
36              defined, or an inconsistency has been detected.  If verbose (-v)
37              is also set, prints the current partition table.
38
39       r      Removes the partition described by drive.
40
41       I      Initializes the partition table, and removes all partitions.
42
43       c      Creates the partition described by drive.
44
45       a      "Activates"  the  partition,  i.e.  makes it bootable.  Only one
46              partition can be bootable at a time.
47
48       d      "Deactivates" the partition, i.e. makes it unbootable.
49
50       If no operation is given, the current settings are printed.
51
52       For partition creations, the following options are available:
53
54       s sectors
55              The number of sectors per track of the partition (which is  also
56              the number of sectors per track for the whole drive).
57
58       h heads
59              The  number  of heads of the partition (which is also the number
60              of heads for the whole drive).  By default, the geometry  infor‐
61              mation  (number of sectors and heads) is figured out from neigh‐
62              boring partition table entries, or guessed from the size.
63
64       t cylinders
65              The number of cylinders of the  partition  (not  the  number  of
66              cylinders of the whole drive.
67
68       b begin
69              The  starting  offset of the partition, expressed in sectors. If
70              begin is not given, mpartition lets the partition begin  at  the
71              start of the disk (partition number 1), or immediately after the
72              end of the previous partition.
73
74       l length
75              The size (length) of the partition, expressed  in  sectors.   If
76              end  is not given, mpartition figures out the size from the num‐
77              ber of sectors, heads and cylinders.  If  these  are  not  given
78              either,  it  gives the partition the biggest possible size, con‐
79              sidering disk size and start of the next partition.
80
81       The following option is available for all operation  which  modify  the
82       partition table:
83
84       f      Usually, before writing back any changes to the partition, mpar‐
85              tition performs certain consistency checks, such as checking for
86              overlaps  and  proper  alignment  of  the partitions.  If any of
87              these checks fails, the partition table is not changed.  The  -f
88              allows you to override these safeguards.
89
90       The following options are available for all operations:
91
92       v      Together  with  -p  prints  the partition table as it is now (no
93              change operation), or as it is after it is modified.
94
95       vv     If the verbosity flag is given twice, mpartition will print  out
96              a  hexdump of the partition table when reading it from and writ‐
97              ing it to the device.
98
99       The following option is available for partition table initialization:
100
101       B bootSector
102              Reads the template master boot record from file bootSector.
103

Choice of partition type

105       Mpartition proceeds as follows to pick a type for the partition:
106
107       -      FAT32 partitions are assigned type 0x0C (``Win95 FAT32, LBA'')
108
109       -      For all others, if the partition fits entirely within the  first
110              65536  sectors of the disk, assign 0x01 (``DOS FAT12, CHS'') for
111              FAT12 partition and 0x04 (``DOS FAT16, CHS'') for  FAT16  parti‐
112              tions
113
114       -      If not covered by the above, assign 0x06 (``DOS BIG FAT16 CHS'')
115              if partition fits entirely within the first 1024 cylinders  (CHS
116              mode)
117
118       -      All remaining cases get 0x0E (``Win95 BIG FAT16, LBA'')
119
120       If  number  of  fat bits is not known (not specified in drive's defini‐
121       tion), then FAT12 is assumed for all drives with less  than  4096  sec‐
122       tors, and FAT16 for those with more than 4096 sectors.
123
124       This   corresponds   more  or  less  to  the  definitions  outlined  at
125       https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs  and
126       https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/win
127       dows-2000-server/cc977219(v=technet.10), with two notable differences:
128
129       -      If fat bits are unknown, the reference documents consider drives
130              with  less than 32680 sectors to be FAT12. Mtools uses 4096 sec‐
131              tors as the cutoff point, as older versions of DOS only  support
132              FAT12 on disks with less than 4096 sectors (and these older ver‐
133              sions are the ones which would be most likely to  use  FAT12  in
134              the first place).
135
136       -      The  reference  documents use a 8GB (wikipedia) or a 4GB (Micro‐
137              soft) cutoff between 0x06 (DOS BIG FAT16 CHS) and  0x0E.  Mtools
138              uses  1024  cylinders. This is because any partition beyond 1024
139              cylinders must be LBA and cannot be CHS. 8GB works out to be the
140              biggest  capacity  which  can be represented as CHS (63 sectors,
141              255 heads and 1024 cylinders). 4GB is  the  capacity  limit  for
142              windows 2000, so it makes sense that a documentation for windows
143              2000 would specify this as the upper  limit  for  any  partition
144              type.
145

See Also

147       Mtools' texinfo doc
148

Viewing the texi doc

150       This  manpage  has  been  automatically generated from mtools's texinfo
151       documentation. However, this process is only  approximative,  and  some
152       items,  such as crossreferences, footnotes and indices are lost in this
153       translation process.  Indeed, these items have no appropriate represen‐
154       tation  in  the manpage format.  Moreover, not all information has been
155       translated into the manpage version.  Thus I strongly advise you to use
156       the original texinfo doc.  See the end of this manpage for instructions
157       how to view the texinfo doc.
158
159       *      To generate a printable copy from the texinfo doc, run the  fol‐
160              lowing commands:
161
162                     ./configure; make dvi; dvips mtools.dvi
163
164
165
166       *      To generate a html copy,  run:
167
168                     ./configure; make html
169
170       A premade html can be found at `http://www.gnu.org/software/mtools/man
171       ual/mtools.html'
172
173       *      To generate an info copy (browsable  using  emacs'  info  mode),
174              run:
175
176                     ./configure; make info
177
178
179
180       The  texinfo doc looks most pretty when printed or as html.  Indeed, in
181       the info version certain examples are difficult  to  read  due  to  the
182       quoting conventions used in info.
183
184mtools-4.0.26                       28Nov20                      mpartition(1)
Impressum