Patent ID: 8219858

Claim:
A method for testing hard disks under an extensible firmware interface (EFI), comprising: (a) using a device tree of the hard disks to read all recognizable device paths by the EFI; (b) obtaining handles corresponding to the recognizable device paths; (c) identifying a parent controller handle of each of the recognizable device paths in the device tree; (d) detecting if there are parent controller handles the same as the obtained handles, implementing step (e) if there are parent controller handles the same as the obtained handles, or implementing step (f) if no parent controller handle is the same as the obtained handles; (e) deleting parent controller handles the same as the obtained handles, and implementing step (f); (f) determining that a number of the hard disks is equal to a number of the device paths corresponding to the remained parent controller handles; and (g) obtaining node information of each of the device paths corresponding to the remained parent controller handles, and determining that the obtained node information is hard disk information of each of the hard disks.