Author Topic: Reformatting "Windows" USB memory sticks  (Read 1841 times)

Offline Howard

  • Hero Member
  • *****
  • Posts: 725
Reformatting "Windows" USB memory sticks
« on: January 15, 2010, 03:19:48 PM »
I've just bought a set of 3 4GB USB memory sticks by CoreMicro in Costco.   I chose these because they actually listed Linux as a suitable OS - but, of course, they are really configured for Windows.

When plugged into Minime 2009.2 (KDE3) I get 2 devices, a removable disk, and a pseudo CD rom.   The disk is partitioned into a public (2.8 GB) and secure partition (900 MB) and of course the stuff on the CD rom only runs under that other OS.   As it stood I could only use about 2/3 of the memory, as the secure partition is only accessible from Windows as far as I can see and not recognised by Linux (wine didn't work).   So I had to stick it into my other machine and boot up its rusty old XP.   That enabled me to reformat with  a public partition of 3.8 GB (zero secure) - but there seems to be another 400 MB or so in the CD rom partition.   I can live with this as most of the memory is now available, but I'm curious to know if there's any way to reformat the whole thing and remove the unnecessary CD rom bit.
How does one become a hero?  By asking a lot of dumb questions apparently! I have three computers of various ages, the most powerful is a Dell Netbook 10v; each has 2 or 3 versions of PCLOS of various vintages.  Location, St John's, Newfoundland.

Online kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3990
Re: Reformatting "Windows" USB memory sticks
« Reply #1 on: January 15, 2010, 04:33:12 PM »
Depends entirely on what's inside the stick. Remember these things are not discs. They are flash RAM with a controller which makes them emulate a hard drive. You can only access, partition and format what the controller lets you access, partition and reformat. The internal organisation also determines how long the stick will last with different file systems.

If some parts of the stick are actually ROM, or RAM the controller refuses to flash, then you cannot write or format it.

To tell you what's inside requires a detailed description which the manufacturer might or might not publish.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Online gandy

  • Hero Member
  • *****
  • Posts: 1173
Re: Reformatting "Windows" USB memory sticks
« Reply #2 on: January 15, 2010, 05:20:54 PM »
Can you read what's on that partition? is there an application named Launchpad.exe? Some flash drives have a technology called U3. It's designed to make it easy to run portable applications. Google U3 and you will find more info.
For me, it is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring. –
Carl Sagan

Online jaydot

  • Administrator
  • Super Villain
  • *****
  • Posts: 15568
  • there is no limitation on imagination
Re: Reformatting "Windows" USB memory sticks
« Reply #3 on: January 15, 2010, 06:22:37 PM »
how come you couldn't format it entirely with linux?  use dd to wipe, then format with the partitioner in pcc.
PCLinuxOS  Get it?  Got it?  Good!!   8)

We don't have any millionare angels or corporate backers paying the bills here, PLEASE DONATE.
http://pclinuxos.com/?page_id=7

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Reformatting "Windows" USB memory sticks
« Reply #4 on: January 15, 2010, 06:46:49 PM »
there is a partition that linux sees as a cdrom so pcc can't handle it well, i know it can be done because i did but can't remember how

backup files form it and don't mount any of the partitions on it, if you have automount or similar, disable it, i think that is how i did it but can't be sure
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline The_Dadu

  • Sr. Member
  • ****
  • Posts: 411
    • Not much of a website
Re: Reformatting "Windows" USB memory sticks
« Reply #5 on: January 16, 2010, 06:09:29 AM »
I agree it sounds like these memory sticks were originally configured as 'U3'.  Next time, check to see if there is a U3 removal app on the stick before trying to reformat them. Here is one link to a U3 removal program that may help (WARNING: WILL ERASE THE WHOLE STICK).
http://www.softpedia.com/get/Tweak/Uninstallers/U3-Launchpad-Removal-Tool.shtml
If I am not for myself, then who will be for me? And when I am only for myself, what am I? And if not now, when?
That which is hateful to you, do not do to your fellow.
 - Hillel 100 BCE

Offline Ramchu

  • Hero Member
  • *****
  • Posts: 1589
Re: Reformatting "Windows" USB memory sticks
« Reply #6 on: January 16, 2010, 06:33:23 AM »
 I have a U3 sandisk 2gig USB stick, and by all means Remove that stuff (format ) it is very susceptible to viruses,
and I know that is something that is not a worry with linux, but if you use it in a windows machine !
 Mine got infected and would pass the viirus to the Windows OS every time that it initialized - works like a mini OS.

 Note: once you remove the U3 stuff it can't be reinstalled -It will then just work as a normal storage device.

 Just my .02 $ - from my experience

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Reformatting "Windows" USB memory sticks
« Reply #7 on: January 16, 2010, 08:02:32 AM »
how come you couldn't format it entirely with linux?  use dd to wipe, then format with the partitioner in pcc.

I had to wipe the MBR and partition table using the  dd  command,

From memory
Code: [Select]
dd  if=/dev/zero  of=/dev/sd?  bs=512  count=2
and from there used fdisk to create a new MBR & Partition table (called a 'DOS Label' I think in fdisk).


Once that was done the stick had a recognisable MBR and partition table and then just needed a partition to be created and formatted, after which the full extent of the flash stick was available for storage.


Offline Howard

  • Hero Member
  • *****
  • Posts: 725
