2

I formated a usb stick on a windows system using Fat32, but windows automatically allocated 2084bytes and I didn't notice, so when I made the stick bootable and used it, but when I wanted to format it this error kept coming up:

Gparted discovered 2084 bytes instead of 512bytes

so I checked online and used this command:sudo fdisk /dev/sbd and deleted the two partitions and ran w to write it. That didn't work so i ran this command: sudo dd if=/dev/zero of=/dev/sbd bs=2048 count=32

after running this command the error stopped coming up on gparted, for a few seconds my usb drive wasn't showing as a bootable drive but a normal 4gb drive. I removed it and inserted it again and the usb drive stopped coming up, Gparted said the drive is unallocated so I created an msdos partition but it still says the drive is unallocated and doesn't allow me format it. Gparted showing usb flash is unallocated

I ran list disk and list volume commands on windows and got this

Windows partition

It shows the USB drives partition, but not the volume

enter image description here

3 Answers 3

2

Use diskpart utility in Windows.Log in to windows as Admin User. Plug-in your pendrive into pc.

  1. Open command prompt in windows by 'ctrl+x' then press A (Run As Admin) Or you can type cmd in search bar and right click it then select run as administrator.
  2. type 'diskpart' in cmd.
  3. type 'list disk'.
  4. See output should be disk 0 (your internal hdd) and disk 1 will be your pendrive (see its size also for confirmation).
  5. type 'select disk 1'.
  6. type 'online' if you see status offline in list disk command.
  7. type 'clean'.
  8. type 'create partition primary'.
  9. type 'format fs = fat32 quick'

And you're done. Hope it help. If not then inform me.

8
  • I just tried it up until the last command it said > There is no volume selected. Please select a volume and try again Nov 23, 2016 at 11:17
  • give me output of 'list disk' and 'list volume' Nov 23, 2016 at 11:22
  • Let me upload the result Nov 23, 2016 at 11:31
  • 1
    type 'list volume'. Type 'select volume <volume_no_of _pd>'. Then type 'online volume'. Then perfomed the above steps from 7 to 9. Nov 23, 2016 at 11:33
  • 1
    Thank you, I put the flash drive back on my Ubuntu OS and Gparted allowed me format it, it works now Nov 23, 2016 at 13:02
0

It is possible to use the wipe menu in mkusb to wipe the drive (like you did with dd), and to automatically create a new partition table and file system. This way you can restore it to a standard mass storage device with a FAT 32 file system, and you can select some other (more advanced) partition tables too.

Anyway, after this treatment, the drive will be available for more editing with gparted.

You can probably skip to this point and try again with gparted.

The drive space is and should be unallocated at this stage. Now you should right-click on [the graphical representation of] the unallocated space in order to create one or more partitions.

It helps to read a tutorial with pictures, for example this one:

GParted partitioning software - Full tutorial

0

I had a similar problem in the past which I solved by completely erasing it:

dd if=/dev/zero of=/dev/sdb

This will fill it with zeros and automatically end when it's full. Then just possibly eject it, unplug it and plug it again...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .