1mpartition(1) General Commands Manual mpartition(1)
2
3
4
6 mpartition - partition an MSDOS hard disk
7
8
9
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
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 changes. 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
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 65536
110 sector of the disk, assign 0x01 (``DOS FAT12, CHS'') for FAT12
111 partition and 0x04 (``DOS FAT16, CHS'') for FAT16 partitions
112
113 - If not covered by the above, assign 0x06 (``DOS BIG FAT16 CHS'')
114 if partition fits entirely within the first 1024 cylinders (CHS
115 mode)
116
117 - All remaining cases get 0x0E (``Win95 BIG FAT16, LBA'')
118
119 If number of fat bits is not known (not specified in drive's defini‐
120 tion), then FAT12 is assumed for all drives with less than 4096 sec‐
121 tors, and FAT16 for those with more than 4096 sectors.
122
123 This corresponds more or less to the definitions outlined at
124 https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs and
125 https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/win‐
126 dows-2000-server/cc977219(v=technet.10), with two notable differences:
127
128 - If fat bits are unknown, the reference documents consider drives
129 with less than 32680 sectors to be FAT12. Mtools uses 4096 sec‐
130 tors as the cutoff point, as older versions of DOS only support
131 FAT12 on disks with less than 4096 sectors (and these older ver‐
132 sions are the ones which would be most likely to use FAT12 in
133 the first place).
134
135 - The reference documents use a 8GB (wikipedia) or a 4GB (Micro‐
136 soft) cutoff between 0x06 (DOS BIG FAT16 CHS) and 0x0E. Mtools
137 uses 1024 cylinders. This is because any partition beyond 1024
138 cylinders must be LBA and cannot be CHS. 8GB works out to be the
139 biggest capacity which can be represented as CHS (63 sectors,
140 255 heads and 1024 cylinders). 4GB is the capacity limit for
141 windows 2000, so it makes sense that a documentation for windows
142 2000 would specify this as the upper limit for any partition
143 type.
144
146 Mtools' texinfo doc
147
149 This manpage has been automatically generated from mtools's texinfo
150 documentation. However, this process is only approximative, and some
151 items, such as crossreferences, footnotes and indices are lost in this
152 translation process. Indeed, these items have no appropriate represen‐
153 tation in the manpage format. Moreover, not all information has been
154 translated into the manpage version. Thus I strongly advise you to use
155 the original texinfo doc. See the end of this manpage for instructions
156 how to view the texinfo doc.
157
158 * To generate a printable copy from the texinfo doc, run the fol‐
159 lowing commands:
160
161 ./configure; make dvi; dvips mtools.dvi
162
163
164
165 * To generate a html copy, run:
166
167 ./configure; make html
168
169 A premade html can be found at `http://www.gnu.org/software/mtools/man‐
170 ual/mtools.html'
171
172 * To generate an info copy (browsable using emacs' info mode),
173 run:
174
175 ./configure; make info
176
177
178
179 The texinfo doc looks most pretty when printed or as html. Indeed, in
180 the info version certain examples are difficult to read due to the
181 quoting conventions used in info.
182
183mtools-4.0.24 22Mar20 mpartition(1)