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)
I got this fixed by doing the following
On your unity dash, type
gnome-disks
and launch the Disks applicationSelect the disk or drive you want to format
Press CTRL+F
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.
Make sure you have GParted installed. In a terminal window, run
Then open GParted as root (still in the terminal window):
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.
You can use the terminal:
1. Find device ID:
2. Now unmount the device:
(change sdb1 with your device id)
3.Format USB
Choose a file system:
Ext4
Fat
sudo mkfs.vfat /dev/sdb1
Ntfs
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,
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,
Check disk by issuing below command
You can find the usb disk, usually it would be /dev/sdb or /dev/sdc. Check if any of the partitions of the disk is not being used.
If you find any of the disk partitions like /dev/sdb1 or /dev/sdc1 then you need to unmount it first:
Now format the USB stick with desired file system like fat (general), ext4 (Linux) or ntfs (Windows):
the @Eduardo Cola is solving the problem but after it I got:
that was solved by:
I ran into this issue as well. I was able to get around it using sgdisk.
sudo sgdisk --zap-all /dev/sdd
I got the same error when I mistakenly selected
Format Partition
option (using the gear icon near the + sign). Then I found that theFormat Disk
option, which I needed to format the USB disk(!), was located (/hidden) under the (3 dots) menu, in the top right corner of the Disks (gnome-disks
) window.If you use a desktop version then the easiest way will be to go to the Disks tool.
delete Ubuntu 16.04 Partition 2 clicking on minus (next to start/stop and config options)
Try to format the usb now. If the error still exists, just plug it off and on again. Now you can format it without errors.
This happens to me every time I format my Ubuntu live USB back to FAT.
The solution worked for me:
Identify the device:
Re-write the device blocks:
Modify
sdX
with the appropriate device name.Then run
to format the USB flash.