I could not create a working floppy by following instructions at: http://www.richud.com/wiki/Ubuntu_Create_Floppy_Image. There was failure with qemu and also with physical floppies made from the image by using dd. So, I verified by using a genuine Dos6.22.img: it worked fine with qemu and also physical floppy. I made a copy of the Dos6.22.img and named it Mod622.ima and verified it was working fine. I then ran: ms-sys -f -1 Mod622.ima. After this, the Mod622.ima failed consistently with qemu (and also with physical floppy):
qemu: fatal: Trying to execute code outside RAM or ROM at 0x4e5953e3
EAX=00000000 EBX=4d903ceb ECX=00000005 EDX=00000000
ESI=00008327 EDI=000005a8 EBP=00007c00 ESP=00007c08
EIP=4e495753 EFL=00000202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =ffc9 000ffc90 0000ffff 00009300
CS =ffc9 000ffc90 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =0070 00000700 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008200
TR =0000 00000000 0000ffff 00008b00
GDT= 000fd3a8 00000037
IDT= 00000000 000003ff
CR0=00000010 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
CCS=0000000c CCD=00007c00 CCO=ADDL
EFER=0000000000000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
Aborted (core dumped).
My confguration is:
CPU~Dual core Intel CPU L2400 (-MCP-) clocked at 1000.000 Mhz Kernel~3.6.10-2.fc17.i686 i686 Up~2:42 Mem~639.9/2008.5MB HDD~500.1GB(9.7% used) Procs~216 Client~Shell inxi~1.8.20
I verified that ms-sys had just modified the first block. The rest of the image is identical to the genuine Dos.6.22.img (verified with vbindiff). I am attaching the genuine Dos.6.22.img working image and the ms-sys modified Mod622.ima image (truncated for staying within 256K file size limit and zipped). Additional infos:
Offset Field
0x0 Boot record
0x200 FAT table #1
0x1400 FAT table #2
0x2600 Directory
0x4200 Code starting point
Dos.6.22.img (OK) and Mod622.ima (bad after ms-sys MBR writing)
Thanks for the bug report! The boot record written by ms-sys is the MSWIN4.1 floppy disk boot record described at http://thestarman.pcministry.com/asm/mbr/WIN98FDB.htm
Your Dos6.22.img contains a MS-DOS 5.0 floppy disk boot record described at http://thestarman.pcministry.com/asm/mbr/DOS50FDB.htm , your image only has some minor differences (disk label, oem system name and BPB as the web page lists a boot record for a 1200 kB floppy)
Replacing the boot record written with the -1 flag with a msdos 5.0 boot record would most likely no longer give any usable boot record for Windows 98 and above. To spoort MSDOS 6.22 and 5.0 a new boot record would be needed. I change your bug report into a feature request. Would you be willing to test this new feature?
regards Henrik