Link to home
Start Free TrialLog in
Avatar of psychakias2
psychakias2

asked on

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?
Avatar of grg99
grg99

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.

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.
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...


ASKER CERTIFIED SOLUTION
Avatar of dimitry
dimitry

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mbizup
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
Avatar of psychakias2

ASKER

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.
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...
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.