I am using Ubuntu 16.04 (it's a dual boot to windows 10 if that matters) I could also do the renaming process on my mac. Also note that Ubuntu is on my computer hard drive, not the external.

I have an external hard drive with two partitions. One of them contains a large amount of important data (it would be difficult for me find a place to save this data while I do the partition). The other is empty.

I need to rename one of them (it can be the empty one) because they both have spaces in the name and this is interfering with some software and scripts I need to use.

Essentially, I want to know if it possible to rename the partition safely without backing up my files and, if so, how?

  • Please remember to accept my answer if it was helpful. Thanks! – heynnema Feb 20 at 14:17

As far as I know, renaming a partition, even if not empty, should not effect the data on it. Just be careful to rename, not repartition or reformat.

Look here for how to rename from either a GUI or terminal


There are a number of ways to re-label a partition. To cure your problem, remove the spaces in the label name, and replace them with "_" (underscores). ie: New_Label

Note: Keep in mind that changing labels may cause problems in scripts, mount points, /etc/fstab, or commands that require path names.

Note: File/disk backups are always a good idea.

In the terminal...

sudo tune2fs -L new_label /dev/sdaX # change the sdaX to the proper partition number

In gparted...

right-click on a partition and choose "Label File System"

In Disks...

from a pull-down menu and choose "Edit Filesystem Label"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.