Well, it is not question about USB but I think you faced this problem too.
I want to improve the fileselector in my program. The point is drive selecting dialog. Now it displays all DOS drives but I want to display the non DOS partitions too. (Like hda1, hda2, etc...). But I don't want to display this way the partitions with assigned DOS letter.
Firstly I wanted to read the serial number in all DOS drives via INT21h/AX=6900h and compare it with serial numbers in volume boot records of all found partitions.
Partitions without counterparts would be displayed as hda1...
But I overthought this approach - now I think it is not very reliable.
I think you had to face to this problem too. how to do it better?
(Note that I need to be working with logical partitions and with various external drivers like NTFSDOS or EXT2DOS and so on)