Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

boot process

Posted on 1999-10-06
9
Medium Priority
?
200 Views
Last Modified: 2010-04-15
I'v got a bootable 98 disk with a special dos program that gets executed via the autoexec.bat. When the program ends it restarts the computer. How do I modify io.sys, master boot record, or the master boot code on the floppy previous to the restart to tell the bios to boot from the hard drive instead of the floppy? I'm using Borland C++ 4.5.
0
Comment
Question by:backdraf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Author Comment

by:backdraf
ID: 2104755
Adjusted points to 200
0
 
LVL 10

Expert Comment

by:rbr
ID: 2105741
Don^t think that this possible (on a INTEL PC with a MAC there would be no problem) since the booting sequence is determinated by the BIOS. The only way I see is to alter the BIOS entries.
0
 
LVL 3

Expert Comment

by:DVB
ID: 2106192
Simply remove the floppy disk when rebooting. Your bios should boot off the hd.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:rbr
ID: 2106212
TO DVB. Sure this would be simplest method. But I don´t think that this is the answer backraf awaits.
0
 

Expert Comment

by:subhro
ID: 2107172
hi,
    in an ans. some guy gave a program to reset the
bios .
in dos ..
#include<bios.h>
main(){
    outportb(112,27);
    outportb(113,28);
  }
he claimed it resets the bios ... hope this help u...
what u can do is put the executale in the  autoexec.bat just before the program u want to run .... this will put the bios boot sequence to (c a scsi)default... which is what u want...
0
 
LVL 2

Expert Comment

by:obg
ID: 2109568
If that is what I think it is, it will not help at all. It will still boot from the floppy if there is one in A:. Besides, it might mess up some user personal BIOS adjustments.

I don't think it's possible to transfer the booting sequence from the floppy to the hd, because the BIOS has already been informed that there is an executable boot sector on the floppy.
0
 
LVL 1

Expert Comment

by:MatthiasLange
ID: 2110252
tell me your mail address. I'll send a boot sector for the FD that boots the HD.
0
 

Author Comment

by:backdraf
ID: 2110334
For example the 98 cd when booted to while give you the option of booting to the cd or the hard drive. Granted there may be something in the el torito standard that may make this possible when booting to cds, I don't know, but if I can find out exactly how Microsoft is able to let you choose your booting device after post then I can incorporate it into my scenario.
0
 
LVL 3

Accepted Solution

by:
jjmcd earned 400 total points
ID: 2152815
You don't need to modify the MBR or IO.SYS (and in fact, as some folks have pointed out,  it won't help).  All you need to do (and I say ALL guardedly here), is get into real mode (you may already be since you booted from floppy), load the MBR from the HD into memory, and jump to it.

Each computer/HD has a slightly different MBR, but in general they are all the same idea, and they need to be loaded into a specific memory location (2200 I think, but my memory is a little stale here).

If you look at the MBR, you will see the partition table followed by the actual boot code.  All it takes is to reproduce the BIOSs activity - load the MBR and execute it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question