Ubuntu – How to rename partitions

12.10hard drivepartitioningunity

I'm new at Ubuntu; I installed Ubuntu 12.10 and the partitions appear like 30 GB volume and like 78EF-2C5E in task bar. I tried to rename it but rename and remove buttons are deactivated so I tried by using disks but it gives me error:

(Error setting label: Command-line `mlabel -i "/dev/sdb8" ::"windows"' exited with non-zero exit status 1: Total number of sectors (18550784) not a multiple of sectors per track (63)!
Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
 (udisks-error-quark, 0))

and this happen also to any attached usb to my laptop.

Best Answer

  • From the graphical desktop ( >= 12.10)

    There is no need to run gparted only to give a partition a label. Just open Disks from the Dash:

    enter image description here

    Select the drive on the left panel and choose the partition to label in the volumes section. Then click on the highlighted area with the cogwheels for "More Actions" to reveal the menu shown above. This will let you "Edit Filesystem Label..." for the selected partition.

    From the graphical desktop ( <= 12.04 LTS)

    For release 12.04 LTS and earlier the application Disk Utility can be used for editing partition labels:

    enter image description here

    Note: after we had changed a label we may have to edit our fstab with the new label in case we mount disks by label.

    From the command line

    Replace /dev/sdxN with your partition (e.g. /dev/sdc1).

    • for FAT32:

        sudo mlabel -i /dev/sdxN ::"my_label"


        sudo fatlabel /dev/sdxN my_label
    • for NTFS:

        sudo ntfslabel /dev/sdxN my_label
    • for exFAT:

        sudo exfatlabel /dev/sdxN my_label
    • for ext2/3/4:

        sudo e2label /dev/sdxN my_label
    • for BTRFS:

        sudo btrfs filesystem label /dev/sdxN my_label
  • Related Question