LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2017, 09:28 AM   #1
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 225

Rep: Reputation: Disabled
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
 
Old 09-18-2017, 09:57 AM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,113

Rep: Reputation: 421Reputation: 421Reputation: 421Reputation: 421Reputation: 421
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
 
1 members found this post helpful.
Old 09-18-2017, 10:12 AM   #3
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 225

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-18-2017, 10:41 AM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,121

Rep: Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598
Quote:
Originally Posted by L_Carver View Post
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.

Last edited by jsbjsb001; 09-18-2017 at 10:43 AM.
 
1 members found this post helpful.
Old 09-18-2017, 11:46 AM   #5
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec, CANADA
Distribution: Arch
Posts: 1,113

Rep: Reputation: 421Reputation: 421Reputation: 421Reputation: 421Reputation: 421
Quote:
Originally Posted by L_Carver View Post
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.
 
1 members found this post helpful.
Old 09-18-2017, 01:19 PM   #6
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 360

Rep: Reputation: 102Reputation: 102
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
 
Old 10-28-2017, 10:42 AM   #7
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 225

Original Poster
Rep: Reputation: Disabled
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

Last edited by L_Carver; 10-28-2017 at 10:45 AM. Reason: Added a detail
 
Old 10-29-2017, 11:37 AM   #8
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: Currently OpenMandriva. Previously openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,121

Rep: Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598Reputation: 1598
Quote:
Originally Posted by L_Carver View Post
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.
 
1 members found this post helpful.
Old 11-04-2017, 02:34 PM   #9
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 225

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jsbjsb001 View Post
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

Last edited by L_Carver; 11-04-2017 at 02:36 PM.
 
Old 11-05-2017, 11:53 AM   #10
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Xubuntu
Posts: 5,322

Rep: Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825Reputation: 1825
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.
 
1 members found this post helpful.
Old 11-06-2017, 09:23 AM   #11
L_Carver
Member
 
Registered: Sep 2016
Location: Webster MA USA
Posts: 225

Original Poster
Rep: Reputation: Disabled
Unhappy 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

Last edited by L_Carver; 11-06-2017 at 09:24 AM. Reason: Removed an unnecessary clause.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permanent partition mount Latman Linux - Newbie 3 07-18-2012 05:13 PM
making second partition permanent & booting abrand888 MEPIS 3 08-05-2005 04:03 PM
How to give permission to /home partition Micro420 Linux - General 3 05-09-2005 05:49 PM
Quick question about much i should give each partition?... NeoX51 Linux - Newbie 2 06-11-2004 09:04 AM
How can I permanent mount an exixting Partition mwj Linux - General 9 01-23-2004 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration