当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 初学者,如何知道自己的机器硬件对Linux的支持情况?
帖子发表于 : 2016-07-15 13:27 
头像

注册: 2011-10-27 11:27
帖子: 15
地址: http://www.linuxcoming.com
系统: Gentoo
送出感谢: 1
接收感谢: 1
如果我们想要安装或者升级Linux系统,此时我们就需要我们收集硬件信息了,比如内存,BIOS,CPU等等.在 dmidecode命令的帮助下,我们无需打开机箱,就可以知道所有的硬件细节.dmidecode命令适用于常见的Linux系统,比如RHEL,CentOS,Fedora,Ubuntu等等.

dmidecode通过读取DMI表来获取硬件数据,并展示有用的硬件信息,比如硬件细节,序列号,BIOS版本,处理器等等.要使用dmidecode,你可能需要root用户权限.对于初学者, 我们可以使用一个Live CD来启动一个Linux环境通过dmidecode命令查看硬件信息.

1.dmidecode基本输出
下面是dmidecode命令的一个输出示例:
代码:
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.
45 structures occupying 1642 bytes.
Table at 0x000E0010.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
        Vendor: Phoenix Technologies LTD
        Version: 6.00
        Release Date: 12/06/2006
        Address: 0xE78A0
        Runtime Size: 100192 bytes
        ROM Size: 64 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PC Card (PCMCIA) is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
               USB legacy is supported
                Smart battery is supported
                BIOS boot specification is supported


2.如何获取DMI类型
dmidecode 可以通过 "-t" 或者 "-type"选项指定硬件编号,这将给我显示出指定的硬件信息. 比如"dmidecode -t 6"将给我们显示内存设备信息.
代码:
[root@localhost ~]# dmidecode -t 6
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #0
        Bank Connections: 0 1
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: 1024 MB (Single-bank Connection)
        Enabled Size: 1024 MB (Single-bank Connection)
        Error Status: OK

Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #1
        Bank Connections: 2 3
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000B, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #2
        Bank Connections: 4 5
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000C, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #3
        Bank Connections: 6 7
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK


下面是设备类型编号列表:
代码:
      Type   Information
      ----------------------------------------
          0      BIOS
          1      System
          2      Base Board
          3      Chassis
          4      Processor
          5      Memory Controller
          6      Memory Module
          7      Cache
          8      Port Connector
          9      System Slots
         10      On Board Devices
         11      OEM Strings
         12      System Configuration Options
         13      BIOS Language
         14      Group Associations
         15      System Event Log
         16      Physical Memory Array
         17      Memory Device
         18      32-bit Memory Error
         19      Memory Array Mapped Address
         20      Memory Device Mapped Address
         21      Built-in Pointing Device
         22      Portable Battery
         23      System Reset
         24      Hardware Security
         25      System Power Controls
         26      Voltage Probe
         27      Cooling Device
         28      Temperature Probe
         29      Electrical Current Probe
         30      Out-of-band Remote Access
         31      Boot Integrity Services
         32      System Boot
         33      64-bit Memory Error
         34      Management Device
         35      Management Device Component
         36      Management Device Threshold Data
         37      Memory Channel
         38      IPMI Device
         39      Power Supply


相反的使用,我们也可以使用"dmidecode -t"选项指定硬件类型的关键字来获取设备详情,下面是硬件类型的关键字:

代码:
   Keyword     Types
       ------------------------------
       bios        0, 13
       system      1, 12, 15, 23, 32
       baseboard   2, 10
       chassis     3
       processor   4
       memory      5, 6, 16, 17
       cache       7
       connector   8
       slot        9


比如,我们要获取系统的缓存信息,你可以执行下面的命令来代替 "dmidecode -t 7"命令.
代码:
[root@tecmint ~]# dmidecode -t cache
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x000D, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 16 kB
        Maximum Size: 16 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: Asynchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x000E, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Socketed, Level 2
        Operational Mode: Write Back
        Location: External
        Installed Size: 0 kB
        Maximum Size: 512 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: None
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown


dmidecode命令的更多信息可以使用"man dmidecoide"命令.

硬件信息收集完成之后, 我们就可以到对应硬件厂商的官网查找对应型号的Linux驱动,有些驱动可能已经集成在内核中了,所有除了查看官网的Linux, 你也需要到kernel.org去查看下内核对你硬件的支持情况


_________________
Gentoo Linux忠实粉丝, 目前已经稳定使用超过三年.喜欢分享,欢迎到我的个人网站联系我 http://www.linuxcoming.com


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 初学者,如何知道自己的机器硬件对Linux的支持情况?
帖子发表于 : 2016-07-19 19:28 

注册: 2013-05-26 6:58
帖子: 2158
系统: Debian 9
送出感谢: 894
接收感谢: 30
bjlaoshu 写道:
如果我们想要安装或者升级Linux系统,此时我们就需要我们收集硬件信息了,比如内存,BIOS,CPU等等.在 dmidecode命令的帮助下,我们无需打开机箱,就可以知道所有的硬件细节.dmidecode命令适用于常见的Linux系统,比如RHEL,CentOS,Fedora,Ubuntu等等.

