0

I wanted to make a bootable Windows 10 USB on my Ubuntu 16.04 Gnome and in the process of following these steps I got myself into a few problems with my 8 GB pen drive disk.

  • GParted does not recognize the whole 8GB as unallocated. I think another 4GB partition was created but I don't seem to able to manage it via GParted.

    GParted doesn't recognize whole disk

  • I get errors when trying to format disk or erase it in Disks:

    Format disk error

  • When I run sudo mkfs.vfat /dev/sdb1 || sudo dd if=/dev/zero of=/dev/sdb1 bs=1M count=1 to format via command line I get the following output:

    mkfs.fat 3.0.28 (2015-05-16)
    
  • I tried opening the USB disk in GParted on another laptop (running Lubuntu) and there I could see the disk formatted correctly and showing up the whole 8GB. Could it the problem be my computer's system?

How am I to repair this USB stick so I can get a working windows bootable USB?

David Foerster
  • 35,754
  • 55
  • 92
  • 145
Gabriel Ziegler
  • 1,426
  • 2
  • 14
  • 23
  • Maybe the following link will help you analyze the problem, and let us hope, solve it, [Can't format my usb drive. I have already tried with mkdosfs and gparted](https://askubuntu.com/questions/144852/cant-format-my-usb-drive-i-have-already-tried-with-mkdosfs-and-gparted/933035#933035) – sudodus Jun 29 '18 at 13:16
  • 1
    Could you please try to format the drive on the command-line with `sudo mkfs.vfat /dev/sdb1 || sudo dd if=/dev/zero of=/dev/sdb1 bs=1M count=1` (Make sure that `/dev/sdb1` really refers to the drive that you want format! The part after `||` serves as a diagnosis in case the formatting operation fails.) and [edit] your question to include the output? Thanks. – David Foerster Jun 29 '18 at 16:24
  • @DavidFoerster I ran it and posted the output! it didn't show much tho. – Gabriel Ziegler Jun 29 '18 at 16:40
  • Little output or no output often means success of UNIX tools. In this case the drive was successfully formatted to FAT32 and you should be able to use it now. I don't why it wouldn't work with Gnome Disks because there appeared to be no obvious problem. – David Foerster Jun 29 '18 at 16:45
  • @DavidFoerster yes, it did format it to FAT32, I can see it in `Disks`, although I still can't see any difference in Gparted after refreshing devices, maybe the problem is within Gparted? Thanks! – Gabriel Ziegler Jun 29 '18 at 16:49
  • You can use [mkusb](https://help.ubuntu.com/community/mkusb) to create a Windows install USB drive. See [this link](https://help.ubuntu.com/community/mkusb#Windows_USB_install_drive) for more details. If it does not work, there may be a problem with the USB drive itself, for example that it is 'grid-locked'. See the link in my first comment. – sudodus Jun 29 '18 at 16:52
  • @DavidFoerster this post isn't answered with your other post as I have a different error when trying to format the disk. – Gabriel Ziegler Jun 29 '18 at 16:54
  • 1
    The solution should usually be the same though: create a new partition table with Gnome Disks or any other tool. – David Foerster Jun 30 '18 at 07:43
  • @DavidFoerster please, note my edit 2 in my post, thanks. – Gabriel Ziegler Jun 30 '18 at 17:56
  • If you're looking for detailed instructions for steps 1–2 of the [UEFI recipe](/a/487970)/175814 please refer to [my answer to the linked question](/a/833034/175814) and select "GPT" instead of "DOS/MBR" in step 2. – David Foerster Jun 30 '18 at 20:03

3 Answers3

1

I had also problems using the standard partitioning tools. I solved it by using the program fdisk. Install it with

sudo apt install fdisk

and then invoke it with

sudo fdisk /dev/sd_your_usb_device

Don't forget to unmount your usb before, and DON'T manipulate your system disks!

Link on how to format a disk.

abu_bua
  • 10,473
  • 10
  • 45
  • 62
  • what commands did you run after entering fdisk menu? – Gabriel Ziegler Jun 29 '18 at 16:55
  • use `lsblk` to identify your usb stick. For instance `sudo fdisk /dev/sdb` . press m key to get help, p to print partition table! Then delete partition you don't need by pressing d, by pressing n add new partition, afterwards save and exit by pressing the x key. -- Then you have to format your disk using the `mkfs`command. YOU HAVE TO UNMOUNT YOUR DISK TO DO THAT! – abu_bua Jun 29 '18 at 17:10
1

I too face similar problem with Gparted. I have no Idea why this happens when I make bootable or persistent usb.

But I have easy trick. I use mkusb to format and freshly allocate pen-drive.I never gone through any terminal drill.

I hope it will work for you too.

https://help.ubuntu.com/community/mkusb

Aravind
  • 886
  • 1
  • 11
  • 24
0

You should try another partitioning tool like GnomeDisks (gdisk), some usb sticks have very specific issues. Maybe one tool can succeed where another doesn't.

On GnomeDisks, select the usbstick and press the minus button on the right section above the partitioning table.

abu_bua
  • 10,473
  • 10
  • 45
  • 62
Balbinator
  • 576
  • 1
  • 4
  • 13
  • That doesn't seem to work either. I get: ```Error deleting partition /dev/sdb1: Command-line `parted --script "/dev/sdb" "rm 1"' exited with non-zero exit status 1: Error: Partition doesn't exist. (udisks-error-quark, 0)``` – Gabriel Ziegler Jun 29 '18 at 13:19
  • You could also try this command line solution: https://askubuntu.com/questions/391654/format-a-usb-stick-completely Also, if it doesn't work, you probably gonna need to buy another usbstick. – Balbinator Jun 29 '18 at 14:35