1Makebootfat Bootable FAT DiskGeCnreeraatlioCnoM(ma1mk)aenbdosotMfaantuaBlootable FAT Disk Creation(1)
2
3
4
6 makebootfat ‐ Makebootfat Bootable FAT Disk Creation
7
9 makebootfat [options] IMAGE
11 This utility creates a bootable FAT filesystem and populates it with
12 files and boot tools.
13
14 It is mainly designed to create bootable USB and Fixed disk for the
15 AdvanceCD project.
16
17 The official site of AdvanceCD and makebootfat is:
18
19 http://advancemame.sourceforge.net/
21 ‐o, ‐‐output DEVICE
22 Specify the output device. It must be the device where you want
23 to setup the filesystem. You can use the special ˝usb˝ value to
24 automatically select the USB Mass Storage device connected at
25 the system. This option is always required.
26
27 ‐b, ‐‐boot FILE
28
29 ‐1, ‐‐boot‐fat12 FILE
30
31 ‐2, ‐‐boot‐fat16 FILE
32
33 ‐3, ‐‐boot‐fat32 FILE
34 Specify the FAT boot sector images to use. The ‐b option uses
35 the same sector for all the FAT types. The other options can be
36 used to specify a different sector for different FAT types. The
37 FAT types for which a boot sector is not specified are not used.
38 This option is always required.
39
40 ‐m, ‐‐mbr FILE
41 Specify the MBR sector image to use. If this option is speci‐
42 fied a partition table is created on the disk. Otherwise the
43 disk is filled without a partition table like a floppy disk.
44
45 ‐F, ‐‐mbrfat
46 Change the MBR image specified with the ‐m option to pretend to
47 be a FAT filesystem starting from the first sector of the disk.
48 This allows booting from USB‐FDD (Floppy Disk Drive) also using
49 a partition table generally required by USB‐HDD (Hard Disk
50 Drive). The MBR image specified with the ‐m option must have
51 executable code positioned like a FAT boot sector. You can use
52 the included ‘mbrfat.bin’ file.
53
54 ‐c, ‐‐copy FILE
55 Copy the specified file in the root directory of the disk. The
56 file is copied using the readonly attribute.
57
58 ‐x, ‐‐exclude FILE
59 Exclude the specified files and subdirectories in the IMAGE
60 directory to copy. The path must be specified using the same
61 format used in the IMAGE directory specification.
62
63 ‐X, ‐‐syslinux2
64 Enforce the syslinux 2.xx FAT limitations. Syslinux 2.xx doesn’t
65 support FAT32 at all, and FAT16 with 64 and 128 sectors per
66 cluster formats. This option excludes all the FAT formats not
67 supported by syslinux. Please note that it limits the maximum
68 size of filesystem to 1 GB.
69
70 ‐Y, ‐‐syslinux3
71 Enforce the syslinux 3.xx FAT support. Syslinux 3.00 supports
72 all the FAT types and sizes but it requires a special customisa‐
73 tion of the boot sector and of the file ‘ldlinux.sys’. This
74 option does this customisation without the need to use the sys‐
75 linux installer if the ‘ldlinux.sys’ file is copied on disk with
76 the ‐c option.
77
78 ‐Z, ‐‐zip
79 If possible force the ZIP‐Disk compatibility. It sets a geometry
80 of 32 sectors and 64 heads. It also uses the 4’th partition
81 entry in the partition table. It’s required to boot also in
82 USB‐ZIP mode.
83
84 ‐P, ‐‐partition
85 Ensure to operate on a partition and not on a disk.
86
87 ‐D, ‐‐disk
88 Ensure to operate on a disk and not on a partition.
89
90 ‐L, ‐‐label LABEL
91 Set the FAT label. The label is a string of 11 chars.
92
93 ‐O, ‐‐oem OEM
94 Set the FAT OEM name. The OEM name is a string of 11 chars.
95
96 ‐S, ‐‐serial SERIAL
97 Set the FAT serial number. The serial number is a 32 bit
98 unsigned integer.
99
100 ‐E, ‐‐drive DRIVE
101 Set the BIOS drive to setup in the FAT boot sector. Generally
102 this value is ignored by boot sectors, with the exception of the
103 FAT12 and FAT16 FreeDOS boot sectors that require the correct
104 value or the value 255 to force auto detection.
105
106 ‐v, ‐‐verbose
107 Print some information on the device and on the filesystem cre‐
108 ated.
109
110 ‐i, ‐‐interactive
111 Show the errors in a message box. Only for Windows.
112
113 ‐h, ‐‐help
114 Print a short help.
115
116 ‐V, ‐‐version
117 Print the version number.
118
119 IMAGE Directory image to copy on the disk. All the files and subdirec‐
120 tories present in this directory are copied on the disk.
121
123 In Linux disk devices are named /dev/hdX or /dev/sdX where X is a let‐
124 ter. Partition devices are named /dev/hdXN or /dev/sdXN where X is a
125 letter and N a digit.
126
127 In Windows disk devices are named \\.\PhysicalDriveN where N is a
128 digit. Partition devices are named \\.\X: where X is a letter, but
129 sometimes \\.\X: is a disk and not a partition, for example on floppies
130 and on all the USB Mass Storage devices without a partition table.
131
133 To make a bootable FAT using syslinux you must use the ‐X option for
134 syslinux version 2.xx or the ‐Y option for syslinux version 3.xx. You
135 must also copy in the root directory of the disk the files:
136 ldlinux.sys The syslinux loader.
137 syslinux.cfg The syslinux configuration file.
138 linux The Linux kernel image (the file name may be different).
139 initrd.img The initrd filesystem (the file name may be different or
140 missing).
141
142 You must also specify the ‘ldlinux.bss’ boot sector with the ‐b option
143 and possibily the ‘mbr.bin’ MBR sector with the ‐m option. Both the
144 sector images are present in the syslinux package.
145
146 For example:
147
148 makebootfat ‐o usb \
149 ‐Y \
150 ‐b ldlinux.bss ‐m mbr.bin \
151 ‐c ldlinux.sys ‐c syslinux.cfg \
152 ‐c linux ‐c initrd.img \
153 image
155 To make a bootable FAT using loadlin and FreeDOS you must copy in the
156 root directory of the disk the files:
157 kernel.sys The FreeDOS kernel. Remember to use the ˝32˝ kernel version
158 to support FAT32.
159 command.com The FreeDOS shell.
160 autoexec.bat Used to start loadlin.
161 loadlin.exe The loadlin executable.
162 linux The Linux kernel image (the file name may be different).
163 initrd.img The initrd filesystem (the file name may be different or
164 missing).
165
166 You must also specify the FreeDOS boot sectors available on the FreeDOS
167 ‘sys’ source package with the ‐1, ‐2, ‐3 option. For the MBR you can
168 use the sectors image available on the FreeDOS ‘fdisk’ source package.
169
170 For example:
171
172 makebootfat ‐o /dev/hda1 \
173 ‐E 255 \
174 ‐1 fat12com.bin ‐2 fat16com.bin ‐3 fat32lba.bin \
175 ‐c kernel.sys ‐c command.com \
176 ‐c autoexec.bat ‐c loadlin.exe \
177 ‐c linux ‐c initrd.img \
178 image
180 The BIOS USB boot support is generally differentiated in three cate‐
181 gories: USB‐HDD, USB‐FDD and USB‐ZIP.
182
183 The USB‐HDD (Hard Disk Drive) standard is the preferred choice and it
184 requires the presence of a partition table in the first sector of the
185 disk. You can create this type of disk using the ‐m option.
186
187 The USB‐FDD (Floppy Disk Drive) standard requires the presence of a
188 filesystem starting from the first sector of the disk without a parti‐
189 tion table. You can create this type of disk without using the ‐m
190 option.
191
192 The USB‐ZIP (ZIP Drive) standard requires the presence of a device with
193 a very specific geometry. Specifically, it requires a geometry with 32
194 sectors and 64 heads. It also requires the presence of a partition ta‐
195 ble with only a bootable partition in the fourth entry. You can create
196 this type of disk using the ‐m and ‐Z option.
197
198 Generally these standards are incompatible, but using the ‐m, ‐F and ‐Z
199 options you can create a disk compatible with all of them.
200
201 To use the ‐F option, the MBR image specified must follow the con‐
202 strains:
203 · It must start with a standard FAT 3 bytes jump instruction.
204 · It must have the bytes from address 3 to 89 (included) unused.
205
206 And example of such image is in the ‘mbrfat.bin’ file.
207
208 For example to create a syslinux image:
209
210 makebootfat ‐o usb \
211 ‐Y \
212 ‐Z \
213 ‐b ldlinux.bss ‐m mbrfat.bin ‐F \
214 ‐c ldlinux.sys ‐c syslinux.cfg \
215 ‐c linux ‐c initrd.img \
216 image
217 and for a FreeDOS and loadlin image:
218
219 makebootfat ‐o usb \
220 ‐E 255 \
221 ‐Z \
222 ‐1 fat12com.bin ‐2 fat16com.bin ‐3 fat32chs.bin \
223 ‐m mbrfat.bin ‐F \
224 ‐c kernel.sys ‐c command.com \
225 ‐c autoexec.bat ‐c loadlin.exe \
226 ‐c linux ‐c initrd.img \
227 image
228 Please note that FreeDos has some problems booting from USB. It works
229 only on very few conditions.
230
232 To exclude some files or directories in the image copy, you can use the
233 ‐x option using the same path specification which are you using for the
234 image directory.
235
236 For example, if you need to exclude the ‘isolinux’ and ‘syslinux’ sub‐
237 directories from the ‘image’ directory you can use the command:
238
239 makebootfat ... \
240 ‐x image/isolinux \
241 ‐x image/syslinux \
242 image
244 This file is Copyright (C) 2004, 2005 Andrea Mazzoleni
245
247 syslinux(1), mkdosfs(1), dosfsck(1)
248
249
250
251 Makebootfat Bootable FAT Disk Creation(1)