4

I've been doing some work with various USB drives and have been using Gparted to do so. However, for no apparent reason, gparted no longer starts.

If I open the graphical application, I authenticate with my password and then nothing happens.

If I run sudo gparted. I get:

mount: wrong fs type, bad option, bad superblock on /run/udisks2/inhibit-polkit, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so

When I run dmesg I get:

[ 1225.545050] usb 2-1: new high-speed USB device number 23 using xhci_hcd
[ 1225.568016] usb 2-1: New USB device found, idVendor=0781, idProduct=5583
[ 1225.568027] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1225.568033] usb 2-1: Product: Ultra Fit
[ 1225.568038] usb 2-1: Manufacturer: SanDisk
[ 1225.568042] usb 2-1: SerialNumber: 4C531001390502102383
[ 1225.570640] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 1225.572092] scsi8 : usb-storage 2-1:1.0
[ 1226.571712] scsi 8:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[ 1226.572353] sd 8:0:0:0: Attached scsi generic sg1 type 0
[ 1226.574166] sd 8:0:0:0: [sdb] 242614272 512-byte logical blocks: (124 GB/115 GiB)
[ 1226.577102] sd 8:0:0:0: [sdb] Write Protect is off
[ 1226.577115] sd 8:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 1226.578691] sd 8:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1226.596148]  sdb: sdb1
[ 1226.600044] sd 8:0:0:0: [sdb] Attached SCSI removable disk
[ 1226.886103] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[ 1237.359985] sdb: detected capacity change from 124218507264 to 0
[ 1251.998948] usb 2-1: USB disconnect, device number 23

I left out the top part because it doesn't contain much, or so I think. What I find curious is that the SanDisk Ultrafit listed here is not actually inserted into any usb drive and hasn't been for a few hours. This was one of the drives I was formatting.

Why is it still showing up here and does this have something to do with this? Should I somehow explicitly unmount it? I've read where Gparted does this in some instances where some part of the file system of a drive is not understood.

How should I proceed to be able to run gparted again?

Thanks!

2
  • You should use gksudo.
    – jasonwryan
    Commented Oct 22, 2017 at 21:35
  • Using gksudo offers the same issue. Commented Oct 22, 2017 at 22:45

3 Answers 3

2

To troubleshoot, carefully run gparted on a disk known to be working, for example gparted /dev/sda -- just to see if the GUI starts correctly. If that works, close gparted without changing anything.

If the problem is the gparted software, reboot from your favorite Linux bootCD, (or live USB), one that does have a working gparted, and test any questionable drives from there.

But if gparted started correctly on /dev/sda, then the fault is in the USB drive(s). Then, maybe:

  1. the USB drive's partition table is corrupt. If the data is important, back it up with gddrescue, then see if gpart can guess where the partitions should be, and proceed accordingly.

  2. the table is in some newer format that gparted doesn't know about,

  3. there might be no partition table at all, the whole disk might be one file system. In which case try mounting it. The dmesg output seems to suggest that it is mounted.
1
  • Thanks for your post! I just tried to run gparted on a usb drive that I know works using gparted /dev/sdX but get the same error message. I am concerned because even if no USB drives are inserted I can't start the gparted GUI in any way. Any other thoughts? Commented Oct 22, 2017 at 23:14
0

If you are using VMWorkstation:

I once used GParted to enlarge my /dev/sda1 (Ubuntu 14.04 64). Here is what I have done:

  1. Download GParted ISO source (SourceForge).

  2. Go to Settings, find CD/DVD(SATA), click on using ISO file, and add the ISO which you just downloaded.

  3. Start the system and KEEP PRESSING F2 (check it, maybe different, this one is difficult, you have to do this fast), or click on the green arrow, choose the POWER ON TO BIOS (recommended).

  4. Choose BOOT, and move the CD-ROM drive to the first one, press F10 save and exit.

  5. Now wait for a second and you are in GParted live. (Be careful changing memory.)

0

@chronic788 I had the same pb. in my case after upgrading gparted from a Launchpad PPA repository.

Although my /dev/sdc disk is fine, gparted complains :

$ sudo -b gparted /dev/sdc
 mount: wrong fs type, bad option, bad superblock on /run/udisks2/inhibit-polkit,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

My analysis :

gparted is a bash script that does a few checks before calling gpartedbin, so I can search for udisks2.inhibit inside the gparted script :

$ grep /usr/.*/udisks2.inhibit $(which gparted)
if test -x "/usr/lib/udisks2/udisks2-inhibit"; then
    /usr/lib/udisks2/udisks2-inhibit $BASE_CMD
$ grep "\bmount" $(locate /udisks2-inhibit | head -1) | tail -1
mount --move /run/udisks2/inhibit-polkit "$DIR"

The mount --move /run/udisks2/inhibit-polkit $DIR command was the one responsible here for the above error.

My workaround is to temporally disable (only for 1 second) udisks2-inhibit and then re-enable it right after gparted is launched in the background (sudo -b), hence the sleep 1 command :

$ sudo chmod -v -x /usr/lib/udisks2/udisks2-inhibit;sudo -b gparted /dev/sdc;sleep 1;sudo chmod -v +x /usr/lib/udisks2/udisks2-inhibit
mode of ‘/usr/lib/udisks2/udisks2-inhibit’ changed from 0755 (rwxr-xr-x) to 0644 (rw-r--r--)
======================
libparted : 2.3
======================
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
mode of ‘/usr/lib/udisks2/udisks2-inhibit’ changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .