formatting protected USB memory sticks

Colin Rowat c.rowat at espero.org.uk
Sun Jun 1 20:26:16 UTC 2008


Thank you Karl - your instructions were exactly what I needed: clear,
and basic.  I'm still running into problems with - I think - the write
protection, though.  I'll indicate, below, where I seem to go wrong:

> 1. Find the name of your memory:

No problem: /dev/scd1 (/media/Autorun) and /dev/sdb1 (/media/DISK_IMG). 
The former contains the preloaded material that I wish to wipe out; it
shows as 100% full.

> 2. Un-mount the hard drive or USB memory:

No problem.
 
> 3. Run fdisk to remove, make partitions:
> 
>         For example I will say my memory is /dev/sdf and I want to use 
> fdisk to change things. To use fdisk in a terminal type sudo fdisk 
> /dev/sdf and give your password. You get this:
> 
> karl at karl-desktop:~$ sudo fdisk /dev/sdf
> [sudo] password for karl:
> 
> Command (m for help):

I received:

You will not be able to write the partition table.
Note: sector size is 2048 (not 512)
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF
disklabel

before I got the "Command (m for help)" message.
 
> Command (m for help): p
> 
> Disk /dev/sdf: 4043 MB, 4043308544 bytes
> 255 heads, 63 sectors/track, 491 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0x91f72d24
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdf1   *           1         123      987966    e  W95 FAT16 (LBA)
> /dev/sdf2             124         491     2955960   83  Linux

The first block looks the same for me (but 15 cylinders, not 491), but
the Device Boot table is empty.
 
> Command (m for help): d

I am told "no partition is defined yet".

> Command (m for help): n
> Command action
>    e   extended
>    p   primary partition (1-4)
> p
> Partition number (1-4): 1
> First cylinder (1-491, default 1):
> Using default value 1
> Last cylinder or +size or +sizeM or +sizeK (1-491, default 491):
> Using default value 491

No problem.
 
> If I wanted to save this I would use w to exit. But I want to save the 
> current things so I quit with q.

Here, I enter "w" and am told "unable to write /dev/scd1".  As a result,
I do not continue.
 
Is it the case that I am not overcoming the write protection?  The USB
stick has been branded by the organisation that gave it to me, so I
don't know the manufacturer - and, thus, cannot ask them how to reformat
it.

Again, if you could provide any further suggestions, I would be very
grateful for it.

Thank you,

Colin Rowat






More information about the ubuntu-users mailing list