Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change BIOS Boot Sequence programmatically.

810 views
Skip to first unread message

san

unread,
Jul 27, 2006, 3:11:56 PM7/27/06
to
Can anybody suggest me how to programmatically change BIOS boot
sequence using Assembly language or C programming language. I got some
information like we can access CMOS data by send address to port 70h
and receiving data through port 71h. But i dont boot sequence address
in CMOS memory map.

Ted Davis

unread,
Jul 27, 2006, 4:13:47 PM7/27/06
to

That makes no sense at all - the BIOS boot sequence is pretty much
defined by hardware requirements and dependencies. What are you
trying to do?

--
T.E.D. (tda...@gearbox.maem.umr.edu)
Remove "gearbox.maem." from address - that one is dead

san

unread,
Jul 27, 2006, 5:00:54 PM7/27/06
to

I want to inform next time boot from network. Once the system shutdown
and booted in network boot i will again inform to boot from hard disk
depending on the some condition.
basically i need to switch between network and hard disk boots.

DOS Guy

unread,
Jul 27, 2006, 5:24:55 PM7/27/06
to


On 2006-07-27 nows...@rediffmail.com said:


As is often the case in such matters, the answer is: "It depends."

Some motherboard/BIOS/CMOS combinations don't support changing the
boot sequence at all.

Of those that do, the function is not standardized; its implemen-
tation varies widely from machine to machine.

The best you can hope for is to get the manufacturer's specs for a
specific machine, and write your program for that particular computer
..realizing that the same code probably won't work on a different
computer.

If you need to change the boot sequence, it's usually better to go
into the computer's "set-up" mode and make the changes manually,
rather than try to do them programmatically.

Good luck.

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

William J. Leary Jr.

unread,
Jul 27, 2006, 6:51:22 PM7/27/06
to
"san" <nows...@rediffmail.com> wrote in message
news:1154027516.2...@75g2000cwc.googlegroups.com...

Here's a couple of examples of CMOS memory maps:

http://www.bioscentral.com/misc/cmosmap.htm
http://ivs.cs.uni-magdeburg.de/~zbrog/asm/cmos.html

Note, for example. in the second reference that location 1DH shows six
different definitions, depending on what machine it resides. Only one of those
six influence which disk boots first.

However, having the map is probably not going to help you much. Both for the
above reason and because on most machines which can have the boot order set,
the information is stored along with the ESCD in the BIOS Flash part. It not
clear to me if it's part of the ESCD, or it's just stored in the same block of
Flash. You'd need flash read/write code and, again, to know the map used for
setting boot order in that block.

I see from your later message that you want to force a network boot. You may
find these interesting:

http://www.pcguide.com/ref/mbsys/bios/boot.htm
http://www.pcguide.com/ref/mbsys/bios/set/adv_Boot.htm

In most of the system I've seen which did network boot, the network card had a
BIOS ROM of it's own which was attached to the boot sequence during BIOS
initialization. It would become the first bootable device, but with boot
turned off by default. If you wanted to perform a network boot, you had to
enter the network cards BIOS setup and to turn on, and often configure, it's
boot features. On systems with integrated network controllers, this setup is
sometimes integrated directly into the standard BIOS setup screens.

- Bill


san

unread,
Jul 28, 2006, 3:17:50 AM7/28/06
to
Thank you for the response. but I have checked last week the address
1DH taking Phoenix CMOS memory in www.bioscentral.com. But it is
showing '00' in my system. I had dumped CMOS data to a file and
observed. But some commercial software are doing this.Actually there is
one more memory address 2DH and its Data 5th bit used for boot order. I
checked that one also but is of no use.

William J. Leary Jr.

unread,
Jul 28, 2006, 7:33:15 AM7/28/06
to
"san" <nows...@rediffmail.com> wrote in message
news:1154071070.1...@75g2000cwc.googlegroups.com...

> William J. Leary Jr. wrote:
> > ((..omitted..))

