1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442
|
<html>
<head>
<title>Makebootfat Bootable FAT Disk Creation</title>
</head>
<body>
<center><h2>Makebootfat Bootable FAT Disk Creation</h2></center>
<h2><a name="1">1</a>
Synopsis
</h2>
<pre>
makebootfat [options] IMAGE
</pre>
<h2><a name="2">2</a>
Description
</h2>
This utility creates a bootable FAT filesystem and
populates it with files and boot tools.
<p>
It is mainly designed to create bootable USB and
Fixed disk for the AdvanceCD project.
<p>
The official site of AdvanceCD and makebootfat is:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<a href="http://advancemame.sourceforge.net/">http://advancemame.sourceforge.net/</a>
<br>
</td></tr></table>
<h2><a name="3">3</a>
Options
</h2>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-o, --output DEVICE
</strong></td></tr><tr><td>
Specify the output device. It must be the device
where you want to setup the filesystem.
You can use the special "usb" value to automatically
select the USB Mass Storage device connected at
the system.
This option is always required.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-b, --boot FILE
</strong></td></tr><tr><td>
</td></tr>
<tr valign="top" align="left"><td><strong>
-1, --boot-fat12 FILE
</strong></td></tr><tr><td>
</td></tr>
<tr valign="top" align="left"><td><strong>
-2, --boot-fat16 FILE
</strong></td></tr><tr><td>
</td></tr>
<tr valign="top" align="left"><td><strong>
-3, --boot-fat32 FILE
</strong></td></tr><tr><td>
Specify the FAT boot sector images to use. The -b option
uses the same sector for all the FAT types. The other
options can be used to specify a different sector for
different FAT types. The FAT types for which a boot sector
is not specified are not used.
This option is always required.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-m, --mbr FILE
</strong></td></tr><tr><td>
Specify the MBR sector image to use.
If this option is specified a partition table is
created on the disk. Otherwise the disk is filled without a
partition table like a floppy disk.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-F, --mbrfat
</strong></td></tr><tr><td>
Change the MBR image specified with the -m option to pretend
to be a FAT filesystem starting from the first sector of
the disk. This allows booting from USB-FDD (Floppy Disk Drive)
also using a partition table generally required by USB-HDD
(Hard Disk Drive).
The MBR image specified with the -m option must have
executable code positioned like a FAT boot sector. You
can use the included `mbrfat.bin' file.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-c, --copy FILE
</strong></td></tr><tr><td>
Copy the specified file in the root directory of the disk.
The file is copied using the readonly attribute.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-x, --exclude FILE
</strong></td></tr><tr><td>
Exclude the specified files and subdirectories in the
IMAGE directory to copy. The path must be specified using
the same format used in the IMAGE directory specification.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-X, --syslinux2
</strong></td></tr><tr><td>
Enforce the syslinux 2.xx FAT limitations. Syslinux
2.xx doesn't support FAT32 at all, and FAT16 with
64 and 128 sectors per cluster formats.
This option excludes all the FAT formats not supported
by syslinux. Please note that it limits the maximum
size of filesystem to 1 GB.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-Y, --syslinux3
</strong></td></tr><tr><td>
Enforce the syslinux 3.xx FAT support. Syslinux 3.00
supports all the FAT types and sizes but it requires
a special customisation of the boot sector and of
the file `ldlinux.sys'.
This option does this customisation without the need
to use the syslinux installer if the `ldlinux.sys'
file is copied on disk with the -c option.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-Z, --zip
</strong></td></tr><tr><td>
If possible force the ZIP-Disk compatibility. It sets
a geometry of 32 sectors and 64 heads. It also uses the
4'th partition entry in the partition table.
It's required to boot also in USB-ZIP mode.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-P, --partition
</strong></td></tr><tr><td>
Ensure to operate on a partition and not on a disk.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-D, --disk
</strong></td></tr><tr><td>
Ensure to operate on a disk and not on a partition.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-L, --label LABEL
</strong></td></tr><tr><td>
Set the FAT label. The label is a string of 11 chars.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-O, --oem OEM
</strong></td></tr><tr><td>
Set the FAT OEM name. The OEM name is a string of 11 chars.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-S, --serial SERIAL
</strong></td></tr><tr><td>
Set the FAT serial number. The serial number is a 32 bit
unsigned integer.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-E, --drive DRIVE
</strong></td></tr><tr><td>
Set the BIOS drive to setup in the FAT boot sector.
Generally this value is ignored by boot sectors, with
the exception of the FAT12 and FAT16 FreeDOS boot sectors
that require the correct value or the value 255 to force
auto detection.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-v, --verbose
</strong></td></tr><tr><td>
Print some information on the device and on the filesystem
created.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-i, --interactive
</strong></td></tr><tr><td>
Show the errors in a message box. Only for Windows.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-h, --help
</strong></td></tr><tr><td>
Print a short help.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
-V, --version
</strong></td></tr><tr><td>
Print the version number.
</td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td><strong>
IMAGE
</strong></td></tr><tr><td>
Directory image to copy on the disk. All the files
and subdirectories present in this directory
are copied on the disk.
</td></tr>
</table>
<h2><a name="4">4</a>
Disks and Partitions Names
</h2>
In Linux disk devices are named /dev/hdX or /dev/sdX where X
is a letter. Partition devices are named /dev/hdXN or /dev/sdXN
where X is a letter and N a digit.
<p>
In Windows disk devices are named \\.\PhysicalDriveN where N is
a digit. Partition devices are named \\.\X: where X is a letter,
but sometimes \\.\X: is a disk and not a partition, for example on
floppies and on all the USB Mass Storage devices without a
partition table.
<h2><a name="5">5</a>
Syslinux
</h2>
To make a bootable FAT using syslinux you must use
the -X option for syslinux version 2.xx or the -Y
option for syslinux version 3.xx. You must also copy in
the root directory of the disk the files:
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
ldlinux.sys
</em></td><td width="90%">
The syslinux loader.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
syslinux.cfg
</em></td><td width="90%">
The syslinux configuration file.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
linux
</em></td><td width="90%">
The Linux kernel image (the file name may be different).
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
initrd.img
</em></td><td width="90%">
The initrd filesystem (the file name may be different
or missing).
</td></tr>
</table>
<p>
You must also specify the `ldlinux.bss' boot sector with the -b
option and possibily the `mbr.bin' MBR sector with the -m option.
Both the sector images are present in the syslinux package.
<p>
For example:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
makebootfat -o usb \
-Y \
-b ldlinux.bss -m mbr.bin \
-c ldlinux.sys -c syslinux.cfg \
-c linux -c initrd.img \
image
</pre>
</td></tr></table>
<h2><a name="6">6</a>
Loadlin and FreeDOS
</h2>
To make a bootable FAT using loadlin and FreeDOS you must copy
in the root directory of the disk the files:
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
kernel.sys
</em></td><td width="90%">
The FreeDOS kernel. Remember to use the "32" kernel
version to support FAT32.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
command.com
</em></td><td width="90%">
The FreeDOS shell.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
autoexec.bat
</em></td><td width="90%">
Used to start loadlin.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
loadlin.exe
</em></td><td width="90%">
The loadlin executable.
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
linux
</em></td><td width="90%">
The Linux kernel image (the file name may be different).
</td></tr>
<tr valign="top" align="left"><td width="5%"></td><td width="5%"><em>
initrd.img
</em></td><td width="90%">
The initrd filesystem (the file name may be different
or missing).
</td></tr>
</table>
<p>
You must also specify the FreeDOS boot sectors available on the
FreeDOS `sys' source package with the -1, -2, -3 option.
For the MBR you can use the sectors image available on the FreeDOS
`fdisk' source package.
<p>
For example:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
makebootfat -o /dev/hda1 \
-E 255 \
-1 fat12com.bin -2 fat16com.bin -3 fat32lba.bin \
-c kernel.sys -c command.com \
-c autoexec.bat -c loadlin.exe \
-c linux -c initrd.img \
image
</pre>
</td></tr></table>
<h2><a name="7">7</a>
Multi Standard USB Booting
</h2>
The BIOS USB boot support is generally differentiated in three
categories: USB-HDD, USB-FDD and USB-ZIP.
<p>
The USB-HDD (Hard Disk Drive) standard is the preferred choice and
it requires the presence of a partition table in the first sector
of the disk. You can create this type of disk using the -m option.
<p>
The USB-FDD (Floppy Disk Drive) standard requires the presence of
a filesystem starting from the first sector of the disk without
a partition table.
You can create this type of disk without using the -m option.
<p>
The USB-ZIP (ZIP Drive) standard requires the presence of a
device with a very specific geometry. Specifically, it requires
a geometry with 32 sectors and 64 heads. It also requires the presence
of a partition table with only a bootable partition in the
fourth entry. You can create this type of disk using the -m and -Z option.
<p>
Generally these standards are incompatible, but using the -m, -F
and -Z options you can create a disk compatible with all of them.
<p>
To use the -F option, the MBR image specified must follow
the constrains:
<ul>
<li>
It must start with a standard FAT 3 bytes jump instruction.
</li>
<li>
It must have the bytes from address 3 to 89 (included) unused.
</li>
</ul>
<p>
And example of such image is in the `mbrfat.bin' file.
<p>
For example to create a syslinux image:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
makebootfat -o usb \
-Y \
-Z \
-b ldlinux.bss -m mbrfat.bin -F \
-c ldlinux.sys -c syslinux.cfg \
-c linux -c initrd.img \
image
</pre>
</td></tr></table>
<p>
and for a FreeDOS and loadlin image:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
makebootfat -o usb \
-E 255 \
-Z \
-1 fat12com.bin -2 fat16com.bin -3 fat32chs.bin \
-m mbrfat.bin -F \
-c kernel.sys -c command.com \
-c autoexec.bat -c loadlin.exe \
-c linux -c initrd.img \
image
</pre>
</td></tr></table>
<p>
Please note that FreeDos has some problems booting
from USB. It works only on very few conditions.
<h2><a name="8">8</a>
Exclusion
</h2>
To exclude some files or directories in the image copy, you
can use the -x option using the same path specification
which are you using for the image directory.
<p>
For example, if you need to exclude the `isolinux' and
`syslinux' subdirectories from the `image' directory
you can use the command:
<p>
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td width="5%"></td><td width="95%">
<pre>
makebootfat ... \
-x image/isolinux \
-x image/syslinux \
image
</pre>
</td></tr></table>
<h2><a name="9">9</a>
Copyright
</h2>
This file is Copyright (C) 2004, 2005 Andrea Mazzoleni
<h2><a name="10">10</a>
See Also
</h2>
syslinux(1), mkdosfs(1), dosfsck(1)
</body>
</html>
|