Transfer Of Floppy Boot Sector To Hard Disk

Hello everybody,
I have a 486 machine which boots from a floppy. The floppy doesnt contain an OS, but instead contains the program that the machine is destined to run. (CNC cutting). (I don't have the source for the program).

I want to make the machine boot from a hard disk, instead of the floppy.

I have followed these steps:
1) I installed ms-dos on a hard disk and made sure that the machine can boot from the hard disk.
2) I copied all the files from the floppy to the hard disk
3) From the boot sector of the floppy (FAT12), I took only the boot code (offset 3Eh, 450bytes) and copied over the boot code of the hard disk (FAT16).

Unfortunatelly this hasn't worked. I get "no operating system found" when trying to boot from the hard disk. This is the message that is hard coded in the boot code - and it is actually written in German.
Is it necessary to disassemble the boot code, or is there something that I am missing here?
LVL 4
psychakias2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grg99Commented:
Hard disks are very different from floppies.  hard disks have partition tables.  So the boot code has to be able to root around the partition table and find a bootable partition.

So you can't just copy floppy boot sectors to a hard disk.

Also in your case, they probably made a custom boot sector to prevent any hanky-panky.

I would either stick to the floppy or contact the company and see if they have some option for you.

mzvikaCommented:
i dont think you're missing anything, except for more information as to what the boot-code is doing.
it may be calculating a checksum, or it may look for stuff on specific sectors of the disk.
it may even look for the application on the floppy regardless of the devic you're booting from...

either contact the vendor, or dive into the code.
dimitryCommented:
Just to add to comments above... Actually it is a rephrase of mzvika comment...
It is possible to "hack" boot sector code (it is not big and possibly is not "tricky" protected) to load this application from hard disk and not from a floppy, BUT
application itself may demand floppy presence, and this is not simple to change the whole application to do what you want without source code...


Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

dimitryCommented:
But in case you want to try...
In lucky case boot loader simply copies sequencial sectors from floppy to SDRAM.
It uses next interrupt service to read sector:

  mov  es, SEGMENT of the address in SDRAM
  mov  bx, OFFSET of the address in SDRAM
  mov  dx, 0000h ; Head / Floppy
  mov  cx, 0002h ; Cylinder / Sector
  mov  ax, 0201h ; Read one sector
  int  13h

You need to find all these places and change them to
  mov  es, SEGMENT of the address in SDRAM
  mov  bx, OFFSET of the address in SDRAM
  mov  dx, 0180h  ; <<<<<<<<<<<<<<<<<<<<< Read from HD + offset of the first partition start
  mov  cx, 0002h
  mov  ax, 0201h
  int  13h

Then you will need to copy floppy sectors to similar sectors to your hard disk partition. In Linux you can use 'dd' utility, or you can find similar stuff for Windows.

And good luck !

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mbizupNerdCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Split: grg99 {http:#15933145} & mzvika {http:#15933720} & dimitry {http:#15933810}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

mbizup
EE Cleanup Volunteer
psychakias2Author Commented:
I haven't had the time to test dimitry's solution.
If the question can't wait for 1-2 more weeks, I recommend a split between mzvika and dimitry.
clerihewCommented:
You seem like a person knowing some assembly, so I'll try to make this short (otherwise ask for more details)...

(1) Make the PC boot up in DOS….(on the HDD)
(2) Make a 1:1 copy of the floppy….place the image on the HDD
(3) Hook the INT 13 intercepting request made to the floppy-drive and forward them to the image…
(4) After boot in the autoexec.bat execute a file witch places the first sector of the image at 0000:7C00
(5) JMP to that address....

I know this will leave a lot of work to be done by you, but if you need any help (and your problem is still pending), I could make some conceptual code...
psychakias2Author Commented:
Thanks for your comment. I do know some assembly, but I don't have any good references and it would get me a while to start punching usable code.

I have tried booting in MS DOS 6.22 (with enough base memory) and then going to A: and starting the program. The program starts to load but after a while stops and the monitor is blank.

I am suspecting that the program tries to get some low level control of the pc, but since DOS has been loaded above it, there is some sort of confusion.

So in order to test your solution, I would have to first figure out how to make the program run under dos.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Assembly

From novice to tech pro — start learning today.