Home |
RTTarget-32 Programming Manual Running Win32 Programs without Win32 Running a Program on the Target Program BootDisk Booting from the CPU Reset Vector Compiling and Linking with On Time RTOS-32 |
Program BootDiskCommand line utility BootDisk can be used to transfer an application to a bootable disk device or floppy disk image file. The target disk must have been formatted with a FAT-12/16/32 or exFAT file system. The application to be placed on the disk must contain the BIOS boot code Biosboot.exe and a sufficiently large disk buffer. To invoke BootDisk, use command line: BootDisk [Options...] AppName Drive[:] [BIOS_ID [Loader]] or BootDisk /remove Drive[:] or BootDisk [Options...] AppName[.rtb] Image.dsk [BIOS_ID [Loader]] Options/delDelete all existing .RTA files from the target drive before writing a new one. If not specified, existing .RTA files are erased at the end of the operation. /chsForce the boot loader to use CHS instead of extended BIOS int 13h functions which use LBA sector addressing. This option should only be used when the target's BIOS uses a different CHS-LBA translation than the computer on which the bootdisk is created. It cannot be used on disks larger than 8G bytes. /lbaForce the boot loader to use LBA instead of CHS BIOS int 13h functions. This option may be required for USB or CD-ROM boot disks which are emulated as floopy disks by the BIOS. By default, floppies are accessed using CHS BIOS functions. /sxIf a floppy disk image file is created, this option can be used to specify the image size. For x == 0, the default size of 1.44MB is applies. Option /s1 will create a 2.88MB, /s2 a 5.76MB, /s3 a 11.52MB, and /s4 a 22.49MB image. /txIf a floppy disk image file is created, this option sets the track size (sectors per track) in the image. /t18 and /t36 specify 18 or 36 sectors per track. The default is 18 except for option /s1 which defaults to 36. /noparThis option instructs BootDisk not to update the partition table entry of the partition hosting the specified target drive. If not specified, BootDisk will attempt to set the partition active. /mbrWith this option, BootDisk will update the Master Boot Record's boot loader with its own loader. This option may be required on some disks or memory sticks to make them bootable. /parlbaThis option instructs BootDisk to change the partition type to an LBA type if its is a CHS type. This option should only be used if the disk does not boot and option /mbr did not fix the problem. Please note that this option can make a partition unreadable if used on older computers which do not support LBA. /waitInstructs the program to wait for keyboard input if an error is encountered. /removeWhen option /remove is specified instead of an application's name, BootDisk will delete all .RTA files from the target drive and restore the original boot sector which was saved by BootDisk in file BOOTSECT.RTT the first time it wrote an RTTarget-32 application to the disk. ParametersAppName[.rtb]The name of the program to write to the target drive. If no path information is given, the .RTB file is searched in the default directory and then in the directory BootDisk.exe resides in. DriveThe logical (not physical!) drive to receive the boot image. It must be a primary partition. Image.dskThe name of a floppy disk image file BootDisk should create. The file extension must be .img, .ima, or .dsk. When an image file is specified as the target device, BootDisk will create an image of a 1.44MB (or larger, see option /sx) floppy disk formatted as FAT-12 and place the .RTA file on that image. Such image files can be used to create other boot devices such as bootable CD-ROMs. Creating disk image files is only supported when BootDisk is executed under Windows. BIOS_IDSpecifies the BIOS ID byte the bootstrap loader should use during booting to load itself. If not specified, default value 255 is assumed and the boot loader will use the value supplied by the BIOS. To force a specific boot device (may be required on some older BIOSes), use 0 for drive A:, 1 for B:, 128 for C:, 129 for D:, etc. LoaderThe file name of an MS-DOS .EXE file which will load the application from disk at boot time. When this parameter is not specified, the disk loader built into BootDisk.exe is used. The source code of the default disk loader is contained in file Boot\Diskload.asm. Instructions to recompile and link the disk loader are given in files Bin\Makeboot.bc and Bin\Makeboot.ms. By default, BootDisk requires Administrator privileges under Windows Vista and higher, unless option /nopar is used. For disks which are known to be bootable, option /nopar is recommended. Use options /mbr and /parlba only once per target disk if it is not bootable. Options /mbr and /parlba also need Administrator privileges. Program BootDisk will write the boot sector, a disk loader program, and the application to a file named Application.RTA (RTTarget-32 Application) in the target drive's root directory. BootDisk will check that the file written is located in a single, contiguous chain of clusters. This is required because the disk loader code is unable to load fragmented files. If the check fails, delete all files on the target drive and try again (sometimes, simply trying again without deleting any files will also work). Please note that BootDisk cannot guarantee that DOS or Windows creates a contiguous file. On heavily fragmented disks, it may become necessary to defragment or reformat the target drive before DOS or Windows will write a contiguous .RTA file. Disks prepared by BootDisk are standard FAT/exFAT disks and can be used to store other files on them. However, you should never delete an .RTA file and you should never use any method other than BootDisk or function RTMakeBootDisk to write an .RTA file. If you wish to use the diskette for other purposes, restore the original boot sector with BootDisk /remove Drive[:] or reformat the disk. RTTarget-32 in conjunction with RTFiles-32 also supports writing boot images to a disk under program control using function RTMakeBootDisk described in the RTTarget-32 Reference Manual. Since function RTMakeBootDisk uses RTFiles-32 instead of DOS or Windows to write the target .RTA file, it can guarantee that the file is contiguous as long as at least one cluster chain on the drive is large enough to hold it.
|