The link above details Linux command sfdisk -l /dev/sda to get/set pen drive geometry.
Worth a read because in the MSDOS boot sector NASM code is the partition table with drive geometry that has to match the output of sfdisk, I.e. Your usb drive.
With the partition table matching between coded boot sector and usb drive geometry your code will load by using simple 16-bit interrupts. This is valuable info I discovered when getting old 16bit demos to boot plasma for instance on the metal!