>
> Thank you for the response. but I have checked last week the address
> 1DH taking Phoenix CMOS memory in www.bioscentral.com. But it is
> showing '00' in my system. I had dumped CMOS data to a file and
> observed. But some commercial software are doing this.Actually there is
> one more memory address 2DH and its Data 5th bit used for boot order. I
> checked that one also but is of no use.

What I was actually trying to point out is that what you want to do is probably
machine dependent. If you come up with an answer for one machine, or group of
machines, it probably won't be generic.

The several cases I've seen where something like this has been done in a more
or less generic way has been via a boot selector or multi-boot loader, with one
of the selections being set to trigger the network boot. That is, the system
actually DOES boot the disk every time, but what it boots is not the operating
system, but a selector program which then checks to see what you specified as
the boot source before you shut down the last time. If it's the disk, it then
goes on to perform a normal disk boot. If it's the network, it triggers the
boot code in the network card, or it runs a boot loader of it's own to do what
looks like a disk boot, but over the network instead. Or some variation of
this theme. We've used setups like this in manufacturing environments for
years. Actually, we usually use an even simpler one, and just set the order to
A: then Network then C:. If we want to boot the hard drive, we just disconnect
the network.

We have done what you say specifically, but it was very machine specific. I
worked out where the network card stored it's "Perform Network Boot" flag and
wrote a small program to turn it on or off. We then set the boot order to A:,
Network, C:. You'd then run the program to turn the flag on or off depending
on how you wanted to boot the next time. But this was entirely specific to
this network adapter.

- Bill


san

unread,
Jul 28, 2006, 9:10:08 AM7/28/06
to
Thank you very much. I think this solution is good, eventhough this is
machine dependant. Tnanks a lot bill.

Timothy Baldwin

unread,
Jul 28, 2006, 3:52:09 PM7/28/06
to
In message <1154027516.2...@75g2000cwc.googlegroups.com>, san
<nows...@rediffmail.com> wrote:

Check out the BIOS Boot Specification, which can be found at:

http://www.phoenix.com/en/Customer+Services/White+Papers-Specs/pc+industry+specifications.htm


--
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
OpenPGP key fingerprint: D0A6 F403 9745 CED4 6B3B 94CC 8D74 8FC9 9F7F CFE4
No to software patents! Victory to the iraqi resistance!

Sjouke Burry

unread,
Jul 28, 2006, 7:32:46 PM7/28/06
to
Try and find a cmos saver program.
then save each bios configuration you want to
a file.
Restoring the appropriate file to bios, will
boot to the correct device.
Google for cmos14.zip,it will lead you to simtel

William J. Leary Jr.

unread,
Jul 28, 2006, 8:46:31 PM7/28/06
to
"Sjouke Burry" <burrynu...@ppllaanneett.nnlll> wrote in message
news:44ca9e9e$0$2025$ba62...@text.nova.planet.nl...

> san wrote:
> > Thank you for the response. but I have checked last week the address
> > 1DH taking Phoenix CMOS memory in www.bioscentral.com. But it is
> > showing '00' in my system. I had dumped CMOS data to a file and
> > observed. But some commercial software are doing this.Actually there is
> > one more memory address 2DH and its Data 5th bit used for boot order. I
> > checked that one also but is of no use.
> >
> Try and find a cmos saver program.
> then save each bios configuration you want to
> a file.
> Restoring the appropriate file to bios, will
> boot to the correct device.
> Google for cmos14.zip,it will lead you to simtel

Assuming that the information which directs the boot is in CMOS, this will
work. We've used this on our manufacturing floor for years to solve some
issues (but not to change boot source). It has a couple of draw backs, the
biggest one being, if you DO change anything which is stored in CMOS, and
neglect to update the file saved/restored by the CMOS utility, the next time
you run the restore, you'll undo whatever those changes were.

- Bill


san

