Querying bios settings from Linux

Jarod Wilson jarod at wilsonet.com
Tue Sep 30 10:53:45 EDT 2008


On Tue, 2008-09-30 at 10:23 -0400, Paul Lussier wrote:
> Hi all,
> 
> Does anyone know a way to query BIOS settings from the command line in
> Linux?  I need to find out if the SATA settings are set to IDE or AHCI
> on 100+ systems.  It will really suck if I have to connect a console
> to each one and reboot into the BIOS...
> 
> I don't care if I can't change it, actually, that might be scary :)

One crude option that might work, depending on the age of the kernels
and the drivers in said kernel:

$ dmesg | grep -i ahci

On one box w/sata disks in ahci mode, very recent kernel, I get:

ahci 0000:00:1f.2: version 3.0
ahci 0000:00:1f.2: PCI INT C -> GSI 20 (level, low) -> IRQ 20
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 6 ports 3 Gbps 0x1f impl SATA
mode
ahci 0000:00:1f.2: flags: 64bit ncq pm led slum part 
ahci 0000:00:1f.2: setting latency timer to 64
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
scsi4 : ahci
scsi5 : ahci

On an old box w/no sata disks, also a recent kernel, I get nothing. Not
sure exactly what you'd see on a box w/disks in legacy mode... I don't
think I have any boxes readily available that are configured that way.
But I'd certainly expect to NOT see any ahci strings in dmesg... Other
than that, not a clue how to read the bios settings in a generic way,
its likely somewhat specific to each bios.




-- 
Jarod Wilson
jarod at wilsonet.com



More information about the gnhlug-discuss mailing list