Is it possible to read BIOS setting?

Mark admin at asarian-host.net
Thu Jul 24 15:04:49 PDT 2003


----- Original Message -----
From: "Pranav A. Desai" <pdesai1 at cs.uh.edu>
To: <freebsd-questions at freebsd.org>
Sent: Thursday, July 24, 2003 11:27 PM
Subject: Is it possible to read BIOS setting?

> Hi!
>
> This is what I am trying to do ...
> If the hard disk fails (or becomes un-bootable) I would change the BIOS
> setting to boot from second disk or maybe from cdrom, repair or reimage
> the hard disk and reboot the box.
>
> I would like to automate this process, so that I dont have to be
> physically present at the box. In fact, a script or program can activate
> this on an event like hard disk error etc. kind of self-healing. But the
> main problem with this is the BIOS settings need to changed.
>
> Does this sound reasonable?

No, actually. :) Though your kern.securelevel (2+) may even prevent writing
to CMOS ports directly (not really sure), I am sure, though, that doing so
is a bad idea. Even back in the days of yore, when we had XT's and all, it
could be done, but not devoid of risk. Such as corrupting the CMOS checksum,
causing the BIOS to weird out on boot-up. And on an XT, at least you more or
less knew which port did what. But nowadays that is quite uncertain too;
"proprietary" they call it now. :) And even if it could be done, you would
have to know, exactly, how your particular BIOS (version) calculates its
checksums, in order to change data. Tricky business.

Besides, if your disk fails to boot, what would you then, at that point,
expect the BIOS to do? Automatically reboot and try from the second disk?
And you would start the script to work this, exactly how? :)

Not to mention that, these days, we have a better way of dealing with the
untimely demise of hard disks; RAID is your friend. ;) Then, if one of your
disk fails, your data remains intact, and you let an SNMP agent report the
mishap to you. Then you haste home to check on your baby. :)

- Mark



More information about the freebsd-questions mailing list