1

I've been having trouble getting gparted to run. I'd like to format a usb stick. . . but when I attempt to load gparted it endlessly cycles through "scanning all devices". This is a fresh Ubuntu 18.04 install on a Dell Latitude 5290, in case that helps.

Gparted does the same regardless of the usb stick being inserted or not.

When I run gparted from "sudo gparted" the output is:

Unit -.mount does not exist, proceeding anyway
Gtk-Message: 12:31:43.801: Failed to load module "canberra-gtk-module"
==============
libparted: 3.2
==============

The GUI comes up with the scanning animation on the bottom bar. And that's all that happens.

edit:

I should add, this is not just a gparted problem. When I run "sudo fdisk -l", fdisk starts listing my drives, but when it gets to /dev/sdc it freezes. Even a ^c won't get me out of fdisk. "sudo killall fdisk" does not kill the fdisk task.

The "Disks" GUI application often does not load. Attempting to run it from the command line results in the error message "GNOME-Disks-ERROR **: Error getting udisks client: Timeout was reached Trace/breakpoint trap"

When I use the gnome-disks utility to format the usb drive it gives me:

Error creating file system: Command-line `parted --script "/dev/sdd" mktable msdos' exited with non-zero exit status 1: Error: Input/output error during read on /dev/sdd
Error: Input/output error during write on /dev/sdd
 (udisks-error-quark, 0)

edit 2: I managed to get gparted to load with the usb drive inserted on one of my old LUbuntu 16.04 boxes. gparted spews out a lot of warnings. The "information" panel for /dev/sdd (it calls it sdd now) says:

/dev/sdd: unrecognised disk label
Input/output error during read on /dev/sdd
  • Is your operating system identifying a drive as /dev/hdc? Ubuntu 18.04 will usually use s instead of h. Can you create a USB boot drive in another computer/operating system and boot thie computer with problems from the USB boot drive? Please check if things work in the live system (that gparted, fdisk and gnome-disks` work). If they do not work, I would agree with @CurtisGedak, and suspect a hardware error. – sudodus Nov 13 '18 at 18:46
  • 1
    Was USB flash drive used as installer. And was dd used to create it as then it does not have standard partition table. You normally just have to erase first sector or two so you can create new partition table. https://askubuntu.com/questions/939230/formatting-a-usb-stick-unable-to-operate-usb/939266#939266 & https://help.ubuntu.com/community/mkusb#Re-use_the_pendrive – oldfred Nov 13 '18 at 18:50
  • 1
    @oldfred yes that flash drive had been used as an installer. My troubles began when I tried to format it to use for storage. I did not use dd directly, I believe I used Ubuntu 18.04's Startup Disc Creator, but perhaps that uses dd under the hood. – Ryan Budney Nov 13 '18 at 18:55
  • 1
    @suddodus: apologies, that was a typo. – Ryan Budney Nov 13 '18 at 18:56
  • Good that it's /dev/sdc :-) 1. But it would still be worthwhile to try from a live system (I suggest a live system made from an Ubuntu 18.04.1 LTS iso file); 2. I think the links by @oldfred can help you (can be done in the Lubuntu system, that you refer to in you edited question). – sudodus Nov 13 '18 at 19:09

1 Answers1

1

It is possible that there is a hardware problem with one of the hard disk drives. If this is the case, then you can run the dmesg command in a terminal and scan the output for errors related to the hard disk drives.

Another way to see if the problem is drive specific is to pass a known good hard drive to GParted. For example:

sudo gparted /dev/sda

That way only the /dev/sda hard drive will be scanned.

If the sudo fdisk -l command also hangs, then that lends more credence to the idea that there may be a hardware problem with one of the hard disk drives.

Curtis Gedak
  • 1,109
  • Thanks. On my LUbuntu 16.04 box I can get fdisk -l to run, but it does not see the USB stick. gparted sees it, but gives errors. See the revised post for details. – Ryan Budney Nov 13 '18 at 19:07
  • @RyanBudney, In Ubuntu 18.04 LTS, there is a new version of gparted, that understands the partition table and file system of ISO9660 (that is cloned from the iso file), but in 16.04 LTS, there is an older version, which thinks that the drive is corrupted, even if it is good. – sudodus Nov 13 '18 at 19:23
  • On an Ubuntu 18.04 machine I've managed to load the USB drive with gparted. gparted seems to hang when I request creation of a partition table on the device (listed as /dev/sdc). I can't kill gparted with the killall command. – Ryan Budney Nov 13 '18 at 20:32
  • The message "Input/output error during read on /dev/sdd" is indicative of a hardware error. This can be caused by something as simple as a loose connection, or be as serious as a failing drive. When this error occurs you can also run dmesg and scan the output for details regarding the error. Some disk devices support smart monitoring which can be checked with a graphical interface such as gsmartcontrol. – Curtis Gedak Nov 14 '18 at 16:35
  • Thanks Curtis. gparted and fdisk run fine on all my computers, after a fresh boot. But if I insert this USB stick, they all develop this problem. Moreover, after I remove the USB stick, the problem persists until a reboot. This USB stick used to work fine on all my computers until a system crash (while writing to the USB stick). I'll try formatting the stick on my wife's Windows computer to see if that can fix the problem. – Ryan Budney Nov 16 '18 at 00:54
  • 1
    From your description it would appear that the USB stick is failing and is ready to be retired. – Curtis Gedak Nov 16 '18 at 23:11
  • Hi Curtis, yes I strongly suspect you are right. It's a little frustrating that the tools in Ubuntu are not robust enough to handle this situation with grace. Ideally they would offer up an analysis instead of applications freezing. I'll accept this as an answer although I am not certain what the problem is. Windows similarly has problems with this USB stick, although none of the Windows apps freeze. They just complain they can't read the USB stick. – Ryan Budney Nov 26 '18 at 22:55