Makebootfat \(hy makebootfat bootable fat disk creation
makebootfat [options] IMAGE
This utility creates a bootable FAT filesystem and populates it with files and boot tools.
It is mainly designed to create bootable USB and Fixed disk for the AdvanceCD project.
The official site of AdvanceCD and makebootfat is:
http://advancemame.sourceforge.net/
\(hyo, \(hy\(hyoutput DEVICE
Specify the output device. It must be the device where you want to setup the filesystem. You can use the special \(a"usb\(a" value to automatically select the USB Mass Storage device connected at the system. This option is always required.
\(hyb, \(hy\(hyboot FILE
\(hy1, \(hy\(hyboot\(hyfat12 FILE
\(hy2, \(hy\(hyboot\(hyfat16 FILE
\(hy3, \(hy\(hyboot\(hyfat32 FILE
Specify the FAT boot sector images to use. The \(hyb 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.
\(hym, \(hy\(hymbr FILE
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.
\(hyF, \(hy\(hymbrfat
Change the MBR image specified with the \(hym option to pretend to be a FAT filesystem starting from the first sector of the disk. This allows booting from USB\(hyFDD (Floppy Disk Drive) also using a partition table generally required by USB\(hyHDD (Hard Disk Drive). The MBR image specified with the \(hym option must have executable code positioned like a FAT boot sector. You can use the included \(oqmbrfat.bin\(cq file.
\(hyc, \(hy\(hycopy FILE
Copy the specified file in the root directory of the disk. The file is copied using the readonly attribute.
\(hyx, \(hy\(hyexclude FILE
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.
\(hyX, \(hy\(hysyslinux2
Enforce the syslinux 2.xx FAT limitations. Syslinux 2.xx doesn\(cqt 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.
\(hyY, \(hy\(hysyslinux3
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 \(oqldlinux.sys\(cq. This option does this customisation without the need to use the syslinux installer if the \(oqldlinux.sys\(cq file is copied on disk with the \(hyc option.
\(hyZ, \(hy\(hyzip
If possible force the ZIP\(hyDisk compatibility. It sets a geometry of 32 sectors and 64 heads. It also uses the 4\(cqth partition entry in the partition table. It\(cqs required to boot also in USB\(hyZIP mode.
\(hyP, \(hy\(hypartition
Ensure to operate on a partition and not on a disk.
\(hyD, \(hy\(hydisk
Ensure to operate on a disk and not on a partition.
\(hyL, \(hy\(hylabel LABEL
Set the FAT label. The label is a string of 11 chars.
\(hyO, \(hy\(hyoem OEM
Set the FAT OEM name. The OEM name is a string of 11 chars.
\(hyS, \(hy\(hyserial SERIAL
Set the FAT serial number. The serial number is a 32 bit unsigned integer.
\(hyE, \(hy\(hydrive DRIVE
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.
\(hyv, \(hy\(hyverbose
Print some information on the device and on the filesystem created.
\(hyi, \(hy\(hyinteractive
Show the errors in a message box. Only for Windows.
\(hyh, \(hy\(hyhelp
Print a short help.
\(hyV, \(hy\(hyversion
Print the version number.
IMAGE
Directory image to copy on the disk. All the files and subdirectories present in this directory are copied on the disk.
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.
In Windows disk devices are named \(rs\(rs.\(rsPhysicalDriveN where N is a digit. Partition devices are named \(rs\(rs.\(rsX: where X is a letter, but sometimes \(rs\(rs.\(rsX: is a disk and not a partition, for example on floppies and on all the USB Mass Storage devices without a partition table.
To make a bootable FAT using syslinux you must use the \(hyX option for syslinux version 2.xx or the \(hyY option for syslinux version 3.xx. You must also copy in the root directory of the disk the files:
ldlinux.sys The syslinux loader. syslinux.cfg The syslinux configuration file. linux The Linux kernel image (the file name may be different). initrd.img The initrd filesystem (the file name may be different or missing).
You must also specify the \(oqldlinux.bss\(cq boot sector with the \(hyb option and possibily the \(oqmbr.bin\(cq MBR sector with the \(hym option. Both the sector images are present in the syslinux package.
For example:
makebootfat \(hyo usb \(rs
\(hyY \(rs
\(hyb ldlinux.bss \(hym mbr.bin \(rs
\(hyc ldlinux.sys \(hyc syslinux.cfg \(rs
\(hyc linux \(hyc initrd.img \(rs
image
To make a bootable FAT using loadlin and FreeDOS you must copy in the root directory of the disk the files:
kernel.sys The FreeDOS kernel. Remember to use the \(a"32\(a" kernel version to support FAT32. command.com The FreeDOS shell. autoexec.bat Used to start loadlin. loadlin.exe The loadlin executable. linux The Linux kernel image (the file name may be different). initrd.img The initrd filesystem (the file name may be different or missing).
You must also specify the FreeDOS boot sectors available on the FreeDOS \(oqsys\(cq source package with the \(hy1, \(hy2, \(hy3 option. For the MBR you can use the sectors image available on the FreeDOS \(oqfdisk\(cq source package.
For example:
makebootfat \(hyo /dev/hda1 \(rs
\(hyE 255 \(rs
\(hy1 fat12com.bin \(hy2 fat16com.bin \(hy3 fat32lba.bin \(rs
\(hyc kernel.sys \(hyc command.com \(rs
\(hyc autoexec.bat \(hyc loadlin.exe \(rs
\(hyc linux \(hyc initrd.img \(rs
image
The BIOS USB boot support is generally differentiated in three categories: USB\(hyHDD, USB\(hyFDD and USB\(hyZIP.
The USB\(hyHDD (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 \(hym option.
The USB\(hyFDD (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 \(hym option.
The USB\(hyZIP (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 \(hym and \(hyZ option.
Generally these standards are incompatible, but using the \(hym, \(hyF and \(hyZ options you can create a disk compatible with all of them.
To use the \(hyF option, the MBR image specified must follow the constrains:
It must start with a standard FAT 3 bytes jump instruction.
It must have the bytes from address 3 to 89 (included) unused.
And example of such image is in the \(oqmbrfat.bin\(cq file.
For example to create a syslinux image:
makebootfat \(hyo usb \(rs
\(hyY \(rs
\(hyZ \(rs
\(hyb ldlinux.bss \(hym mbrfat.bin \(hyF \(rs
\(hyc ldlinux.sys \(hyc syslinux.cfg \(rs
\(hyc linux \(hyc initrd.img \(rs
image
and for a FreeDOS and loadlin image:
makebootfat \(hyo usb \(rs
\(hyE 255 \(rs
\(hyZ \(rs
\(hy1 fat12com.bin \(hy2 fat16com.bin \(hy3 fat32chs.bin \(rs
\(hym mbrfat.bin \(hyF \(rs
\(hyc kernel.sys \(hyc command.com \(rs
\(hyc autoexec.bat \(hyc loadlin.exe \(rs
\(hyc linux \(hyc initrd.img \(rs
image
Please note that FreeDos has some problems booting from USB. It works only on very few conditions.
To exclude some files or directories in the image copy, you can use the \(hyx option using the same path specification which are you using for the image directory.
For example, if you need to exclude the \(oqisolinux\(cq and \(oqsyslinux\(cq subdirectories from the \(oqimage\(cq directory you can use the command:
makebootfat ... \(rs
\(hyx image/isolinux \(rs
\(hyx image/syslinux \(rs
image
This file is Copyright (C) 2004, 2005 Andrea Mazzoleni
syslinux(1), mkdosfs(1), dosfsck(1)