dmidecode通过读取DMI表来获取硬件数据,并展示有用的硬件信息,比如硬件细节,序列号,BIOS版本,处理器等等.要使用dmidecode,你可能需要root用户权限.对于初学者, 我们可以使用一个Live CD来启动一个Linux环境通过dmidecode命令查看硬件信息.

1.dmidecode基本输出
下面是dmidecode命令的一个输出示例:
代码:
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.
45 structures occupying 1642 bytes.
Table at 0x000E0010.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
        Vendor: Phoenix Technologies LTD
        Version: 6.00
        Release Date: 12/06/2006
        Address: 0xE78A0
        Runtime Size: 100192 bytes
        ROM Size: 64 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PC Card (PCMCIA) is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
               USB legacy is supported
                Smart battery is supported
                BIOS boot specification is supported


2.如何获取DMI类型
dmidecode 可以通过 "-t" 或者 "-type"选项指定硬件编号,这将给我显示出指定的硬件信息. 比如"dmidecode -t 6"将给我们显示内存设备信息.
代码:
[root@localhost ~]# dmidecode -t 6
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #0
        Bank Connections: 0 1
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: 1024 MB (Single-bank Connection)
        Enabled Size: 1024 MB (Single-bank Connection)
        Error Status: OK

Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #1
        Bank Connections: 2 3
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000B, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #2
        Bank Connections: 4 5
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000C, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #3
        Bank Connections: 6 7
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK


下面是设备类型编号列表:
代码:
      Type   Information
      ----------------------------------------
          0      BIOS
          1      System
          2      Base Board
          3      Chassis
          4      Processor
          5      Memory Controller
          6      Memory Module
          7      Cache
          8      Port Connector
          9      System Slots
         10      On Board Devices
         11      OEM Strings
         12      System Configuration Options
         13      BIOS Language
         14      Group Associations
         15      System Event Log
         16      Physical Memory Array
         17      Memory Device
         18      32-bit Memory Error
         19      Memory Array Mapped Address
         20      Memory Device Mapped Address
         21      Built-in Pointing Device
         22      Portable Battery
         23      System Reset
         24      Hardware Security
         25      System Power Controls
         26      Voltage Probe
         27      Cooling Device
         28      Temperature Probe
         29      Electrical Current Probe
         30      Out-of-band Remote Access
         31      Boot Integrity Services
         32      System Boot
         33      64-bit Memory Error
         34      Management Device
         35      Management Device Component
         36      Management Device Threshold Data
         37      Memory Channel
         38      IPMI Device
         39      Power Supply


相反的使用,我们也可以使用"dmidecode -t"选项指定硬件类型的关键字来获取设备详情,下面是硬件类型的关键字:

代码:
   Keyword     Types
       ------------------------------
       bios        0, 13
       system      1, 12, 15, 23, 32
       baseboard   2, 10
       chassis     3
       processor   4
       memory      5, 6, 16, 17
       cache       7
       connector   8
       slot        9


比如,我们要获取系统的缓存信息,你可以执行下面的命令来代替 "dmidecode -t 7"命令.
代码:
[root@tecmint ~]# dmidecode -t cache
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x000D, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 16 kB
        Maximum Size: 16 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: Asynchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x000E, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Socketed, Level 2
        Operational Mode: Write Back
        Location: External
        Installed Size: 0 kB
        Maximum Size: 512 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: None
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown


dmidecode命令的更多信息可以使用"man dmidecoide"命令.

硬件信息收集完成之后, 我们就可以到对应硬件厂商的官网查找对应型号的Linux驱动,有些驱动可能已经集成在内核中了,所有除了查看官网的Linux, 你也需要到kernel.org去查看下内核对你硬件的支持情况

引用:
你也需要到kernel.org去查看下内核对你硬件的支持情况

在kernel.org哪里看?


_________________
Linux桌面优化综合贴[2017.09.18](欢迎各位补充或指正误区)
[2016.03.10]会C语言但看不懂英文文档的点这里,一个用C语言编写的简陋学习工具
单硬盘通过iso文件实机安装Debian的方法
重启或操作fcitx时失去响应的一个解决方法,不妨试试看


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 初学者,如何知道自己的机器硬件对Linux的支持情况?
帖子发表于 : 2016-07-20 9:56 
头像

注册: 2011-10-27 11:27
帖子: 15
地址: http://www.linuxcoming.com
系统: Gentoo
送出感谢: 1
接收感谢: 1
科学之子 写道:
bjlaoshu 写道:
如果我们想要安装或者升级Linux系统,此时我们就需要我们收集硬件信息了,比如内存,BIOS,CPU等等.在 dmidecode命令的帮助下,我们无需打开机箱,就可以知道所有的硬件细节.dmidecode命令适用于常见的Linux系统,比如RHEL,CentOS,Fedora,Ubuntu等等.