Re: Reformatting "Windows" USB memory sticks
« Reply #8 on: January 16, 2010, 02:57:13 PM »
how come you couldn't format it entirely with linux?  use dd to wipe, then format with the partitioner in pcc.

I have no experience with dd, and after looking at the manual (man dd) I have no idea how to use it!

pcc does not detect the "secure" partition, only the "public" one.  I can eliminate the secure one using the partitioning software on the "disk", but I'd like to get rid of the pseudo CD rom too

I tried a U3 removal utility in XP, but that didn't seem to recognise the device as U3 ( it has a file called laucher (no "n") presumably the Chinese spelling ;), but it's not  writable so I cannot change it.  Perhaps it's a U3 look alike, rather than a genuine one.
.
How does one become a hero?  By asking a lot of dumb questions apparently! I have three computers of various ages, the most powerful is a Dell Netbook 10v; each has 2 or 3 versions of PCLOS of various vintages.  Location, St John's, Newfoundland.

Online jaydot

  • Administrator
  • Super Villain
  • *****
  • Posts: 15568
  • there is no limitation on imagination
Re: Reformatting "Windows" USB memory sticks
« Reply #9 on: January 16, 2010, 03:01:03 PM »
howard, the post above, by johnboy, sets out the code you need to enter into a terminal to do the job.  what you need to make sure of is the proper designation of 'sd?' to be certain that you don't format your internal drive.  your filemanager, or partition manager should show the name of the usb stick.  copy paste the code and back arrow to add the relevant number.
PCLinuxOS  Get it?  Got it?  Good!!   8)

We don't have any millionare angels or corporate backers paying the bills here, PLEASE DONATE.
http://pclinuxos.com/?page_id=7

Offline Howard

  • Hero Member
  • *****
  • Posts: 725
Re: Reformatting "Windows" USB memory sticks
« Reply #10 on: January 21, 2010, 01:06:18 PM »
I finally got around to trying out JohnBoy's command:

Quote
Code: [Select]
dd  if=/dev/zero  of=/dev/sd?  bs=512  count=2

using of=/dev/sr0, which is what the offending partition appears to be.  Got a "writeonly" message.

I also tried the U3 removal software on XP but that didn't recognise it as U3.
How does one become a hero?  By asking a lot of dumb questions apparently! I have three computers of various ages, the most powerful is a Dell Netbook 10v; each has 2 or 3 versions of PCLOS of various vintages.  Location, St John's, Newfoundland.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Reformatting "Windows" USB memory sticks
« Reply #11 on: January 21, 2010, 01:12:42 PM »
I finally got around to trying out JohnBoy's command:

Quote
Code: [Select]
dd  if=/dev/zero  of=/dev/sd?  bs=512  count=2

using of=/dev/sr0, which is what the offending partition appears to be.  Got a "writeonly" message.

I also tried the U3 removal software on XP but that didn't recognise it as U3.

With the USB stick plugged in, in a terminal do

fdisk -l     (minux elle, not digit 1)

Post back the command and the output obtained.

regards.

Offline Howard

  • Hero Member
  • *****
  • Posts: 725
Re: Reformatting "Windows" USB memory sticks
« Reply #12 on: January 21, 2010, 01:41:31 PM »
Here you are JohnBoy, The sr0 partition doesn't appear when I try to reformat in pcc.

Quote
[howard@crocus ~]$ fdisk -l

Disk /dev/sda: 4038 MB, 4038066176 bytes
255 heads, 63 sectors/track, 490 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x04dd5721

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         491     3943392+   c  W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
     phys=(489, 254, 63) logical=(490, 238, 4)
[howard@crocus ~]$
How does one become a hero?  By asking a lot of dumb questions apparently! I have three computers of various ages, the most powerful is a Dell Netbook 10v; each has 2 or 3 versions of PCLOS of various vintages.  Location, St John's, Newfoundland.

Offline Was_Just19

  • Hero Member
  • *****
  • Posts: 6852
  • MLU
Re: Reformatting "Windows" USB memory sticks
« Reply #13 on: January 21, 2010, 02:16:01 PM »
Don't worry about the partitions.
The idea is to wipe all references to ANY partition from the drive, then rebuild the partition table so that you can make a new partition and then format it.

To do that use the  dd    command posted above with the device node of the DRIVE and not the partition.

So on the understanding that the info posted is for the drive you wish to wipe this would be the command:-

dd  if=/dev/zero  of=/dev/sda  bs=512  count=2

When that is done, extract the stick, wait 20 secs, and reinsert it.
Now running fdisk on it should show a completely different response. There will be no partitions etc  ....

After that you will need to use fdisk to create a new DOS Label on the disk.

Get that far and then report back with the new response of fdisk.

Offline Howard

  • Hero Member
  • *****
  • Posts: 725
Re: Reformatting "Windows" USB memory sticks
« Reply #14 on: January 21, 2010, 04:20:33 PM »
Done that - not completely though, how do I create a partition table using fdisk?.  But the sr0 partition is still there.

Quote
[howard@crocus ~]$ fdisk -l

Disk /dev/sda: 4038 MB, 4038066176 bytes
125 heads, 62 sectors/track, 1017 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table
« Last Edit: January 21, 2010, 04:24:21 PM by Howard »
How does one become a hero?  By asking a lot of dumb questions apparently! I have three computers of various ages, the most powerful is a Dell Netbook 10v; each has 2 or 3 versions of PCLOS of various vintages.  Location, St John's, Newfoundland.