Score:2

Can I relabel /, /home, and /boot/efi partitions without problems?

in flag

I am running Ubuntu Studio 21.04 & plasma, with separate partitions for root(system), home, and another for encryption with veracrypt.

I'd like to label(relabel) the root, home, and boot/efi partitions without data loss or other problems. Is this possible, via running a live usb and using gparted or kde partition manager ? Or via another approach without use of a live usb?

Thanks in advance.

es flag
I do not believe it's possible, not without serious issues. Why not creating symbolic links to these destinations ?
Nmath avatar
ng flag
What do you mean by "relabel"? Do you mean you want to change the path? Can you give us an example use case where this would be necessary or useful? You cannot change the path of `/`. You might be able to technically change the paths of other directories, but this is a really bad idea to try to change the names of system directories. It's better that you learn how to use the UNIX file paths than try to fight against it
erik avatar
in flag
Thanks. The destination/paths remain the same. I only want to relabel the partitions, so I can see the partition names that I prefer in a gui app or use the label to mount a directory via terminal.
gi flag
Usually linux uses UUID to identify partitions. See /etc/fstab. Then you can change the partitions' labels. I have done it without problems. You will need to use a live USB.
erik avatar
in flag
Thanks Jean-Marie. Yes, I have looked into the fstab file and have seen the UUID. I am under the impression fstab can also use labels (though looking at the man page for fstab this is perhaps not the preferred method). Have you been able to change the labels for a root partition and also a different home partition via live usb with no problems ? Thanks agaiin.
gi flag
Yes. see my answer below. fstab can use labels but it is not recommended.
mook765 avatar
cn flag
The [answer](https://askubuntu.com/a/1074408/590937) to [this question](https://askubuntu.com/q/1074372/590937) is exactly what you need. I don't say it's a duplicate, the question is totally different, but the answer shows what you need to do without using a live-USB.
mook765 avatar
cn flag
BTW, I always use LABEL or PARTLABEL in fstab, it just makes the file human-readable, no confusion with random long strings that doesn't tell you anything about the content of a partition. Just same rule as UUID, don't use the same label for different partitions, they must be uniqe.
erik avatar
in flag
Thanks mook765.
Score:4
gi flag

Yes you can label or relabel your partitions as long as you do not use labels in /etc/fstab. You will have to use a live USB. I just labeled my root partition.

It is a good way to know what is what when working with a partition editor.

P.S. I tried again without a live USB: success using gnome-disks.

erik avatar
in flag
Thanks much, Jean-Marie. Relabeling both root and home partitions worked without a problem.
erik avatar
in flag
Re relabeling /boot/efi, I'll leave that alone as it seems safer. When installing ubuntu the default label was 'NO_LABEL' and I left it alone. Maybe I should have changed it then, as there might be a reason it had a default ; the other partitions defaulted without any names, and I should have labeled them at that time.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.