On Wed, 15 Jun 2005, Simon Rowe wrote:

> I've re-run the test without booting off the pendrive to capture all the 
> debug. I've also commented what was done at each point.
> 
> > Since you're okay now maybe you don't really care.  A safer workaround
> > for this would be to partition the pendrive; that way you wouldn't have to
> > worry about the kernel reading an invalid partition table.  But it's up to
> > you.
> 
> I don't think I can. The only way I got this boot from pendrive to work was 
> by 
> putting syslinux in sda and setting the BIOS to boot from USB-ZIP.

I'm sure it's _possible_ to get it to work with partitioning (for example, 
by using lilo or grub) but it might not be worth the effort.


Your log showed everything working correctly up until you tried to mount
/dev/sda1:

> [Try to mount non-existant partition sda1]
...
> usb-storage: Command READ_10 (10 bytes)
> usb-storage: 28 00 a4 74 fd 29 00 00 01 00 00 00

As expected, the logical block address in this command (0xa474fd29) is 
garbage, way beyond the capacity of the pendrive.  Naturally enough the 
command fails:

> usb-storage: -- transport indicates command failure
> usb-storage: Issuing auto-REQUEST_SENSE
> usb-storage: -- Result from auto-sense is 0
> usb-storage: -- code: 0x70, key: 0x5, ASC: 0x24, ASCQ: 0x0
> usb-storage: Illegal Request: invalid field in CDB

As I guessed, this is the wrong error code.  The correct error code should
be ASC 0x21 (logical block address out of range).  The code confuses the
sd driver into thinking the device didn't like the READ(10) when in fact
it didn't like the LBA.  As a result, future read commands use READ(6) 
rather than READ(10):

> [Try to mount root device sda]
...
> usb-storage: Command READ_6 (6 bytes)

But since the pendrive only accepts READ(10), not READ(6), all further 
reads fail.

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to