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?
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:
https://askubuntu.com/questions/101637/usb-turn-write-protection-off
User contributions licensed under CC BY-SA 3.0