1

In my understanding linux can list only those devices which it can understand, i.e. for which the drivers have been installed. I think lspci is the command for that.

But how can one figure out if there exists some device in the system for which the drivers are not installed and perhaps some hint about what that device is for and what driver would suffice for it.

I would like to know this info so as to be able to recompile my linux kernel to a minimum and would like to avoid a hit and trial approach.

4 Answers4

3

lspci -v will show the connected devices, even if there's no corresponding driver.

ewwhite
  • 201,205
3

lspci will do the trick as said by several others.

Some additional clarification:

Every modern bus-interface (Vesa Local Bus, PCMCIA, CardBus, PCI, PCI-X, PCI-e, Thurderbolt, IDE, ATAPI, SATA, USB, Firewire, just to name a few that come to mind) defines a set of low-level probe commands so the OS can detect which devices (if any) are present on that bus.

Such commands return a device-id to the OS. The OS then compares this id with the id's that the drivers "advertises" as id's that they feel capable of handling.
This is a necessity as otherwise the OS would have no way to determine what is present in the machine. If the OS can't tell what is there, it has no way of matching a device with the required driver.

(The above is true for any modern OS. Linux, Windows and OSX do exactly the same thing.)

Back to Linux:
The drivers for the OS to do this are part of the core-drivers for the various interface-buses that need to be present in the kernel (or as a loadable module).
Of course: Any bus-interface/device-drivers required to boot and load the root file-system need to be in the kernel at boot-time. Anything else can be a module if you want to keep the size of the kernel down, or omitted altogether if such hardware isn't in the system at all.
Typical first-time mistake is to make ALL file-sytem drivers modules. You will need at least 1 of them to be able to load the root-filesystem.

Tonny
  • 6,360
  • 1
  • 20
  • 31
2

I also like the lshw on those distributions to offer it.

Lots of good information about your CPUs, memory slots, USB slots, disks, and more.

Magellan
  • 4,471
1

If you want extended information of all hardware, you can use dmidecode command. It dumps the DMI table contents.

Magellan
  • 4,471
Minto Joseph
  • 146
  • 3