0

I dual booted my laptop and used a memory stick to do this. Now that I am finished, I am in ubuntu, and want to be able to reuse said memory stick. Just clicking format and changing it brings up an error. How do I do this? Thanks in advance.

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

PolkaDot
  • 103

3 Answers3

3

If your USB stick was made using Startup Disk Creator, the partition format is read only ISO9660.

Some formatting utilities do not handle ISO9660 very well.

The easiest method I have found to recover such drives is by using the Wipe function in mkusb.

mkusb / wipe | Ubuntu Community Help Wiki

I generally wipe the first MB then create a new MSDOS partition table and a partition with the FAT32 file system.

C.S.Cameron
  • 19,519
1

Open the Disks Application and select the drive in questions then in the upper right hand corner click on the dropdown menu and it should give you the option to reformat and erase the drive. You will need to create a new partition during this process.

Alternatively you can download and install GParted to do the same thing.

sudo apt-get install gparted

You will need to create a new partition on the drive after erasing it if you used GParted or Disks (Credit to Yamboy1)

Please be sure that you are selecting the correct drive when doing this, you do not want to accidentally reformat your hard drive.

Robby1212
  • 880
  • 3
    If there is an error in gparted such as block size is 2048, then you need to use dd if=/dev/null of=sdX bc=1 to erase MBR in order to reset from GPT format used by some live USB ISO's. Where X is the drive letter of the USB. BE VERY CAREFUL and double check X is not the drive letter of your HDDs or SSDs. – WinEunuuchs2Unix May 28 '17 at 12:03
0

Try gparted first as others have suggested. If that doesn't work, you can try what I've written below, which will reformat your USB as a single partition.

Type lsblk -p. This will give you a list of all of the partitions Ubuntu sees along with the full path to where they're mounted. It should look like this: enter image description here In my case, the USB corresponds to /dev/sdb. Yours may differ. Note that at the end of mount point line for the USB is the USB's name. You can verify this by opening Nautilis ('Files' in Ubuntu) and checking your USB's name. Note that in my screenshot /dev/sda contains branches to /dev/sda1, /dev/sda2, etc. These branches are partitions. You should unmount these before continuing. You can do so by typing umount /dev/sdxx, where the first x is the letter after sd and the second x is the partition number. Once all of the partitions have been unmounted type mkfs.vfat /dev/sdx. NOTE: Substitute x with the letter that you used when unmounting the partitions. This process should reformat your USB as a single partition with the vFAT file system. vFAT is an improved version of FAT and is backward compatible.