Hi, forwarding a feature request for FDISK from Fritz Mueller :-)
Could FDISK automatically trigger the /MBR action when you: 1. have the code area (offset 0 to 0x1BD) filled with identical bytes (for example all 00) 2. update partitions 3. after the update, there is an active (boot) partition Apparently users expect FDISK to make your complete harddisk bootable when you put a boot partition on it and format and SYS that partition. Modern disks tend to be shipped without a pre-installed MBR, so "automatic /MBR" would help users by making the expectation come true without forcing the user to read the manual or read the /? output and run FDISK /MBR on top of the usual partitioning, formatting and SYSing steps. The idea with the 3 (and-connected) conditions is by me. The thing is that I would not enjoy FDISK to automatically mess with my FDISK code when I only want to change partitions and some other boot code already exists. The implementation would call Create_MBR() if needed. The current implementation Create_MBR_If_Not_Present() ALMOST does that, but it checks offset 0x1fe and 0x1ff for magic bytes, ignoring whether or not a boot CODE is present in fdiskio.c and this is what the Interactive_User_Interface function of userint1.c uses. NOT sure whether this is the place which would cover ALL relevant situations, but it would be a start :-) Example for a quick and dirty patch: > --- fdiskio.c.old 2003-01-18 12:37:54 +0100 > +++ fdiskio.c.new 2018-09-18 00:53:11 +0200 > @@ -247,7 +247,12 @@ > { > Read_Physical_Sectors(0x80,0,0,1,1); > > - if( (sector_buffer[0x1fe]!=0x55) && (sector_buffer[0x1ff]!=0xaa) ) > + if( (sector_buffer[0x1fe]!=0x55) || (sector_buffer[0x1ff]!=0xaa) ) > + { > + Create_MBR(); > + } > + else if( (sector_buffer[0] == sector_buffer[1]) && > + (sector_buffer[1] == sector_buffer[2]) ) > { > Create_MBR(); > } If somebody has the right toolchain to compile, Fritz will be happy to give a patched FDISK binary a try, I think :-) Thanks! Regards, Eric _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel