makebootfat-1.4/ 0000777 0001750 0000144 00000000000 10216070343 010647 5 0000000 0000000 makebootfat-1.4/doc/ 0000777 0001750 0000144 00000000000 10216070343 011414 5 0000000 0000000 makebootfat-1.4/doc/makebootfat.1 0000644 0001750 0000144 00000023100 10207674317 013715 0000000 0000000 .TH "Makebootfat Bootable FAT Disk Creation" 1 .SH NAME makebootfat \(hy Makebootfat Bootable FAT Disk Creation .SH SYNOPSIS makebootfat [options] IMAGE .PD 0 .PP .PD .SH DESCRIPTION This utility creates a bootable FAT filesystem and populates it with files and boot tools. .PP It is mainly designed to create bootable USB and Fixed disk for the AdvanceCD project. .PP The official site of AdvanceCD and makebootfat is: .PP .RS 4 http://advancemame.sourceforge.net/ .PD 0 .PP .PD .RE .SH OPTIONS .TP .B \(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. .TP .B \(hyb, \(hy\(hyboot FILE .TP .B \(hy1, \(hy\(hyboot\(hyfat12 FILE .TP .B \(hy2, \(hy\(hyboot\(hyfat16 FILE .TP .B \(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. .TP .B \(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. .TP .B \(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. .TP .B \(hyc, \(hy\(hycopy FILE Copy the specified file in the root directory of the disk. The file is copied using the readonly attribute. .TP .B \(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. .TP .B \(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. .TP .B \(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. .TP .B \(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. .TP .B \(hyP, \(hy\(hypartition Ensure to operate on a partition and not on a disk. .TP .B \(hyD, \(hy\(hydisk Ensure to operate on a disk and not on a partition. .TP .B \(hyL, \(hy\(hylabel LABEL Set the FAT label. The label is a string of 11 chars. .TP .B \(hyO, \(hy\(hyoem OEM Set the FAT OEM name. The OEM name is a string of 11 chars. .TP .B \(hyS, \(hy\(hyserial SERIAL Set the FAT serial number. The serial number is a 32 bit unsigned integer. .TP .B \(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. .TP .B \(hyv, \(hy\(hyverbose Print some information on the device and on the filesystem created. .TP .B \(hyi, \(hy\(hyinteractive Show the errors in a message box. Only for Windows. .TP .B \(hyh, \(hy\(hyhelp Print a short help. .TP .B \(hyV, \(hy\(hyversion Print the version number. .TP .B IMAGE Directory image to copy on the disk. All the files and subdirectories present in this directory are copied on the disk. .SH DISKS AND PARTITIONS NAMES 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. .PP 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. .SH SYSLINUX 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: .RS 0 .PD 0 .HP 4 .I ldlinux.sys The syslinux loader. .HP 4 .I syslinux.cfg The syslinux configuration file. .HP 4 .I linux The Linux kernel image (the file name may be different). .HP 4 .I initrd.img The initrd filesystem (the file name may be different or missing). .PD .RE .PP 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. .PP For example: .PP .RS 4 makebootfat \(hyo usb \(rs .PD 0 .PP .PD \(hyY \(rs .PD 0 .PP .PD \(hyb ldlinux.bss \(hym mbr.bin \(rs .PD 0 .PP .PD \(hyc ldlinux.sys \(hyc syslinux.cfg \(rs .PD 0 .PP .PD \(hyc linux \(hyc initrd.img \(rs .PD 0 .PP .PD image .PD 0 .PP .PD .RE .SH LOADLIN AND FREEDOS To make a bootable FAT using loadlin and FreeDOS you must copy in the root directory of the disk the files: .RS 0 .PD 0 .HP 4 .I kernel.sys The FreeDOS kernel. Remember to use the \(a"32\(a" kernel version to support FAT32. .HP 4 .I command.com The FreeDOS shell. .HP 4 .I autoexec.bat Used to start loadlin. .HP 4 .I loadlin.exe The loadlin executable. .HP 4 .I linux The Linux kernel image (the file name may be different). .HP 4 .I initrd.img The initrd filesystem (the file name may be different or missing). .PD .RE .PP 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. .PP For example: .PP .RS 4 makebootfat \(hyo /dev/hda1 \(rs .PD 0 .PP .PD \(hyE 255 \(rs .PD 0 .PP .PD \(hy1 fat12com.bin \(hy2 fat16com.bin \(hy3 fat32lba.bin \(rs .PD 0 .PP .PD \(hyc kernel.sys \(hyc command.com \(rs .PD 0 .PP .PD \(hyc autoexec.bat \(hyc loadlin.exe \(rs .PD 0 .PP .PD \(hyc linux \(hyc initrd.img \(rs .PD 0 .PP .PD image .PD 0 .PP .PD .RE .SH MULTI STANDARD USB BOOTING The BIOS USB boot support is generally differentiated in three categories: USB\(hyHDD, USB\(hyFDD and USB\(hyZIP. .PP 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. .PP 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. .PP 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. .PP Generally these standards are incompatible, but using the \(hym, \(hyF and \(hyZ options you can create a disk compatible with all of them. .PP To use the \(hyF option, the MBR image specified must follow the constrains: .PD 0 .IP \(bu It must start with a standard FAT 3 bytes jump instruction. .IP \(bu It must have the bytes from address 3 to 89 (included) unused. .PD .PP And example of such image is in the \(oqmbrfat.bin\(cq file. .PP For example to create a syslinux image: .PP .RS 4 makebootfat \(hyo usb \(rs .PD 0 .PP .PD \(hyY \(rs .PD 0 .PP .PD \(hyZ \(rs .PD 0 .PP .PD \(hyb ldlinux.bss \(hym mbrfat.bin \(hyF \(rs .PD 0 .PP .PD \(hyc ldlinux.sys \(hyc syslinux.cfg \(rs .PD 0 .PP .PD \(hyc linux \(hyc initrd.img \(rs .PD 0 .PP .PD image .PD 0 .PP .PD .RE .PP and for a FreeDOS and loadlin image: .PP .RS 4 makebootfat \(hyo usb \(rs .PD 0 .PP .PD \(hyE 255 \(rs .PD 0 .PP .PD \(hyZ \(rs .PD 0 .PP .PD \(hy1 fat12com.bin \(hy2 fat16com.bin \(hy3 fat32chs.bin \(rs .PD 0 .PP .PD \(hym mbrfat.bin \(hyF \(rs .PD 0 .PP .PD \(hyc kernel.sys \(hyc command.com \(rs .PD 0 .PP .PD \(hyc autoexec.bat \(hyc loadlin.exe \(rs .PD 0 .PP .PD \(hyc linux \(hyc initrd.img \(rs .PD 0 .PP .PD image .PD 0 .PP .PD .RE .PP Please note that FreeDos has some problems booting from USB. It works only on very few conditions. .SH EXCLUSION 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. .PP For example, if you need to exclude the \(oqisolinux\(cq and \(oqsyslinux\(cq subdirectories from the \(oqimage\(cq directory you can use the command: .PP .RS 4 makebootfat ... \(rs .PD 0 .PP .PD \(hyx image/isolinux \(rs .PD 0 .PP .PD \(hyx image/syslinux \(rs .PD 0 .PP .PD image .PD 0 .PP .PD .RE .SH COPYRIGHT This file is Copyright (C) 2004, 2005 Andrea Mazzoleni .SH SEE ALSO syslinux(1), mkdosfs(1), dosfsck(1) makebootfat-1.4/doc/makebootfat.d 0000644 0001750 0000144 00000020516 10207674235 014007 0000000 0000000 Name{number} makebootfat - Makebootfat Bootable FAT Disk Creation Synopsis :makebootfat [options] IMAGE Description 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/ Options -o, --output DEVICE 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. -b, --boot FILE -1, --boot-fat12 FILE -2, --boot-fat16 FILE -3, --boot-fat32 FILE 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. -m, --mbr 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. -F, --mbrfat 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. -c, --copy FILE Copy the specified file in the root directory of the disk. The file is copied using the readonly attribute. -x, --exclude 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. -X, --syslinux2 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. -Y, --syslinux3 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. -Z, --zip 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. -P, --partition Ensure to operate on a partition and not on a disk. -D, --disk Ensure to operate on a disk and not on a partition. -L, --label LABEL Set the FAT label. The label is a string of 11 chars. -O, --oem OEM Set the FAT OEM name. The OEM name is a string of 11 chars. -S, --serial SERIAL Set the FAT serial number. The serial number is a 32 bit unsigned integer. -E, --drive 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. -v, --verbose Print some information on the device and on the filesystem created. -i, --interactive Show the errors in a message box. Only for Windows. -h, --help Print a short help. -V, --version 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. Disks and Partitions Names 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 \\.\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. Syslinux 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: 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 `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. For example: :makebootfat -o usb \ : -Y \ : -b ldlinux.bss -m mbr.bin \ : -c ldlinux.sys -c syslinux.cfg \ : -c linux -c initrd.img \ : image Loadlin and FreeDOS 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 "32" 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 `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. For example: :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 Multi Standard USB Booting The BIOS USB boot support is generally differentiated in three categories: USB-HDD, USB-FDD and USB-ZIP. 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. 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. 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. Generally these standards are incompatible, but using the -m, -F and -Z options you can create a disk compatible with all of them. To use the -F 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 `mbrfat.bin' file. For example to create a syslinux image: :makebootfat -o usb \ : -Y \ : -Z \ : -b ldlinux.bss -m mbrfat.bin -F \ : -c ldlinux.sys -c syslinux.cfg \ : -c linux -c initrd.img \ : image and for a FreeDOS and loadlin image: :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 Please note that FreeDos has some problems booting from USB. It works only on very few conditions. Exclusion 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. For example, if you need to exclude the `isolinux' and `syslinux' subdirectories from the `image' directory you can use the command: :makebootfat ... \ : -x image/isolinux \ : -x image/syslinux \ : image Copyright This file is Copyright (C) 2004, 2005 Andrea Mazzoleni See Also syslinux(1), mkdosfs(1), dosfsck(1) makebootfat-1.4/doc/history.d 0000644 0001750 0000144 00000001612 10216070151 013173 0000000 0000000 Name makebootfat - History For makebootfat makebootfat Version 1.4 2005/03 ) Fixed a memory leak. makebootfat Version 1.3 2005/02 ) Minor fixes at the documentation. makebootfat Version 1.2 2005/02 ) Added support for syslinux 3.xx with the new -Y option. This removes the limitation of 1 GB on FAT filesystems. ) The Linux version now suggests to switch to root if searching for usb devices results in "Access Denied" errors. ) Added a new -Z option to force ZIP-Disk compatibility. ) Added a minimal write cache to speedup the writing process. makebootfat Version 1.1 2004/12 ) The mbrfat sector now prints the type and geometry of the drive. ) Minor fixes at the documentation. ) Fixed a minor problem in the Windows SetupDiGetProperty() function. ) Removed the 4GB limit creating FAT32 partition in 32 bit Linux systems. makebootfat Version 1.0 2004/06 ) First version. makebootfat-1.4/doc/readme.d 0000644 0001750 0000144 00000000456 10064346440 012744 0000000 0000000 Name makebootfat - makebootfat makebootfat is a command line tool part of the AdvanceCD project able to make bootable FAT filesystems. It runs in Linux, Windows and in all the other Unix like platforms. The official site of AdvanceCD and makebootfat is: http://advancemame.sourceforge.net makebootfat-1.4/doc/authors.d 0000644 0001750 0000144 00000000252 10166301557 013171 0000000 0000000 Name authors - makebootfat Authors Authors The author of makebootfat is Andrea Mazzoleni. You can contact me sending an email at: amadvance@users.sourceforge.net makebootfat-1.4/doc/install.d 0000644 0001750 0000144 00000000355 10072577174 013164 0000000 0000000 Name makebootfat - makebootfat Installation As root or user type: :./configure :make and as root to install the program and the documentation type: :make install The documentation is in the man page: :man makebootfat makebootfat-1.4/doc/makebootfat.txt 0000644 0001750 0000144 00000022524 10207674317 014405 0000000 0000000 ====================================== Makebootfat Bootable FAT Disk Creation ====================================== 1 SYNOPSIS ========== makebootfat [options] IMAGE 2 DESCRIPTION ============= 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/ 3 OPTIONS ========= -o, --output DEVICE 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. -b, --boot FILE -1, --boot-fat12 FILE -2, --boot-fat16 FILE -3, --boot-fat32 FILE 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. -m, --mbr 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. -F, --mbrfat 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. -c, --copy FILE Copy the specified file in the root directory of the disk. The file is copied using the readonly attribute. -x, --exclude 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. -X, --syslinux2 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. -Y, --syslinux3 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. -Z, --zip 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. -P, --partition Ensure to operate on a partition and not on a disk. -D, --disk Ensure to operate on a disk and not on a partition. -L, --label LABEL Set the FAT label. The label is a string of 11 chars. -O, --oem OEM Set the FAT OEM name. The OEM name is a string of 11 chars. -S, --serial SERIAL Set the FAT serial number. The serial number is a 32 bit unsigned integer. -E, --drive 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. -v, --verbose Print some information on the device and on the filesystem created. -i, --interactive Show the errors in a message box. Only for Windows. -h, --help Print a short help. -V, --version 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. 4 DISKS AND PARTITIONS NAMES ============================ 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 \\.\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. 5 SYSLINUX ========== 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: 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 `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. For example: makebootfat -o usb \ -Y \ -b ldlinux.bss -m mbr.bin \ -c ldlinux.sys -c syslinux.cfg \ -c linux -c initrd.img \ image 6 LOADLIN AND FREEDOS ===================== 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 "32" 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 `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. For example: 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 7 MULTI STANDARD USB BOOTING ============================ The BIOS USB boot support is generally differentiated in three categories: USB-HDD, USB-FDD and USB-ZIP. 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. 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. 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. Generally these standards are incompatible, but using the -m, -F and -Z options you can create a disk compatible with all of them. To use the -F 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 `mbrfat.bin' file. For example to create a syslinux image: makebootfat -o usb \ -Y \ -Z \ -b ldlinux.bss -m mbrfat.bin -F \ -c ldlinux.sys -c syslinux.cfg \ -c linux -c initrd.img \ image and for a FreeDOS and loadlin image: 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 Please note that FreeDos has some problems booting from USB. It works only on very few conditions. 8 EXCLUSION =========== 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. For example, if you need to exclude the `isolinux' and `syslinux' subdirectories from the `image' directory you can use the command: makebootfat ... \ -x image/isolinux \ -x image/syslinux \ image 9 COPYRIGHT =========== This file is Copyright (C) 2004, 2005 Andrea Mazzoleni 10 SEE ALSO =========== syslinux(1), mkdosfs(1), dosfsck(1) makebootfat-1.4/doc/history.txt 0000644 0001750 0000144 00000002306 10216070274 013576 0000000 0000000 ======================= History For makebootfat ======================= MAKEBOOTFAT VERSION 1.4 2005/03 =============================== * Fixed a memory leak. MAKEBOOTFAT VERSION 1.3 2005/02 =============================== * Minor fixes at the documentation. MAKEBOOTFAT VERSION 1.2 2005/02 =============================== * Added support for syslinux 3.xx with the new -Y option. This removes the limitation of 1 GB on FAT filesystems. * The Linux version now suggests to switch to root if searching for usb devices results in "Access Denied" errors. * Added a new -Z option to force ZIP-Disk compatibility. * Added a minimal write cache to speedup the writing process. MAKEBOOTFAT VERSION 1.1 2004/12 =============================== * The mbrfat sector now prints the type and geometry of the drive. * Minor fixes at the documentation. * Fixed a minor problem in the Windows SetupDiGetProperty() function. * Removed the 4GB limit creating FAT32 partition in 32 bit Linux systems. MAKEBOOTFAT VERSION 1.0 2004/06 =============================== * First version. makebootfat-1.4/doc/readme.txt 0000644 0001750 0000144 00000000641 10064350530 013327 0000000 0000000 =========== makebootfat =========== makebootfat is a command line tool part of the AdvanceCD project able to make bootable FAT filesystems. It runs in Linux, Windows and in all the other Unix like platforms. The official site of AdvanceCD and makebootfat is: http://advancemame.sourceforge.net makebootfat-1.4/doc/authors.txt 0000644 0001750 0000144 00000000463 10166301567 013572 0000000 0000000 =================== makebootfat Authors =================== AUTHORS ======= The author of makebootfat is Andrea Mazzoleni. You can contact me sending an email at: amadvance@users.sourceforge.net makebootfat-1.4/doc/install.txt 0000644 0001750 0000144 00000000557 10072577235 013562 0000000 0000000 ======================== makebootfat Installation ======================== As root or user type: ./configure make and as root to install the program and the documentation type: make install The documentation is in the man page: man makebootfat makebootfat-1.4/doc/makebootfat.html 0000644 0001750 0000144 00000034563 10207674317 014540 0000000 0000000
makebootfat [options] IMAGE
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/
|
-o, --output DEVICE |
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. |
-b, --boot FILE |
-1, --boot-fat12 FILE |
-2, --boot-fat16 FILE |
-3, --boot-fat32 FILE |
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. |
-m, --mbr 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. |
-F, --mbrfat |
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. |
-c, --copy FILE |
Copy the specified file in the root directory of the disk. The file is copied using the readonly attribute. |
-x, --exclude 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. |
-X, --syslinux2 |
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. |
-Y, --syslinux3 |
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. |
-Z, --zip |
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. |
-P, --partition |
Ensure to operate on a partition and not on a disk. |
-D, --disk |
Ensure to operate on a disk and not on a partition. |
-L, --label LABEL |
Set the FAT label. The label is a string of 11 chars. |
-O, --oem OEM |
Set the FAT OEM name. The OEM name is a string of 11 chars. |
-S, --serial SERIAL |
Set the FAT serial number. The serial number is a 32 bit unsigned integer. |
-E, --drive 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. |
-v, --verbose |
Print some information on the device and on the filesystem created. |
-i, --interactive |
Show the errors in a message box. Only for Windows. |
-h, --help |
Print a short help. |
-V, --version |
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 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.
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 `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.
For example:
makebootfat -o usb \ -Y \ -b ldlinux.bss -m mbr.bin \ -c ldlinux.sys -c syslinux.cfg \ -c linux -c initrd.img \ image |
kernel.sys | The FreeDOS kernel. Remember to use the "32" 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 `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.
For example:
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 |
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.
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.
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.
Generally these standards are incompatible, but using the -m, -F and -Z options you can create a disk compatible with all of them.
To use the -F option, the MBR image specified must follow the constrains:
And example of such image is in the `mbrfat.bin' file.
For example to create a syslinux image:
makebootfat -o usb \ -Y \ -Z \ -b ldlinux.bss -m mbrfat.bin -F \ -c ldlinux.sys -c syslinux.cfg \ -c linux -c initrd.img \ image |
and for a FreeDOS and loadlin image:
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 |
Please note that FreeDos has some problems booting from USB. It works only on very few conditions.
For example, if you need to exclude the `isolinux' and `syslinux' subdirectories from the `image' directory you can use the command:
makebootfat ... \ -x image/isolinux \ -x image/syslinux \ image |
makebootfat is a command line tool part of the AdvanceCD project able to make bootable FAT filesystems.
It runs in Linux, Windows and in all the other Unix like platforms.
The official site of AdvanceCD and makebootfat is:
http://advancemame.sourceforge.net |
You can contact me sending an email at:
amadvance@users.sourceforge.net |
As root or user type:
./configure make |
and as root to install the program and the documentation type:
make install |
The documentation is in the man page:
man makebootfat |