Formatting Pen Drive causes 'Daemon Is Inhibited' Error

16,911

First, per my comment make sure that the drive isn't mounted (in case it was automounted on plugin).

Ubuntu typically automounts in /media so you can check if anything is mounted in that directory either through nautilus (or any other FS browser) or with ls /media. unmount by running the command sudo umount /media/mount-point-name. You can also check to see if the drive is mounted by opening nautilus and looking at the panel to the left. enter image description here As you can see the drive "Recovery" is currently mounted, clicking on the eject symbol would unmount the drive. A third way to check would be to run the command df -h which lists mounted filesystems (the -h just displays the drive size in human readable form), if the drive is mounted somewhere other than /media or nautilus refuses to unmount you can use the information there to find where it is mounted. As shown in this screen shot, df tells me that the drive /dev/sda7 which is a 4.6GB filesystem is mounted at /media/Recovery

enter image description here

Ok, Now moving on. The "standard" filesystem for linux/unix (excluding OSX) is ext2. However, reading it on other platforms is a little problematic (requires extra drivers for OSX and windows). Ext3 and Ext4 support is even worse. Typically, drives that are required to be shared between different systems are formated in FAT32, the "defacto" universal filesystem. Disk Utility should be able to format Fat32 (make sure that is the filesystem you pick when prompted), but if the above steps fail to fix Disk Utility there are plenty of ways around it.

Personally I prefer to use gparted which is a fairly powerful partitioning utility (actually a GUI wrapper around parted). Install gparted by running sudo apt-get install gparted or by using ubuntu software center. Run gparted either through the terminal (sudo gparted - sudo because we need root privileges to modify filesystems) or a shortcut is typically under System->Administration->Gparted in the Ubuntu (non-unity) task bar.

enter image description here

With Gparted open, in the top right select the drive that corresponds to your USB drive. If there are any filesystems on the drive (for me /dev/sda is the only drive and it has 5 partitions they will be listed in the area below. Delete all the partitions on the USB drive (right click on each one and select delete). What will be remaining is a "unallocated" partition the size of your drive, right click on it and select new.

enter image description here

In the popup box make the partition the full size of the drive and make sure to select FAT32 under filesystem. After closing the dialog, click the checkmark in the top right to write the changes to disk (NOTE: MAKE SURE YOU ARE MODIFYING THE RIGHT DRIVE, CHANGING THE PARTITION TABLE AND FORMATING OF YOUR MAIN DRIVE BY ACCIDENT COULD BE DISASTROUS)

EDIT: If fat32 is not an available option for gparted/DiskUtility make sure that that the package dosfstools is installed.

Share:
16,911

Related videos on Youtube

Luis Alvarado
Author by

Luis Alvarado

System Engineer Social Engineer Master in Pedagogy Master in Open Source CCNA Certified Linux Foundation Certified Former Askubuntu Moderator Stack Careers | Linkedin | Launchpad | Ubuntu Wiki - Random SE Stuff - Latin American Members | JC Race Award | Human Robot Award 74

Updated on September 18, 2022

Comments

  • Luis Alvarado
    Luis Alvarado almost 2 years

    Am trying to format a drive with Disk Utility and everytime i try to format this pen drive i get 'Daemon Is Inhibited' error. How can it be solved since the pen drive works on other PCs with no problem.

    UPDATE
    The device is not mounted.
    The device is one of those usb pen drives with U3 support.
    It is a Sandisk 8GB Pen drive with Fat32 Partition.

    • crasic
      crasic about 13 years
      Is the drive mounted perchance? The daemon might be blocked from modifying the file system if the drive is mounted
    • Luis Alvarado
      Luis Alvarado about 13 years
      Updated to include any relevant questions. Thanks crasic
    • nilsonneto
      nilsonneto about 13 years
      have you come across this thread? Maybe sudo killall udisks or some of the other suggestions will work? ubuntuforums.org/showthread.php?t=1604563&page=2
    • Lekensteyn
      Lekensteyn about 13 years