Is this strictly a log file or is it referenced by other code? I'm wondering if creating a copy of this and marking it read only would do anything. Assuming that the code that writes it even obeys/looks for the read only attribute.
It's strictly a log file, and it doesn't even look at any attributes.
Let's put it this way - the bootloader is like 13k-ish (excluding the RSAREF crypto code, most of which isn't even used.) That 13k handles initializing the hardware, copying itself into RAM, setting up the IDE controller, finding the partition table, reading it, finding the fat, reading it, then finding some files, and loading them and their signatures, checking them, etc ... its a lot packed into a little space.
The log routine literally looks like this:
void init() {
[...]
initialize IDE adapter
read partition table. is it okay? find first partition
is it FAT32? okay, read bootsector
find fat location from bootsector
find root directory location from fat -- store away
[...]
}
void write_bootload_log(char *step, char *status) {
read root directory
for each file in root directory:
is it "BOOTLOAD.LOG"?
yes : read address of first sector of this file
read first sector of file
search through file until I find a null (Ascii 0) char
write out "step status <null>"
return
if any of the above fails -- give up and return to caller
}
Very simple; nothing more, nothing less. I know for a fact it's not sophisticated to create a new file (this is why none of you have this bootload.log file), nor is it even smart enough to take an empty file and allocate more space to it (because I first tried a 0-byte file and that didn't work.)
In fact, I'd be surprised if the thing was able to log beyond one 512-byte sector (or maybe 4096-byte cluster? dunno)
It makes sense; if you build a device that's finicky about what it will boot, you need a way of troubleshooting it while you work the bugs out...
No, as far as I can tell, nothing else refers to it.
For the record, I still don't even know what uses all the mystery data before the first partition (other than the drive signature and partition table...)
-b