Anton Shepelev wrote: > I know my problem was confusion between MBR and the boot sector.
Eric already told me. ;-) > But anyway, fdisk and bootmgr should return the same data... FDISK is wrong. BOOTMGR is right. *g* Here's the corresponding code snippet from FDISK, where offsets >= 0x1BE are filled with zeros by design (second do/while loop). Does anyone (Eric?) know the reason? *** /* Save MBR */ void Save_MBR() { int index=0; FILE *file_pointer; Read_Physical_Sectors(flags.drive_number,0,0,1,1); file_pointer = fopen("boot.mbr","wb"); if(!file_pointer) { printf("\nError opening or creating \"BOOT.MBR\" for writing...Program Terminated.\n"); exit(8); } do { fputc(sector_buffer[index],file_pointer); index++; }while(index<0x1be); do{ fputc(0,file_pointer); index++; }while(index<512); fclose(file_pointer); } *** Robert Riebisch -- BTTR Software http://www.bttr-software.de/ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user