[Gllug] USB memory stick appears as two devices

damion.yates at gmail.com damion.yates at gmail.com
Mon Feb 12 01:50:46 UTC 2007


On Tue, 23 Jan 2007, John G Walker wrote:

> On Tue, 23 Jan 2007 20:03:30 +0000 Christopher Hunter
> <chrisehunter at blueyonder.co.uk> wrote:
> 
> > On Tue, 2007-01-23 at 14:09 +0000, John Winters wrote:
> > > I've just bought myself a new Kingston 1GB memory stick but get
> > > something slightly odd when I plug it into a computer - whether
> > > running Windows or Linux.  It appears as two devices; not even
> > > as two partitions on one device.
> > > 
> > 
> > I found the same thing with a 2 Gb San Disk stick I bought
> > recently.
> 
> So what's going on here? Anyone know why manufacturers are doing
> this?  Presumably there must be some sort of advantage to someone,
> but I can't see it,

I have found support for booting from USB devices to be extremely
variable.  Only in computers from the past few years has it been
something you could start to rely upon, despite how long USB has been
around for.

Even my fairly new A8V m/board offers a bunch of options for how to
boot from USB, including an auto mode that determines whether to
emulate cdrom if the UMS is ~700MB or floppy if a small multiple of
1.4MB.  The legacy mode on many BIOSes (often requiring USB Legacy
Keyboard support to be turned on, of all things), means that when
syslinux or DOS boot they can use INT13 (hex) to perform block
operations in a floppy style and have them work, this is akin to the
"El Torito" support on bootable cdroms where you need a 1.4MB floppy
image.

I have come across loads of laptops and PCs that simply will not
accept a lilo/grub/syslinux boot sector on my old 256MB UMS (USB Mass
Storage device).  However if I stick a usb-floppy or usb-cdrom drive
with boot media they boot fine.  I assume these devices are reporting
themselves in some way beyond that of a stock mass storage device, I
should try to remember to view lsusb -v on them.

A device which presents itself as two logical devices, one 1.4MB the
other the rest of the advertised 1GB or, a device with 650MB and
whatever the rest, is likely to be doing so, to be much more likely to
work on legacy hardware (legacy as in just a few years ago, P4 etc...
ie not that old).

My aging Slackware install doesn't search for more than one disk on a
hotplug event, so I only recently noted that a 1GB UMS I had,
contained a 1.4MB second device* although this doesn't appear like a
floppy in anything but size, even the BIOS, if not in auto mode thinks
it's just a tiny 1.4MB harddrive.  I'd like to know what lsusb -v
shows, against the device you have, also if the BIOS sees it like an
actual cdrom.  This goes for anyone reading this who has a USB device
like a physical usb floppy drive.

I'm interested in how it's possible to disable this via something you
run against the device, I'm also interested to see that forcing CHS
values via (sf|cf|f)disk could somehow divide up my UMS or at least
make it bootable for legacy BIOS.  I'm not sure I quite yet want to
break my own device quite yet.

I've Cc'ed Christopher Currie because, he has been experimenting with
bootable USB distibutions and may be interested in using a UMS that
acts exactly like a cdrom and so could work with any cdrom based
install as long as the files are copied to the right place.  I'm
working (very very slowly) on a 24MB bootable system, including X so
it will fit on a business card sized cdrom, these are much more likely
to boot in random hardware than USB, I've had some success but lack
time to complete the project.  24MB is the size of the cheaper and
I've found, more common business card CDRs, you can get rare 50MB ones
which the BBC-LNX project works on but this is obviously too large.


Damion

*echo "scsi add-single-disk N 0 0 1" >/proc/scsi/scsi where N is where
it found the first one, seen via dmesg.
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list