Pages

Thursday 4 October 2012

How to view bios info

There exist a myriad of ways of retrieving hardware details of a host machine in Linux (as is case with Linux).
To extract information such as bios date, bios vendor, your board vendor and the like, you can use the virtual file system sysfs. That information is stored in the /sys directory.
The precise directory is: /sys/devices/virtual/dmi/id
So typing $head /sys/devices/virtual/dmi/id/* should display all the necessary details for you. You may also want to use sudo or su for elevated privileges to view some restricted files.
   1 ~$ ls -l /sys/devices/virtual/dmi/id/
   2 total 0
   3 -r--r--r-- 1 root root 4096 Oct  4 17:24 bios_date
   4 -r--r--r-- 1 root root 4096 Oct  4 08:16 bios_vendor
   5 -r--r--r-- 1 root root 4096 Oct  4 17:24 bios_version
   6 -r--r--r-- 1 root root 4096 Oct  4 19:37 board_asset_tag
   7 -r--r--r-- 1 root root 4096 Oct  4 17:24 board_name
   8 -r-------- 1 root root 4096 Oct  4 19:37 board_serial
   9 -r--r--r-- 1 root root 4096 Oct  4 08:16 board_vendor
  10 -r--r--r-- 1 root root 4096 Oct  4 17:24 board_version
  11 -r--r--r-- 1 root root 4096 Oct  4 19:37 chassis_asset_tag
  12 -r-------- 1 root root 4096 Oct  4 19:37 chassis_serial
  13 -r--r--r-- 1 root root 4096 Oct  4 08:16 chassis_type
  14 -r--r--r-- 1 root root 4096 Oct  4 19:37 chassis_vendor
  15 -r--r--r-- 1 root root 4096 Oct  4 19:37 chassis_version
  16 -r--r--r-- 1 root root 4096 Oct  4 19:37 modalias
  17 drwxr-xr-x 2 root root    0 Oct  4 19:37 power
  18 -r--r--r-- 1 root root 4096 Oct  4 08:16 product_name
  19 -r-------- 1 root root 4096 Oct  4 19:37 product_serial
  20 -r-------- 1 root root 4096 Oct  4 08:16 product_uuid
  21 -r--r--r-- 1 root root 4096 Oct  4 08:16 product_version
  22 lrwxrwxrwx 1 root root    0 Oct  4 11:15 subsystem -> ../../../../class/dmi
  23 -r--r--r-- 1 root root 4096 Oct  4 08:16 sys_vendor
  24 -rw-r--r-- 1 root root 4096 Oct  4 11:15 uevent

dmidecode

An alternative method to retrieving info on your BIOS and even other hardware information from dmi is dmidecode. This usually requires root privileges to execute. dmidecode is actually a dmi decoder what decodes readings from the dmi table. This is an example from my box:
   1 ~$ sudo dmidecode 
   2 # dmidecode 2.11
   3 SMBIOS 2.5 present.
   4 34 structures occupying 1791 bytes.
   5 Table at 0x000FCFE0.
   6 
   7 Handle 0x0000, DMI type 0, 24 bytes
   8 BIOS Information
   9     Vendor: American Megatrends Inc.
  10     Version: 210   
  11     Release Date: 03/02/2010
  12     Address: 0xF0000
  13     Runtime Size: 64 kB
  14     ROM Size: 1024 kB
  15     Characteristics:
  16         ISA is supported
  17         PCI is supported
  18         PNP is supported
  19         BIOS is upgradeable
  20         BIOS shadowing is allowed
  21         ESCD support is available
  22         Boot from CD is supported
  23         Selectable boot is supported
  24         EDD is supported
  25         5.25"/1.2 MB floppy services are supported (int 13h)
  26         3.5"/720 kB floppy services are supported (int 13h)
  27         3.5"/2.88 MB floppy services are supported (int 13h)
  28         Print screen service is supported (int 5h)
  29         8042 keyboard services are supported (int 9h)
  30         Printer services are supported (int 17h)
  31         CGA/mono video services are supported (int 10h)
  32         ACPI is supported
  33         USB legacy is supported
  34         Smart battery is supported
  35         BIOS boot specification is supported
  36         Function key-initiated network boot is supported
  37         Targeted content distribution is supported
  38     BIOS Revision: 2.10
  39     Firmware Revision: 176.1
  40 
  41 Handle 0x0001, DMI type 1, 27 bytes
  42 System Information
  43     Manufacturer: ASUSTeK Computer Inc.       
  44     Product Name: UL30VT             
  45     Version: 1.0      
  46     Serial Number: A3N0AS515480129    
  47     UUID: 8006A65E-0B33-DF81-3D9D-485B3926D33D
  48     Wake-up Type: Power Switch
  49     SKU Number:                    
  50     Family:                    
  51 
  52 Handle 0x0002, DMI type 2, 15 bytes
  53 Base Board Information
  54     Manufacturer: ASUSTeK Computer Inc.       
  55     Product Name: UL30VT   
  56     Version: 1.0      
  57     Serial Number: BSN12345678901234567
  58     Asset Tag: ATN12345678901234567
  59     Features:
  60         Board is a hosting board
  61         Board requires at least one daughter board
  62         Board is replaceable
  63     Location In Chassis: MIDDLE             
  64     Chassis Handle: 0x0003
  65     Type: Motherboard
  66     Contained Object Handles: 0
  67 
  68 Handle 0x0003, DMI type 3, 21 bytes
  69 Chassis Information
  70     Manufacturer: ASUSTeK Computer Inc.       
  71     Type: Notebook
  72     Lock: Not Present
  73     Version: 1.0      
  74     Serial Number: CSN12345678901234567
  75     Asset Tag: ATN12345678901234567
  76     Boot-up State: Safe
  77     Power Supply State: Safe
  78     Thermal State: Other
  79     Security Status: Other
  80     OEM Information: 0x00000000
  81     Height: Unspecified
  82     Number Of Power Cords: 1
  83     Contained Elements: 0
  84     
  85     ..............so on and so forth