LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kubuntu: Give partition permanent name (https://www.linuxquestions.org/questions/linux-newbie-8/kubuntu-give-partition-permanent-name-4175614032/)

L_Carver 09-18-2017 09:28 AM

Kubuntu: Give partition permanent name
 
I Google'd this, and found out that fstab has to be edited to make this change.

Here is my current fstab:
Code:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
# / was on /dev/sda6 during installation
UUID=574a4108-c563-4ee3-bb76-5716d6bf52f2 /              ext4    errors=remount-ro 0      1
/swapfile                                none            swap    sw              0      0]

Do I change the line beginning with UUID, or add a line similar to the one described on the page I linked to above, viz "
Code:

LABEL=Webserver /wwwdata              ext4    defaults
FYI: I'd like to have "MintInstall" as the LABEL for the partition in question.

Carver

Rickkkk 09-18-2017 09:57 AM

Hi L_Carver,

I would just use the e2label command to permanently assign a label to an ext4 filesystem partition. I wouldn't make any changes to fstab, which is dynamically read at each boot.

So for you, as root (or using sudo), if I understand your intentions correctly, you would execute this command :

Code:

e2label /dev/sda6 MintInstall
... you can check afterward if the label is assigned by simply running the e2label command on the partition without any attribute:

Code:

e2label /dev/sda6

L_Carver 09-18-2017 10:12 AM

The partition I'd like to rename is at /dev/sda1, so the command I would use is
Code:

e2label  /dev/sda1 MintInstall
Is that right? And would it be permanent (ie, the same for each session going forward)? I noticed, in one or two apps I have set to show the file path in the title bar, that both the new label and the original, /media/carver/79ae73d4-1f06-490a-899b-9addbf55f9fd, appears there. I'm presuming that this will disappear (or be ignored) when I restart or log back in. Am I correct in this presumption?

Carver

jsbjsb001 09-18-2017 10:41 AM

Quote:

Originally Posted by L_Carver (Post 5760113)
The partition I'd like to rename is at /dev/sda1, so the command I would use is
Code:

e2label  /dev/sda1 MintInstall
Is that right? And would it be permanent (ie, the same for each session going forward)? I noticed, in one or two apps I have set to show the file path in the title bar, that both the new label and the original, /media/carver/79ae73d4-1f06-490a-899b-9addbf55f9fd, appears there. I'm presuming that this will disappear (or be ignored) when I restart or log back in. Am I correct in this presumption?

Carver

Yup,

Code:

Usage: e2label device [newlabel]
Make sure your root when you run the above command.

It should be permanent after restart.

Rickkkk 09-18-2017 11:46 AM

Quote:

Originally Posted by L_Carver (Post 5760113)
The partition I'd like to rename is at /dev/sda1, so the command I would use is
Code:

e2label  /dev/sda1 MintInstall
Is that right? And would it be permanent (ie, the same for each session going forward)? I noticed, in one or two apps I have set to show the file path in the title bar, that both the new label and the original, /media/carver/79ae73d4-1f06-490a-899b-9addbf55f9fd, appears there. I'm presuming that this will disappear (or be ignored) when I restart or log back in. Am I correct in this presumption?

Carver

Hey again L_Carver,

I see jsbjsb001 has answered your questions pursuant to my previous post, so you're good there.

One detail, however: what you are calling your previous "label" is actually a UUID - a permanent identifier given to the partition at creation. It will continue to coexist with the label you will be assigning ("MintInstall", for instance). Think of the label as a nickname for the partition.

Cheers - let us know if anything else.

tofino_surfer 09-18-2017 01:19 PM

Quote:

I would just use the e2label command to permanently assign a label to an ext4 filesystem partition. I wouldn't make any changes to fstab, which is dynamically read at each boot.
If you don't make any changes to fstab then it will keep using the UUID to mount / which isn't what the OP wants. They will have to change this line to use the new fs label of course.

It should be mentioned that if you are using GPT formatting then you have the additional option of using GPT partition names instead of extn file system labels. You would set a partition name with cgdisk (best interface) or gdisk and then use PARTLABEL in your fstab.

The ArchWiki fstab page explains this well.

https://wiki.archlinux.org/index.php/fstab#GPT_labels

L_Carver 10-28-2017 10:42 AM

Bookmarks don't "survive" reboots
 
I used the e2label procedure, but I'm having trouble with bookmarks in Nemo. I use Nemo because it still shows metadata for graphic image files in its Properties windows (which for some odd reason Dolphin doesn't in my install, even with Baloo running). When I make a bookmark for a subfolder on mintinstall in Nemo, and restart, it loses the path and gives me an error message that it can't find the directory.

I guess I should use the fstab method to prevent this from happening. Am I right?

Carver

jsbjsb001 10-29-2017 11:37 AM

Quote:

Originally Posted by L_Carver (Post 5774737)
I used the e2label procedure, but I'm having trouble with bookmarks in Nemo. I use Nemo because it still shows metadata for graphic image files in its Properties windows (which for some odd reason Dolphin doesn't in my install, even with Baloo running). When I make a bookmark for a subfolder on mintinstall in Nemo, and restart, it loses the path and gives me an error message that it can't find the directory.

I guess I should use the fstab method to prevent this from happening. Am I right?

Carver

No, if I'm understanding you correctly;

You would like to create a bookmark to a particular(s) folder(s). So, you would need to make sure the folder(s) that you would like to "bookmark", exist in the file system first.

/etc/fstab is the file Linux looks at when it starts, to determine which file systems should be mounted at system start-up. This file is only for mounting file systems at system start-up. This file is also the same in all Linux distro's, as well as UNIX distro's.

L_Carver 11-04-2017 02:34 PM

Quote:

Originally Posted by jsbjsb001 (Post 5774988)
No, if I'm understanding you correctly;

You would like to create a bookmark to a particular(s) folder(s). So, you would need to make sure the folder(s) that you would like to "bookmark", exist in the file system first.

The directory is visible, and its contents are editable, if I go by the route "Devices>mintinstall>home>steve>blah_blah," starting in the right hand column when that is set to Show places. But since setting the partition's name to mintinstall, any bookmark I make of "blah_blah" is rendered invalid on each reboot. This is why I thought of using the fstab method of 'permanently' renaming my old Linux Mint partition, so such things would not happen.

I hope I'm explaining it better this time around.

Carver

DavidMcCann 11-05-2017 11:53 AM

The UUID is just a way of identifying the hardware: it refers to a specific HD, rather than to just any HD that happens to be there, as /dev/sda would. Once the disk is mounted, all normal operations will refer to it by mount point.

The same applied to a label for a HD or partition. It's just a label for the hardware, not for the directory that it's mounted on. I don't know Nemo, but I think it will expect a filing system name for a bookmark, and will only use a disk label when it specifically has to identify a device.

L_Carver 11-06-2017 09:23 AM

Tried making a change in gparted/kparted...
 
I've just applied "mintinstall" as the "mount name" in gparted and its KDE counterpart (is it still called kparted?). I haven't tried bookmarking folders on mintinstall in Nemo, but I'm presuming that when I do, they'll survive a reboot without becoming invalid. I'm also wary of having mintinstall (which is at /dev/sda1) not mount at all.

What difference/s would these changes make the next time I reboot?

Carver


All times are GMT -5. The time now is 08:08 AM.