Thursday, July 28, 2011

u3 -- gone!

In Ubuntu Lucid, I installed u3-tool and used it to remove the U3 stuff from a Memorex TravelDrive flash drive. Check man u3-tool for more info. u3-tool is also available from the Debian repos.

I inserted the flash drive. Then, I checked System > Administration > Disk Utility. The drive was shown at /dev/sdc and the volume at /dev/sdc1.

I ran the following commands, which basically just gave me a look at things:

steve[~]$  sudo u3-tool -i /dev/sdc1 
Total device size:   1.88 GB (2017984512 bytes) 
CD size:             4.09 MB (4292608 bytes) 
Data partition size: 1.88 GB (2013691904 bytes) 
steve[~]$  sudo u3-tool -h

u3-tool 0.3 - U3 USB stick manager 

Usage: u3-tool [options]  

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     Load CD image into device 
-p      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' 

According to some tips I found in an Ubuntu forums thread, the output at the end of that second command shows the devices names that should be used.

So, I ran the following command:

steve[~]$  sudo u3-tool -p 0 /dev/sg3 

WARNING: Loading a new cd image causes the whole device to be whiped. This INCLUDES 
 the data partition. 
I repeat: ANY EXCISTING DATA WILL BE LOST! 

Are you sure you want to continue? [yn] y 
steve[~]$ 

So, I opened GParted and saw that all that was left was a FAT16 partition (1.88 GB) and about 4 MB unallocated. I unmounted the FAT16 partition and then resized it to take up the rest of the drive.

Next, I took a look at things again with this command:

steve[~]$  sudo u3-tool -i /dev/sdc1 
Total device size:   1.88 GB (2017984512 bytes) 
CD size:             0.00B (0 bytes) 
Data partition size: 1.88 GB (2017984512 bytes)

So, u3-tool worked and the U3 part is gone -- yay!

No comments: