Improper blocksize set by usb-creator, leads to problems during formatting

Bug #1589028 reported by Vishwa Prakash H V
460
This bug affects 109 people
Affects Status Importance Assigned to Milestone
parted (Debian)
Fix Released
Unknown
parted (Ubuntu)
Confirmed
High
Unassigned

Bug Description

When ever I create a bootable USB using usb-creator , and when I try to format it after my work is done, I get this error

“The Driver descriptor says physical block size is 2048 bytes, but Linux says it is 512” in Gparted. (screen shot in the attachments)

Furthermore , The USB is divided into strange partitions (image attached). and shows the 16GB partition as 60GB partition.

I presume that this is because of setting the blocksize to 1000000 by this tool : as in the source code here : https://bazaar.launchpad.net/~usb-creator-hackers/usb-creator/trunk/view/474/bin/usb-creator-helper#L111

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: usb-creator-gtk 0.3.2
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Jun 4 08:53:43 2016
InstallationDate: Installed on 2016-05-30 (4 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: usb-creator
UpgradeStatus: No upgrade log present (probably fresh install)
UsbCreatorLog:
 usb-creator 2016-06-04 08:53:29,852 (DEBUG) backend.py:24: UDisks2Backend
 usb-creator 2016-06-04 08:53:30,152 (DEBUG) backend.py:64: detect_devices
 usb-creator 2016-06-04 08:53:30,157 (DEBUG) backend.py:104: drive added: /org/freedesktop/UDisks2/block_devices/sr0
 usb-creator 2016-06-04 08:53:30,157 (DEBUG) backend.py:118: not adding device: 0 byte disk.
 usb-creator 2016-06-04 08:53:32,702 (DEBUG) backend.py:181: cancel_install

Revision history for this message
Vishwa Prakash H V (severustux) wrote :
Revision history for this message
Vishwa Prakash H V (severustux) wrote :

Related information given here : http://askubuntu.com/q/781223/497359

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in usb-creator (Ubuntu):
status: New → Confirmed
Changed in usb-creator (Ubuntu):
importance: Undecided → High
Revision history for this message
rtimai (rtimai) wrote :

~$ uname -a
Linux HP-Pavilion-dv6 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I have encountered the block size error also, and used another tool (forget which) to repair my USB drive. Additional information -- Warnings displayed when checking version number:

~$ usb-creator-gtk --version
/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/frontend.py:23: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gdk
/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/frontend.py:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/unitysupport.py:27: PyGIWarning: Unity was imported without specifying a version first. Use gi.require_version('Unity', '7.0') before import to ensure that the right version gets loaded.
  from gi.repository import Unity
/usr/lib/python3/dist-packages/usbcreator/backends/udisks/backend.py:4: PyGIWarning: UDisks was imported without specifying a version first. Use gi.require_version('UDisks', '2.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gio, GLib, UDisks
0.2.23

For the record, I get the same error when using sudo as well, to display usb-creator version number.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for reporting this issue, but this isn't an issue with usb-creator.

1000000 is in fact an acceptable number for the _builtin_dd() function and has nothing to do with the error message you are seeing in Gparted.

Gparted is confused with the special way the bootable image is created to make it work with both legacy machines, macs, and UEFI machine.

I'm reassigning this bug to the parted package, where the problem actually lies.

affects: usb-creator (Ubuntu) → parted (Ubuntu)
Changed in parted (Debian):
status: Unknown → Fix Released
Revision history for this message
Ken Mollerup (kenmollerup) wrote :

I think its the new kernel, because the inbuilt command dd results in the same errors when trying to reclaime after use, or when we use gparted during installation, trying to set bs do not seem to make any difference!!

Revision history for this message
druidaobelix (druidaobelix) wrote :

The problem persists, tested in Ubuntu 16.04 and 16.10 with equal results, still unresolved.

Revision history for this message
Aptivi (eofla) wrote :

I did it on Ubuntu Server ISO using usb-creator-gtk, using my general USB flash drive and its size is 8GB, and it did the same thing so I deleted the culprit partition using Gparted, and no errors like that is displayed and it removed the partition completely, then, I was able to create the FAT32 partition. From now on, I have to use Rufus, the perfect tool on Windows.

usb-creator-gtk tried to set the flash drive's partition into ISO 9660, which means it is not recognized by some systems, and is read only. I removed the partition completely that is ISO 9660, then I formatted it on FAT32 (partition size is 7.6GB after ISO 9660 removal).

So I suggest everyone who wants to create a Ubuntu flash drive must use Rufus, or Universal USB Creator, until this bug is fixed to avoid damage to your USB flash drive's partition.

Some users (like me) have this bug but they are able to remove the culprit, iso9660 partition and recreating the FAT32, useful, read and write partition. Others have this bug but they are not be able to remove the culprit, iso9660 partition and shows that error.

Revision history for this message
WinEunuchs2Unix (ricklee518) wrote : Re: [Bug 1589028] Re: Improper blocksize set by usb-creator, leads to problems during formatting
Download full text (3.5 KiB)

Can't you use `dd if=/dev/zero of=/dev/sdX count=100` to wipe out MBR and
partition table? Then gparted will just see a new drive. Note sdX = sdb,
sdc or whatever your flash drive is.

On Fri, Jan 27, 2017 at 4:55 AM, EoflaOE <email address hidden> wrote:

> I did it on Ubuntu Server ISO using usb-creator-gtk, using my general
> USB flash drive and its size is 8GB, and it did the same thing so I
> deleted the culprit partition using Gparted, and no errors like that is
> displayed and it removed the partition completely, then, I was able to
> create the FAT32 partition. From now on, I have to use Rufus, the
> perfect tool on Windows.
>
> usb-creator-gtk tried to set the flash drive's partition into ISO 9660,
> which means it is not recognized by some systems, and is read only. I
> removed the partition completely that is ISO 9660, then I formatted it
> on FAT32 (partition size is 7.6GB after ISO 9660 removal).
>
> So I suggest everyone who wants to create a Ubuntu flash drive must use
> Rufus, or Universal USB Creator, until this bug is fixed to avoid damage
> to your USB flash drive's partition.
>
> Some users (like me) have this bug but they are able to remove the
> culprit, iso9660 partition and recreating the FAT32, useful, read and
> write partition. Others have this bug but they are not be able to remove
> the culprit, iso9660 partition and shows that error.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1589028
>
> Title:
> Improper blocksize set by usb-creator, leads to problems during
> formatting
>
> Status in parted package in Ubuntu:
> Confirmed
> Status in parted package in Debian:
> Fix Released
>
> Bug description:
> When ever I create a bootable USB using usb-creator , and when I try
> to format it after my work is done, I get this error
>
> “The Driver descriptor says physical block size is 2048 bytes, but
> Linux says it is 512” in Gparted. (screen shot in the attachments)
>
> Furthermore , The USB is divided into strange partitions (image
> attached). and shows the 16GB partition as 60GB partition.
>
> I presume that this is because of setting the blocksize to 1000000 by
> this tool : as in the source code here : https://bazaar.launchpad.net
> /~usb-creator-hackers/usb-creator/trunk/view/474/bin/usb-creator-
> helper#L111
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: usb-creator-gtk 0.3.2
> ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
> Uname: Linux 4.4.0-22-generic x86_64
> NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
> ApportVersion: 2.20.1-0ubuntu2.1
> Architecture: amd64
> CurrentDesktop: Unity
> Date: Sat Jun 4 08:53:43 2016
> InstallationDate: Installed on 2016-05-30 (4 days ago)
> InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64
> (20160420.1)
> SourcePackage: usb-creator
> UpgradeStatus: No upgrade log present (probably fresh install)
> UsbCreatorLog:
> usb-creator 2016-06-04 08:53:29,852 (DEBUG) backend.py:24:
> UDisks2Backend
> usb-creator 2016-06-04 08:53:30,152 (DEBUG) backend.py:64:
> detect_devices
> usb-cre...

Read more...

Revision history for this message
Dmitry Vasiliev (scythargon) wrote :

+1 here

Revision history for this message
Leszek (l-p-pryszcz) wrote :

Try UNetbootin instead (sudo apt install unetbootin).

Revision history for this message
Karel Suchomel (suchomel.k) wrote :

+1 here. Did exactly what 'Vishwa Prakash H V' described and had the same problem. On Ubuntu 16.04.1

Revision history for this message
WinEunuchs2Unix (ricklee518) wrote :

Simply use `dd` to write out 512 bytes (bc=1) of zeros (if=/dev/null) to your usb drive (of=dev/sdX) where X=the drive letter ***BE VERY CAREFUL 'X' IS RIGHT LETTER*** then you can reformat it using `gparted`.

Revision history for this message
Pat Callahan (pat-callahan1) wrote :

Workaround:

Eject the disk
Remove the disk from the USB slot
Plug it back in
Create your partition.

Revision history for this message
Pat Callahan (pat-callahan1) wrote :

Apologies. Looking for a workaround, thought I found on. was mistaken. Delete my comment if you can.

tags: added: zesty
Revision history for this message
ALU (c-launchpadmail) wrote :

+1 here. On Ubuntu 17.04

Revision history for this message
Petteri Kähärä (kpetteri) wrote :

+1, Ubuntu 16.04.1

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

+1, Ubuntu 16.04.3

Revision history for this message
Sirgienko Nikita (mmmm98) wrote :

+1

Revision history for this message
Simon P. (simpre) wrote :

There are still some problems with the startup disk creator in Ubuntu 18.04, not sure if they relate to this bug or are a separate issue. When trying to reformat the bootable usb stick, it is not possible with nautilus or gnome disks, the error "udisks-error-quark, 0" is shown. Gparted reformats the stick without any problem though.

Revision history for this message
sudodus (nio-wiklund) wrote :

The problem is that some tools do not recognize the hybrid iso file's internal structure when cloned to a USB drive. This has been a standard for iso files that can be cloned to CDs, DVDs and USB drives (actually any mass storage drives including memory cards SSDs and HDDs).

The Ubuntu Startup Disk creator is only doing the cloning job like several other tools and should not be blamed for this problem.

Fortunately new versions of gparted can recognize USB drives that are cloned from hybrid iso files.

There is an easy fix, if you want to use other tools: mkusb has a dedicated menu option to restore the USB pendrive to a standard storage device,

https://help.ubuntu.com/community/Installation/FromUSBStick#Postrequisites_-_restore_the_USB_stick

Revision history for this message
sudodus (nio-wiklund) wrote :

Correction of the previous post (about hybrid iso files)

This has been a standard for iso files that can be cloned to CDs, DVDs and USB drives *during several years, at least since Ubuntu 12.04 LTS*.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Phillip Susi (psusi)
affects: parted → ubuntu
Changed in ubuntu:
status: New → Confirmed
Phillip Susi (psusi)
no longer affects: ubuntu
Revision history for this message
duocore (duocore-787) wrote :

When i launch usb-creator-gtk :

~$ usb-creator-gtk --version
Traceback (most recent call last):
  File "/usr/bin/usb-creator-gtk", line 28, in <module>
    from usbcreator.frontends.gtk import GtkFrontend
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/__init__.py", line 1, in <module>
    from usbcreator.frontends.gtk.frontend import GtkFrontend
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/frontend.py", line 31, in <module>
    from usbcreator.frontends.gtk.unitysupport import UnitySupport
  File "/usr/lib/python3/dist-packages/usbcreator/frontends/gtk/unitysupport.py", line 28, in <module>
    gi.require_version('Unity', '7.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Unity not available
I have a bug : not work

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.