unread,
Jul 29, 2006, 3:48:42 AM7/29/06
to

I tried this but not working. My Machine is Acer Aspire 1640 model
laptop with Phoenix BIOS.

William J. Leary Jr.

unread,
Jul 29, 2006, 7:38:44 AM7/29/06
to
"san" <nows...@rediffmail.com> wrote in message
news:1154159322.8...@p79g2000cwp.googlegroups.com...

> Sjouke Burry wrote:
> > Try and find a cmos saver program.
> > then save each bios configuration you want
> > to a file.
> > Restoring the appropriate file to bios, will
> > boot to the correct device.
> > Google for cmos14.zip,it will lead you to simtel
>
> I tried this but not working.

As I noted over in the assembler group, the selection isn't stored in CMOS on
this machine. Or, at least, not in the legacy 64 bytes or the standard 128
bytes. However, most chipsets have provided 256 bytes for quite some time. I
note that cmos14 only deals with the standard 128 bytes. What you want *may*
be in the other 128, or (more likely) it's not in CMOS at all, but is either in
the BIOS Flash or (less likely, since it's a laptop) on the network card
itself.

> My Machine is Acer Aspire 1640 model
> laptop with Phoenix BIOS.

Unfortunately, even knowing the machine, unless I had one myself, probably
won't tell me anything about where the option is stored.

I have a CMOS save/restore utility somewhere around here I wrote for a customer
years ago. It *does* do the extended CMOS (the extra 128 bytes) along with the
standard CMOS. If you'd like, I can try to dig up a copy, send it along, and
you could try that. I'd be a bit surprised if it works, but you're welcome to
give it a go.

- Bill


san

unread,
Jul 29, 2006, 10:09:08 AM7/29/06
to

William J. Leary Jr. wrote:
Sure. i will try that. can you please send me that copy to
nows...@rediffmail.com

William J. Leary Jr.

unread,
Jul 29, 2006, 4:20:13 PM7/29/06
to
"san" <nows...@rediffmail.com> wrote in message
news:1154182148....@m79g2000cwm.googlegroups.com...
> Sure. i will try that. can you please send me that copy to
> nows...@rediffmail.com

OK. I'll look around on my archive CDs and see if I can find it.

- Bill


Robert Riebisch

unread,
Jul 31, 2006, 9:05:47 AM7/31/06
to
san schrieb:

> I tried this but not working. My Machine is Acer Aspire 1640 model
> laptop with Phoenix BIOS.

Acer uses a proprietary Int15h interface for those things.

Please try the following:
set AX = 9610h
set BL = 30h
set BH = 00h (A, C, CD-ROM, LAN)
01h (C, CD-ROM, LAN, A)
02h (CD-ROM, LAN, A, C)
03h (LAN, A, C, CD-ROM)
call/execute interrupt 15h

CF should be clear after that call. If carry is set, then there was an
error.

--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup ONLY!

William J. Leary Jr.

unread,
Jul 31, 2006, 7:08:50 PM7/31/06
to
"Robert Riebisch" <Robert....@arcor.de> wrote in message
news:44ce0026$0$24905$9b4e...@newsread4.arcor-online.net...

> san schrieb:
> > I tried this but not working. My Machine is Acer Aspire 1640 model
> > laptop with Phoenix BIOS.
>
> Acer uses a proprietary Int15h interface for those things.
>
> Please try the following:
> set AX = 9610h
> set BL = 30h
> set BH = 00h (A, C, CD-ROM, LAN)
> 01h (C, CD-ROM, LAN, A)
> 02h (CD-ROM, LAN, A, C)
> 03h (LAN, A, C, CD-ROM)
> call/execute interrupt 15h
>
> CF should be clear after that call. If carry is set, then there was an
> error.

Excellent. Just the thing.

San:

You may also find this useful:

http://www.ctyme.com/rbrown.htm

though it doesn't mention the Acer specifics Robert has given above.

- Bill


0 new messages