Querying bios settings from Linux

Paul Lussier p.lussier at comcast.net
Tue Sep 30 11:52:36 EDT 2008


Jarod Wilson <jarod at wilsonet.com> writes:

> One crude option that might work, depending on the age of the kernels
> and the drivers in said kernel:
>
> $ dmesg | grep -i ahci

The problem isn't to figure out which have SATA drives, but to figure
out if the BIOS is set correctly.  dmesg isn't reliable for this.  If
the machine boots with the kernel correctly, then the ahci module
loaded correctly.  That doesn't tell me if the BIOS is set correctly,
or guarantee it will happen correctly in the future.

For example, I have 2 systems which are identical hardware, identical
kernels, same BIOS settings, where both had SATA set to IDE.

 - farm-339 booted just fine and loaded the ahci module.

 - farm-444 hung at boot because it didn't load the ahci module and
   attempted to address the drives as IDE.

I've got systems at remote locations which need to be upgraded to a
new kernel in a lights-out scenario.  I can't afford to reboot them
and have them not come back up.  I need to know what that BIOS setting
is *before* upgrading the kernel so I can know which ones *NOT* to
upgrade until someone can get on site and handle it correctly.

Does explanation clarify things any?

Thanks, and please keep the ideas coming...
-- 
Seeya,
Paul

P.S. One idea presented was to query /dev/mem and /dev/nvram, since in
theory all BIOS settings are stored there.  I haven't checked yet, though.


More information about the gnhlug-discuss mailing list