[SeaBIOS] Booting from USB thumbdrives, older drives boot, newer drives don't.

Dave Frodin dave at camp.se-eng.com
Thu Mar 1 00:38:21 CET 2012


I'm a new subscriber to seabios.org so feel free to straighten me out if needed.

I've been debugging an problem we've been seeing with not being able to boot (Ubuntu specifically) off
of a variety of "newer" USB thumb drives. I've been specifically looking at an older/newer pair of
Sandisk Cruzer 4GB drives. I've been adding dprintf's to narrow down the problem to the blockcmd.c file.
The function scsi_init_drive() queries the USB device to determine stuff like vendor/device/size/etc.
Near the end of the function is a call to cdb_mode_sense_geom(&dop, &geomdata) to retrieve the info
related to cyl/head type stuff. On the older/working thumbdrive it returns zeroes for all of the values
that get used by the code. The newer/failing drive generates a "stall" on the USB bus, which it never
recovers from. The cdb_mode_sense_geom() function is sending a SCSI CDB Mode Sense (CMD=0x5A) to the device.

As a hack of a test, I removed the call to cdb_mode_sense_geom() and filled the buffer it should have returned
with zeroes and the failing thumbdrive now boots.

I have some searching I need to do to find out...
1) Is there a SCSI command to determine what protocols are supported?
2) Is there another SCSI command that might return similar required data?

Has anyone out there experienced similar booting difficulties?
Or does anyone have any recommendations on what approach I should take?

thanks,
Dave



More information about the SeaBIOS mailing list