A method and mechanism for automatically correlating a device to its appropriate driver and family within a computer system utilizing candidate matching. A device tree indicating devices coupled to a computer system is available from an operating system. Within the device tree are device nodes which specify a particular device's name (device name) and a property which indicates compatible device names (compatible names) to the particular device. Drivers and corresponding families for devices can be located in RAM, ROM, or in another storage media (such as disk drive). Drivers can include a data field indicating a driver name indicative of a corresponding device with which they operate. For a particular device, the system constructs a candidate list of drivers by comparing (1) the device name and (2) the compatible names from the device tree against all the driver names of data fields of all known drivers. The candidate list is sorted so that matches by device name and proper version number are higher priority. Corresponding families are then determined and loaded. The system then sequentially attempts installation of the drivers from the candidate list to the particular device (based on priority order) to determine the appropriate driver (e.g., probing the device using diagnostic operations). Drivers are skipped that cause an error or that do not properly configure the device. The process can be repeated for all devices in the computer system. The process is dynamic in that it is operable on boot up and upon any system change that allows more drives to be recognized.