Thanks to windrv for your concern and support all along!
To make things easier for your work, I’ll explain some related technical details here.
1。BOOTGRUB is for booting GRLDR under FAT12/16/32 and NTFS, and currently does not support other partition formats.
2。BOOTGRUB currently uses the following algorithm to look for GRLDR: first it starts searching from the first primary partition in the MBR, to see whether it is a FAT12/16/32 partition. If it is, it assumes that the root directory of that partition contains the GRLDR file, and tries to boot it. If that FAT12/16/32 partition does not have a GRLDR file, booting will fail (displaying “No GRLDR” and halting). If that partition is not FAT12/16/32, it then checks whether it is an NTFS partition, that is, whether it has Microsoft’s NTLDR boot sector. If it does, it assumes that the root directory of that NTFS partition contains the GRLDR file, and tries to start it. If that partition does not have Microsoft’s NTLDR boot sector, then the first primary partition is considered unable to boot GRLDR, and it fails. Then it moves on to the second primary partition and does similar things. If that also fails, it tries the third and fourth primary partitions. If all four primary partitions fail, it displays the Missing GRLDR message and halts. According to the current algorithm design, we do not care which primary partition has the Active flag. In general, the partition where we find GRLDR is Windows drive C:, but that may not always be so.【Note that Windows generally treats the primary partition containing the active flag as drive C:.】
3。Our boot loader is highly flexible. The user can freely adjust partition sizes, and can even change partition types (from FAT16 to FAT32 or NTFS, change them however you like!). None of this affects our program; BOOTGRUB can always find the GRLDR file in the root directory of the partition.
4。Because of the generality and transparency of the algorithm, installing BOOTGRUB into the MBR becomes simple, and it can be installed with any software under any operating system. For comparison, GNU GRUB’s stage files must enter GRUB in order to be installed. It is difficult for others to write an MBR installation program for it, because its MBR contains absolute disk location information, which changes depending on the physical location of the stage files.
5。If the floppy’s file system type is FAT12/16, then use the fourth sector of BOOTGRUB; as mentioned earlier, the 60 bytes from 0x02 to 0x3d on the floppy must not be changed. If the floppy’s partition type is FAT32, then the third sector of BOOTGRUB should be used, and the range of floppy sector bytes to leave unchanged is 0x02 to 0x59; these 88 bytes must not be changed, and the original values on the floppy should be used. Don’t be surprised that a floppy might use FAT16 or FAT32 formats; this is possible. If the floppy capacity is several hundred MB or several dozen GB, then it will use FAT16 or FAT32 formats like these. In particular, GRUB for DOS can emulate a hard disk file as a floppy, and the capacity of this emulated floppy has no limit at all.
------------------
Also, GRUB for DOS still needs a tool that can defragment a single file. I wonder whether windrv’s company can make such a tool.
因为我们亲手创建,这个世界更加美丽。