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

How to tell BIOS version from command line?

16 views
Skip to first unread message

Herb T

unread,
Jan 17, 2005, 5:51:20 PM1/17/05
to
Greetings,
How can I determine what version of the BIOS the linux system is
running from the shell prompt? I was looking in the /proc dir, but
could not see the answer.
Thanks,
-HT

Dances With Crows

unread,
Jan 17, 2005, 6:25:44 PM1/17/05
to
On 17 Jan 2005 14:51:20 -0800, Herb T staggered into the Black Sun and
said:

> How can I determine what version of the BIOS the linux system is
> running from the shell prompt? I was looking in the /proc dir, but
> could not see the answer.

Install dmidecode, use it. Or,

dd if=/dev/mem bs=32768 skip=31 count=1 | strings -n 10 | grep -i bios

...should tell you the version of the BIOS and its manufacturer. HTH,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume

Vilmos Soti

unread,
Jan 17, 2005, 6:28:53 PM1/17/05
to
"Herb T" <oth...@hotmail.com> writes:

> Greetings,

Greetings.

> How can I determine what version of the BIOS the linux system is
> running from the shell prompt? I was looking in the /proc dir, but
> could not see the answer.

dmidecode.

Vilmos

Michael Heiming

unread,
Jan 17, 2005, 6:30:32 PM1/17/05
to
In comp.os.linux.misc Herb T <oth...@hotmail.com>:

Try:

# dmidecode | grep Rev
Version: ASUS A7N8X-X ACPI BIOS Rev 1009

You might need to install 'dmidecode'.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvp...@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 303: fractal radiation jamming the backbone

Herb T

unread,
Jan 18, 2005, 10:52:48 PM1/18/05
to
Dances With Crows wrote:
> On 17 Jan 2005 14:51:20 -0800, Herb T staggered into the Black Sun
and
> said:
> > How can I determine what version of the BIOS the linux system is
> > running from the shell prompt? I was looking in the /proc dir, but
> > could not see the answer.
>
> Install dmidecode, use it. Or,
>
> dd if=/dev/mem bs=32768 skip=31 count=1 | strings -n 10 | grep -i
bios
>
> ...should tell you the version of the BIOS and its manufacturer.
HTH,

DWC thank you!

This is some amazing linux prowess. Could you be so kind as to tell us
how this works?

I can read man dd, but how did you know that this command does the
trick?!

-HT

Dances With Crows

unread,
Jan 19, 2005, 10:12:52 AM1/19/05
to
On 18 Jan 2005 19:52:48 -0800, Herb T staggered into the Black Sun and said:
> Dances With Crows wrote:
>> On 17 Jan 2005 14:51:20 -0800, Herb T staggered into the Black Sun
>> > How can I determine what version of the BIOS the linux system is
>> > running from the shell prompt? I was looking in the /proc dir, but
>> > could not see the answer.
>> Install dmidecode, use it. Or,
>> dd if=/dev/mem bs=32k skip=31 count=1 | strings -n 10 | grep -i bios

> This is some amazing linux prowess. Could you be so kind as to tell us
> how this works?

/dev/mem is all of RAM on a Linux system. On an x86, the BIOS is
traditionally accessible in the last 64K of the first megabyte of
memory. So, the dd command translates to this:

"Start at byte 0 of RAM. Skip 992K. Read 32K and dump it to stdout."

...then we feed the 32K we read to "strings -n 10", which looks for
ASCII character sequences at least 10 bytes long and dumps them to
stdout. We pass those sequences to grep, which then prints all lines
that match the case-insensitive string "bios".

The dd command may have worked for your machine and my desktop, but it
fails on my laptop. No worries, just read more with dd and it works
there too:

dd if=/dev/mem bs=64k skip=15 count=1 | strings ...

> I can read man dd, but how did you know that this command does the
> trick?!

Someone posted a similar command about 1.5 years ago for querying the
video adapter's BIOS. I modified the skip= parameter on dd so it'd look
for the system BIOS instead of the video BIOS, and I was pleased to
learn that it worked. The nice thing about little command-line
fragments like the one above is that they're eminently hackable. The
thing to do is to take a command that works, fiddle with its parameters,
try it again, write down or remember what it did, and repeat. You can
learn a lot that way! HTH,

0 new messages