I've made an USB installer stick from Windows with Ubuntu 16.04 LTS , now I'm trying to format it from Ubuntu. When I try to format I get this error :

This partition cannot be modified because it contains a partition table; >please reinitialize layout of the whole device. (udisks-error-quark, 11)

share|improve this question

I got this fixed by doing the following

  1. On your unity dash, type disks and launch the program

  2. Select the disk or drive you want to format

  3. Press CTRL+F

  4. Click format.

After formatting, the disk or drive would be unallocated, therefore you'll have to create a partition by using the plus button on the screen.. Then insert the name you'll like to use as the drive or disk name then click on create. Enjoy....

share|improve this answer
8  
this should be the accepted answer. everything else is too complicated. – Sebastian Wozny Jul 1 '17 at 10:32
    
Agree with @SebastianWozny , this method is simple and works well. – Inoe Aug 29 '17 at 2:21
    
Every other attempt failed except this one. – seanbreeden Oct 27 '17 at 18:52

Make sure you have GParted installed. In a terminal window, run

sudo apt install gparted

Then open GParted as root (still in the terminal window):

sudo gparted

Select your USB stick from the GParted > Devices dropdown menu. Then click the "Device" tab > Create Partition Table...

This will erase all the data from the stick, so be sure you don't have anything valuable in it.

There will be an unallocated space left, double click it to create a new partition with your settings, such as disk label and filesystem (you'll probably want it to be NTFS).

Don't forget to apply your configuration by clicking the green "check" button in GParted.

share|improve this answer

You can use the terminal:

1. Find device ID:

df -h

2. Now unmount the device:

sudo umount /dev/sdb1

(change sdb1 with your device id)

3.Format USB

Choose a file system:

Ext4

sudo mkfs.ext4 /dev/sdb1

Fat

sudo mkfs.vfat /dev/sdb1

Ntfs

sudo mkfs.ntfs /dev/sdb1
share|improve this answer
    
This won't help because it appears there is no partition table and hence no partitions to format on the device in question in the first place. – David Foerster May 3 '17 at 10:47
1  
It works for me every time! – Costis94 May 16 '17 at 11:52
    
Then obviously your system doesn't reflect the situation of the question and is useless as a base for an answer to it. – David Foerster May 16 '17 at 14:10
    
Or you are the wrong one. sourcedigit.com/… :) – Costis94 May 19 '17 at 20:08
    
You're missing the point: there are no partitions to format according to the question. Your explanation how to format partition is correct but not helpful here. – David Foerster May 19 '17 at 20:11

If the standard tools cannot restore the USB installer stick alias pendrive to a standard storage device, you can use mkusb-dus, which has a menu option to do it automatically,

  • wipe the first megabyte and restore the drive to a standard storage device (with the MSDOS partition table and a partition with the FAT32 file system).

See these links

There is a more general description of what to do, if you have problems with a USB pendrive in the following link,

enter image description here

enter image description here

share|improve this answer
1  
This is the Best answer. OP can do what he needs easily. – Alan Jameson Apr 4 '17 at 4:51
    
dus is awesome and easy to use! I love this – wadie Apr 26 '17 at 18:24

I ran into this issue as well. I was able to get around it using sgdisk.

sudo sgdisk --zap-all /dev/sdd

share|improve this answer

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.