dmidecode通过读取DMI表来获取硬件数据,并展示有用的硬件信息,比如硬件细节,序列号,BIOS版本,处理器等等.要使用dmidecode,你可能需要root用户权限.对于初学者, 我们可以使用一个Live CD来启动一个Linux环境通过dmidecode命令查看硬件信息.

1.dmidecode基本输出
下面是dmidecode命令的一个输出示例:
代码:
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.
45 structures occupying 1642 bytes.
Table at 0x000E0010.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
        Vendor: Phoenix Technologies LTD
        Version: 6.00
        Release Date: 12/06/2006
        Address: 0xE78A0
        Runtime Size: 100192 bytes
        ROM Size: 64 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PC Card (PCMCIA) is supported
                PNP is supported
                APM is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
               USB legacy is supported
                Smart battery is supported
                BIOS boot specification is supported


2.如何获取DMI类型
dmidecode 可以通过 "-t" 或者 "-type"选项指定硬件编号,这将给我显示出指定的硬件信息. 比如"dmidecode -t 6"将给我们显示内存设备信息.
代码:
[root@localhost ~]# dmidecode -t 6
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #0
        Bank Connections: 0 1
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: 1024 MB (Single-bank Connection)
        Enabled Size: 1024 MB (Single-bank Connection)
        Error Status: OK

Handle 0x000A, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #1
        Bank Connections: 2 3
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000B, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #2
        Bank Connections: 4 5
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK

Handle 0x000C, DMI type 6, 12 bytes
Memory Module Information
        Socket Designation: RAM socket #3
        Bank Connections: 6 7
        Current Speed: Unknown
        Type: EDO DIMM
        Installed Size: Not Installed
        Enabled Size: Not Installed
        Error Status: OK


下面是设备类型编号列表:
代码:
      Type   Information
      ----------------------------------------
          0      BIOS
          1      System
          2      Base Board
          3      Chassis
          4      Processor
          5      Memory Controller
          6      Memory Module
          7      Cache
          8      Port Connector
          9      System Slots
         10      On Board Devices
         11      OEM Strings
         12      System Configuration Options
         13      BIOS Language
         14      Group Associations
         15      System Event Log
         16      Physical Memory Array
         17      Memory Device
         18      32-bit Memory Error
         19      Memory Array Mapped Address
         20      Memory Device Mapped Address
         21      Built-in Pointing Device
         22      Portable Battery
         23      System Reset
         24      Hardware Security
         25      System Power Controls
         26      Voltage Probe
         27      Cooling Device
         28      Temperature Probe
         29      Electrical Current Probe
         30      Out-of-band Remote Access
         31      Boot Integrity Services
         32      System Boot
         33      64-bit Memory Error
         34      Management Device
         35      Management Device Component
         36      Management Device Threshold Data
         37      Memory Channel
         38      IPMI Device
         39      Power Supply


相反的使用,我们也可以使用"dmidecode -t"选项指定硬件类型的关键字来获取设备详情,下面是硬件类型的关键字:

代码:
   Keyword     Types
       ------------------------------
       bios        0, 13
       system      1, 12, 15, 23, 32
       baseboard   2, 10
       chassis     3
       processor   4
       memory      5, 6, 16, 17
       cache       7
       connector   8
       slot        9


比如,我们要获取系统的缓存信息,你可以执行下面的命令来代替 "dmidecode -t 7"命令.
代码:
[root@tecmint ~]# dmidecode -t cache
# dmidecode 2.11
SMBIOS version fixup (2.31 -> 2.3).
SMBIOS 2.3 present.

Handle 0x000D, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 16 kB
        Maximum Size: 16 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: Asynchronous
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown

Handle 0x000E, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Socketed, Level 2
        Operational Mode: Write Back
        Location: External
        Installed Size: 0 kB
        Maximum Size: 512 kB
        Supported SRAM Types:
                Burst
                Pipeline Burst
                Asynchronous
        Installed SRAM Type: None
        Speed: Unknown
        Error Correction Type: Unknown
        System Type: Unknown
        Associativity: Unknown


dmidecode命令的更多信息可以使用"man dmidecoide"命令.

硬件信息收集完成之后, 我们就可以到对应硬件厂商的官网查找对应型号的Linux驱动,有些驱动可能已经集成在内核中了,所有除了查看官网的Linux, 你也需要到kernel.org去查看下内核对你硬件的支持情况

引用:
你也需要到kernel.org去查看下内核对你硬件的支持情况

在kernel.org哪里看?


从 kernel.org 上下载对应版本内核源码,源码中包含下面几个路径
代码:
Documentation/devicetree
drivers

里面可以查看到当前内核支持的硬件驱动

简单的话, 直接在内核源码根目录执行 make menuconfig 命令,直接进入内核配置的命令行下查看是否有支持你的硬件驱动


_________________
Gentoo Linux忠实粉丝, 目前已经稳定使用超过三年.喜欢分享,欢迎到我的个人网站联系我 http://www.linuxcoming.com



_________________
评价: 3.7% 科学之子
 
页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译