Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having some problems with an USB drive that is not working correctly, I am trying to recreate partitions with fdisk or sfdisk but once I do it I do "-l" and there's no partitions.

This is how I ran fdisk:

root:~$ sudo fdisk /dev/sdc

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdc: 1020 MB, 1020887040 bytes
32 heads, 61 sectors/track, 1021 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1021, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1021, default 1021): 
Using default value 1021

Command (m for help): p

Disk /dev/sdc: 1020 MB, 1020887040 bytes
32 heads, 61 sectors/track, 1021 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        1021      996465+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

And this is how I ran sfdisk:

root:~$ sudo sfdisk /dev/sdc
Checking that no-one is using this disk right now ...
OK

Disk /dev/sdc: 1021 cylinders, 32 heads, 61 sectors/track
Old situation:
Units = cylinders of 999424 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0       -       0          0    0  Empty
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).

/dev/sdc1 :
/dev/sdc1          0+   1020    1021-    996495+  83  Linux
/dev/sdc2 :
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3 :
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4 :
/dev/sdc4          0       -       0          0    0  Empty
New situation:
Units = cylinders of 999424 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0+   1020    1021-    996495+  83  Linux
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table

Re-reading the partition table ...

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

But when I run fdisk -l /dev/sdc I see:

root:~$ fdisk -l /dev/sdc

Disk /dev/sdc: 1020 MB, 1020887040 bytes
32 heads, 61 sectors/track, 1021 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System

and sfdisk -l /dev/sdc:

root:~$ sudo sfdisk -l /dev/sdc

Disk /dev/sdc: 1021 cylinders, 32 heads, 61 sectors/track
Units = cylinders of 999424 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1          0       -       0          0    0  Empty
/dev/sdc2          0       -       0          0    0  Empty
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty

The partitions are not saved. Also that is the same output I get when running -l before trying to create the partitions.

I've also tried parted, gparted and other apps that runs on windows. Nothing created any partition.

I am using Ubuntu 10.04 and I have automount media disabled.

Does someone has any idea why is this happening?

share|improve this question
    
Crazy question - but the USB disk doesn't have a read-only switch on it does it? –  ed. Sep 20 '11 at 17:53
    
I have the same problem with cfdisk. –  dhill Jun 29 '12 at 9:40
    
Not sure, try running partprobe /dev/sdc –  deppfx Jul 26 '12 at 8:24
    
please be more specific is it a flash drive or a real usb hdd? some flash drives are not capible of being partitioned. there are 2 modes in which a flash drive can be built. the way the firmware is written its either treated like a hdd or a special usb mass media device. –  Kendrick Aug 21 '12 at 1:09
add comment

1 Answer

You have to make it a "fixed disk" first, that is make it act like a normal hard drive. Instructions for winxp: http://www.prime-expert.com/articles/a05/enabling-multiple-partitions-on-removable-usb-storage-devices.php

Similar instructions exist for linux:

http://askubuntu.com/questions/101637/usb-turn-write-protection-off

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.