U3-Enabled USB Storage Devices: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
=U3 Devices: USB Storage thumb drives that can emulate CD-ROM devices= | =U3 Devices: USB Storage thumb drives that can emulate CD-ROM devices= | ||
A U3 flash drive presents itself to the host system as a USB hub with a CD drive and standard USB mass storage device attached.<br> | |||
[https://en.wikipedia.org/wiki/U3_(software) https://en.wikipedia.org/wiki/U3_(software)] | |||
==General== | ==General== | ||
Tool: u3-tool <https://sourceforge.net/projects/u3-tool/> | Tool: u3-tool <https://sourceforge.net/projects/u3-tool/> | ||
===u3-tool package info=== | ===u3-tool package info=== | ||
| Line 30: | Line 31: | ||
==Getting device info (via lsblk)== | |||
jeremy@desktop ~ $ lsblk -o name,path,pttype,fstype,label,vendor,model,serial,uuid /dev/sdb | |||
NAME PATH PTTYPE FSTYPE LABEL VENDOR MODEL SERIAL UUID | |||
sdb /dev/sdb dos SanDisk U3_Cruzer_Micro 0877630F3011E8CD | |||
└─sdb1 /dev/sdb1 dos vfat MY-U3DEVICE F327-C68D | |||
==Getting device info (via SMART)== | ==Getting device info (via SMART)== | ||
| Line 62: | Line 71: | ||
>> Terminate command early due to bad response to IEC mode page | >> Terminate command early due to bad response to IEC mode page | ||
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. | A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. | ||
==u3-tool program== | ==u3-tool program== | ||
| Line 196: | Line 203: | ||
|**************************************************| 100% | |**************************************************| 100% | ||
OK | OK | ||
==Getting CD Information== | |||
jeremy@desktop ~ $ blkid /dev/sr0 | |||
/dev/sr0: UUID="2020-08-18-04-59-21-00" LABEL="UBCD539" TYPE="iso9660" | |||
And: | |||
jeremy@desktop ~ $ cd-drive | |||
cd-drive version 2.0.0 x86_64-pc-linux-gnu | |||
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein | |||
This is free software; see the source for copying conditions. | |||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A | |||
PARTICULAR PURPOSE. | |||
The driver selected is GNU/Linux | |||
The default device for this driver is /dev/cdrom | |||
Drivers available... | |||
GNU/Linux ioctl and MMC driver | |||
cdrdao (TOC) disk image driver | |||
bin/cuesheet disk image driver | |||
Nero NRG disk image driver | |||
CD-ROM drive supports some nonstandard or degenerate set of MMC | |||
Drive: /dev/cdrom | |||
Vendor : SanDisk | |||
Model : U3 Cruzer Micro | |||
Revision : 8.02 | |||
Profile List Feature | |||
Core Feature | |||
Vendor-specific code 200 Feature | |||
Removable Medium Feature | |||
Tray type loading mechanism | |||
can eject the medium or magazine via the normal START/STOP command | |||
can be locked into the Logical Unit | |||
Random Readable Feature | |||
CD Read Feature | |||
C2 Error pointers are not supported | |||
CD-Text is not supported | |||
Initiator- and Device-directed Power Management Feature | |||
Ability to respond to all commands within a specific time Feature | |||
Hardware : CD-ROM or DVD | |||
Can eject : No | |||
Can close tray : No | |||
Can disable manual eject : No | |||
Can select juke-box disc : No | |||
Can set drive speed : No | |||
Can read multiple sessions (e.g. PhotoCD) : No | |||
Can hard reset device : No | |||
Reading.... | |||
Can read Mode 2 Form 1 : No | |||
Can read Mode 2 Form 2 : No | |||
Can read (S)VCD (i.e. Mode 2 Form 1/2) : No | |||
Can read C2 Errors : No | |||
Can read IRSC : No | |||
Can read Media Channel Number (or UPC) : No | |||
Can play audio : No | |||
Can read CD-DA : No | |||
Can read CD-R : No | |||
Can read CD-RW : No | |||
Can read DVD-ROM : No | |||
Writing.... | |||
Can write CD-RW : No | |||
Can write DVD-R : No | |||
Can write DVD-RAM : No | |||
Can write DVD-RW : No | |||
Can write DVD+RW : No | |||
==Getting ISO Information== | |||
jeremy@desktop ~ $ iso-info /dev/sr0 | |||
iso-info version 2.0.0 x86_64-pc-linux-gnu | |||
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein | |||
This is free software; see the source for copying conditions. | |||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A | |||
PARTICULAR PURPOSE. | |||
__________________________________ | |||
ISO 9660 image: /dev/sr0 | |||
Application : GENISOIMAGE ISO 9660_HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE | |||
System : LINUX | |||
Volume : UBCD539 | |||
Joliet Level: 3 | |||
==Listing files inside the ISO image== | |||
jeremy@desktop ~ $ iso-info /dev/sr0 -l | head -n 40 | |||
iso-info version 2.0.0 x86_64-pc-linux-gnu | |||
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein | |||
This is free software; see the source for copying conditions. | |||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A | |||
PARTICULAR PURPOSE. | |||
__________________________________ | |||
ISO 9660 image: /dev/sr0 | |||
Application : GENISOIMAGE ISO 9660_HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE | |||
System : LINUX | |||
Volume : UBCD539 | |||
Joliet Level: 3 | |||
__________________________________ | |||
ISO-9660 Information | |||
/: | |||
d [LSN 94] 2048 Nov 11 2014 21:04:57 . | |||
d [LSN 94] 2048 Aug 17 2020 23:59:21 .. | |||
- [LSN 165] 76 Apr 27 2011 08:33:19 autorun.inf | |||
d [LSN 95] 2048 Nov 11 2014 21:04:51 boot | |||
- [LSN 166] 3158 Apr 18 2008 01:22:37 license.txt | |||
d [LSN 140] 2048 Aug 16 2020 20:27:15 pmagic | |||
d [LSN 98] 2048 Nov 11 2014 21:05:03 ubcd | |||
... | |||
==Test booting from the CD device== | |||
You can use QEMU to create a VM that boots from the ISO (if it is a bootable image): | |||
qemu-system-x86_64 -m 1G -cpu host --enable-kvm -boot d -cdrom /dev/sr0 | |||
Latest revision as of 17:40, 5 September 2025
U3 Devices: USB Storage thumb drives that can emulate CD-ROM devices
A U3 flash drive presents itself to the host system as a USB hub with a CD drive and standard USB mass storage device attached.
https://en.wikipedia.org/wiki/U3_(software)
General
Tool: u3-tool <https://sourceforge.net/projects/u3-tool/>
u3-tool package info
jeremy@desktop ~ $ aptitude show u3-tool Package: u3-tool Version: 0.3-3 State: installed Automatically installed: no Priority: optional Section: universe/utils Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: amd64 Uncompressed Size: 54.3 k Depends: libc6 (>= 2.4) Description: tool for controlling the special features of a U3 USB flash disk Tool for controlling USB flash devices that conform to the U3 specifications. You can do the following with your U3 flash: * Replace the CD image * Change the size of the virtual CD or completely remove it * Enable and disable security * Unlock and change the password of secured U3 device * Obtain various device information Homepage: https://sourceforge.net/projects/u3-tool/
Getting device info (via lsblk)
jeremy@desktop ~ $ lsblk -o name,path,pttype,fstype,label,vendor,model,serial,uuid /dev/sdb
NAME PATH PTTYPE FSTYPE LABEL VENDOR MODEL SERIAL UUID sdb /dev/sdb dos SanDisk U3_Cruzer_Micro 0877630F3011E8CD └─sdb1 /dev/sdb1 dos vfat MY-U3DEVICE F327-C68D
Getting device info (via SMART)
jeremy@desktop ~ $ sudo smartctl -d scsi -i /dev/sdb smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-193-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: SanDisk Product: U3 Cruzer Micro Revision: 8.02 User Capacity: 3,971,677,696 bytes [3.97 GB] Logical block size: 512 bytes >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
or:
jeremy@desktop ~ $ sudo smartctl -d sat,auto -i /dev/sdb smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-193-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: SanDisk Product: U3 Cruzer Micro Revision: 8.02 User Capacity: 3,971,677,696 bytes [3.97 GB] Logical block size: 512 bytes >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
u3-tool program
jeremy@desktop ~ $ u3-tool -h
u3-tool 0.3 - U3 USB stick manager
Usage: u3-tool [options] <device name>
Options:
-c Change password
-d Disable device security
-D Dump all raw info(for debug)
-e Enable device security
-h Print this help message
-i Display device info
-l <cd image> Load CD image into device
-p <cd size> Repartition device
-R Reset device security, destroying private data
-u Unlock device
-v Use verbose output
-V Print version information
For the device name use:
'/dev/sda0', '/dev/sg3'
Getting u3 device info
Basic:
jeremy@desktop ~ $ sudo u3-tool -i /dev/sdb Total device size: 3.77 GB (4051697664 bytes) CD size: 76.31 MB (80019456 bytes) Data partition size: 3.70 GB (3971678208 bytes)
Detailed:
jeremy@desktop ~ $ u3-tool -D /dev/sdb Partition info: - Partition count: 0x02 - Data partition size: 3971678208 byte(0x00765d80) - Unknown1: 0x00000002 - CD size: 80019456 byte(0x00026280) - Unknown2: 0x00000103 Data partition info: - Data partition size: 3971678208 byte(0x00765d80) - Secured zone size: 0 byte(0x00000000) - Unlocked: 0x00000000 - Password try: 0x00000000 Chip info: - Manufacturer: SanDisk - Revision: 80200010 Property page 0x03: - Device size: 4051697664 byte(0x0078c000) - Device serial: 0877630F3011E8CD - Full record length: 0x00000077 - Unknown1: 0x0b - Unknown2: 0x54060781 - Unknown3: 0x54060781 Property page 0x0C: - Max. pass. try: 5
Removing CD image - use all space for USB FLASH STORAGE
jeremy@desktop ~ $ sudo u3-tool -p 0 /dev/sdb WARNING: Loading a new cd image causes the whole device to be wiped. This INCLUDES the data partition. I repeat: ANY EXISTING DATA WILL BE LOST! Are you sure you want to continue? [yn] y jeremy@desktop ~ $ sudo u3-tool -i /dev/sdb Total device size: 3.77 GB (4051697664 bytes) CD size: 0.00 B (0 bytes) Data partition size: 3.77 GB (4051697664 bytes)
Adding a CD image
Get the ISO size:
jeremy@desktop ~ $ stat ubcd539.iso File: ubcd539.iso Size: 842489856 Blocks: 1638402 IO Block: 131072 regular file Device: 3bh/59d Inode: 1718238 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/ jeremy) Gid: ( 1000/ jeremy) Access: 2025-09-05 10:53:48.997794508 -0500 Modify: 2025-09-05 11:01:51.577078347 -0500 Change: 2025-09-05 11:01:52.333077223 -0500 Birth: -
Set the U3 ISO size:
jeremy@desktop ~ $ sudo u3-tool -p 842489856 /dev/sdb WARNING: Loading a new cd image causes the whole device to be wiped. This INCLUDES the data partition. I repeat: ANY EXISTING DATA WILL BE LOST! Are you sure you want to continue? [yn] y
Get info:
jeremy@desktop ~ $ sudo u3-tool -i /dev/sdb Total device size: 3.77 GB (4051697664 bytes) CD size: 803.50 MB (842530816 bytes) Data partition size: 2.99 GB (3209166848 bytes)
Load the ISO (takes a loooong time):
jeremy@desktop ~ $ sudo u3-tool -l ubcd539.iso /dev/sdb |**************************************************| 100% OK
Getting CD Information
jeremy@desktop ~ $ blkid /dev/sr0 /dev/sr0: UUID="2020-08-18-04-59-21-00" LABEL="UBCD539" TYPE="iso9660"
And:
jeremy@desktop ~ $ cd-drive
cd-drive version 2.0.0 x86_64-pc-linux-gnu
Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
The driver selected is GNU/Linux
The default device for this driver is /dev/cdrom
Drivers available...
GNU/Linux ioctl and MMC driver
cdrdao (TOC) disk image driver
bin/cuesheet disk image driver
Nero NRG disk image driver
CD-ROM drive supports some nonstandard or degenerate set of MMC
Drive: /dev/cdrom
Vendor : SanDisk
Model : U3 Cruzer Micro
Revision : 8.02
Profile List Feature
Core Feature
Vendor-specific code 200 Feature
Removable Medium Feature
Tray type loading mechanism
can eject the medium or magazine via the normal START/STOP command
can be locked into the Logical Unit
Random Readable Feature
CD Read Feature
C2 Error pointers are not supported
CD-Text is not supported
Initiator- and Device-directed Power Management Feature
Ability to respond to all commands within a specific time Feature
Hardware : CD-ROM or DVD
Can eject : No
Can close tray : No
Can disable manual eject : No
Can select juke-box disc : No
Can set drive speed : No
Can read multiple sessions (e.g. PhotoCD) : No
Can hard reset device : No
Reading....
Can read Mode 2 Form 1 : No
Can read Mode 2 Form 2 : No
Can read (S)VCD (i.e. Mode 2 Form 1/2) : No
Can read C2 Errors : No
Can read IRSC : No
Can read Media Channel Number (or UPC) : No
Can play audio : No
Can read CD-DA : No
Can read CD-R : No
Can read CD-RW : No
Can read DVD-ROM : No
Writing....
Can write CD-RW : No
Can write DVD-R : No
Can write DVD-RAM : No
Can write DVD-RW : No
Can write DVD+RW : No
Getting ISO Information
jeremy@desktop ~ $ iso-info /dev/sr0 iso-info version 2.0.0 x86_64-pc-linux-gnu Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ ISO 9660 image: /dev/sr0 Application : GENISOIMAGE ISO 9660_HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE System : LINUX Volume : UBCD539 Joliet Level: 3
Listing files inside the ISO image
jeremy@desktop ~ $ iso-info /dev/sr0 -l | head -n 40 iso-info version 2.0.0 x86_64-pc-linux-gnu Copyright (c) 2003-2005, 2007-2008, 2011-2015, 2017 R. Bernstein This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. __________________________________ ISO 9660 image: /dev/sr0 Application : GENISOIMAGE ISO 9660_HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE System : LINUX Volume : UBCD539 Joliet Level: 3 __________________________________ ISO-9660 Information /: d [LSN 94] 2048 Nov 11 2014 21:04:57 . d [LSN 94] 2048 Aug 17 2020 23:59:21 .. - [LSN 165] 76 Apr 27 2011 08:33:19 autorun.inf d [LSN 95] 2048 Nov 11 2014 21:04:51 boot - [LSN 166] 3158 Apr 18 2008 01:22:37 license.txt d [LSN 140] 2048 Aug 16 2020 20:27:15 pmagic d [LSN 98] 2048 Nov 11 2014 21:05:03 ubcd ...
Test booting from the CD device
You can use QEMU to create a VM that boots from the ISO (if it is a bootable image):
qemu-system-x86_64 -m 1G -cpu host --enable-kvm -boot d -cdrom /dev/sr0