View Full Version : Changing partition label
docJ
April 10th, 2013, 12:27 PM
Hi,
now that I am almsot done filling up my internal data drives, I realize I do not like the labels I've given them previously; when accessed from other computers in my network, it could get confusing to have network drive name similar to local's
I do not want to break anything, so how do I proceed (in which order) to rename my Ubuntu internal data drive, considering they are "auto-mounted", have been "chown-ed" and they are samba shared?
Thanks
fantab
April 10th, 2013, 12:53 PM
You can change the labels with "DISKS" Utility. You have to unmount the partitons first, if they are mounted. However, I don't think you can change the label of the Disk itself. (I am not sure about this, so you can ask to confirm).
If you want to change the Label of Ubuntu '/', that is in use, then use LiveDVD/USB.
docJ
April 10th, 2013, 03:39 PM
If you want to change the Label of Ubuntu '/', that is in use
If you mean Home directory (the data partition on the OS drive), I can live with it. I am just concerned about the other hdd's used solely for data.
Will changing the drive label affect auto mounting feature?
fantab
April 10th, 2013, 05:46 PM
I repeat: I don't think we can change the "Drive Label". By 'Drive' I mean HDD. What we can change are the 'Partition' Labels.
By Ubuntu '/' , I mean the 'OS partition which has your system files'. We can change the the label of '/home' after unmounting it from within the running ubuntu, IF '/home' is a separate partition.
No... changing the 'partition' labels will NOT affect the mounting feature... (unless you have manually created/edited /etc/fstab to use Labels instead of UUIDs).
schragge
April 10th, 2013, 06:28 PM
I've just tried to change the label on a mounted ext4 partition and it worked:
sudo e2label /dev/sda5 new_label The partition was mounted by device name, not by label.
docJ
April 10th, 2013, 06:50 PM
My bad: when I wrote drive label, I meant partition label, as my data drives are singled partitioned.
So when I open Disk utility, I need to unmount the partition, & then I am guessing I can rename it from there (?)
docJ
April 11th, 2013, 12:03 AM
The partition labels have been changed on the Ubuntu side, they now show up with their new names, so on the Ubuntu's side, all is well.
When I go on my Win7 pc, click on Computer, the Network, then the Ubuntu pc, I see all data drives, but with former labels. I rebooted Windows but it still shows me the old name...
Is this cause by Windows itself or by Samba not "broadcasting" the updated labels?
docJ
April 11th, 2013, 12:24 AM
Actually, all is not that well on Ubuntu side.
My 3 data drives show up auto-mounted (with their new labels) in that left side "desktop taskbar" (sorry forgot the actual name). Also, when I click the Files folder shortcut (also on the desktop tasbar), I see my 3 data drives mounted and showing up again with updated labels. However, if I use disk utility, they still show up with former names.
I have to admit I ran into an issue trying to unmount within "disk", I was getting exit code 1; only root can unmount
I googled that & found someone that managed to unmount, relabel and remount with Gparted instead (this is what I did)
docJ
April 11th, 2013, 12:32 AM
To go around last issue, I found you need to run disk as
gksudo palimpsest
I am able to unmount, but when I click edit filesystem label, the "new" name is already there; it seems no matter what I label it to, once I remount it, it still shows up in Disk with former label
I guess I need help...
docJ
April 11th, 2013, 12:36 AM
I better clarify my last post.
In Disk utility window, on the left side, just above mount/unmount button, I do see the updated label.
But on the right side the mount point (above Format volume button) shows the former
I guess I do not understand the difference between partition label and mount point, except they "should" show the same name, or at least for my purpose...
bab1
April 11th, 2013, 12:55 AM
Let's see what you have right now. Post the output of this terminal command
sudo blkid -c /dev/null -o list
Put the output between
blocks (using the # icon at the top). That way it's formatted and easy to read. Here is what mine looks like:[CODE]device fs_type label mount point UUID
---------------------------------------------------------------------------------------------------
/dev/sda1 ext4 / c4807753-7a09-4d0a-8052-bf96c1f81d40
/dev/sda2 swap <swap> 69e4c9c7-a439-416d-85a9-c79162983068
/dev/sda3 ext4 /home 46a258bf-6ace-4d52-b4d7-db47e7b3de7b
docJ
April 11th, 2013, 01:03 AM
This is what I get:
device fs_type label mount point UUID
-------------------------------------------------------------------------------
/dev/sda1 ext4 / dd45ac45-5856-4fed-9747-77d73c1be122
/dev/sda5 swap <swap> 1cf17074-3d96-49c2-89b3-11ec33498e90
/dev/sda6 ext4 /home 77d98a43-673a-458e-83fd-a34bb24147a9
/dev/sdb1 ext4 t2 /media/b 9d1b8994-ab09-4d39-8db5-732ac340a791
/dev/sdc1 ext4 U2 /media/c e4cb3ab6-1be1-4cbd-b01e-62e425c916bf
/dev/sdd1 ext4 V2 /media/d 9398f40a-c0b9-4fe9-9993-afb0cbe8bcbd
Where t2, u2, and v2 are the names I wish to see cross-platform
docJ
April 11th, 2013, 01:09 AM
Do I need "labels" at all?
When I acces from other computer, I seem to see the last part of the mount point (b, c and d) ; I guess its the only thing that need to tbe updated
bab1
April 11th, 2013, 01:09 AM
What do you mean by "wish to see cross-platform " ?
bab1
April 11th, 2013, 01:11 AM
Do I need "labels" at all?
When I acces from other computer, I seem to see the last part of the mount point (b, c and d) ; I guess its the only thing that need to tbe updated
My point exactly.
Edit: The label is only for you to use on the local machine (such as to mount the partition in fstab or some such).
I would be more inclined to make sure Samba shares were named appropriately.
docJ
April 11th, 2013, 01:13 AM
What do you mean by "wish to see cross-platform " ?
As per post#7,
The partition labels have been changed on the Ubuntu side, they now show up with their new names, so on the Ubuntu's side, all is well.
When I go on my Win7 pc, click on Computer, the Network, then the Ubuntu pc, I see all data drives, but with former labels. I rebooted Windows but it still shows me the old name...
bab1
April 11th, 2013, 01:18 AM
As per post#7,
The partition labels have been changed on the Ubuntu side, they now show up with their new names, so on the Ubuntu's side, all is well.
When I go on my Win7 pc, click on Computer, the Network, then the Ubuntu pc, I see all data drives, but with former labels. I rebooted Windows but it still shows me the old name...
The partition labels are NOT what you are seeing from the Windows side. They are the share names.
docJ
April 11th, 2013, 01:23 AM
Indeed this is what I found out, so this thread's title might have been misleading.
I guess I want to edit the share name, so that from windows, I see T2, U2 and V2 as opposed to still seeing b, c and d
How do I do that?
bab1
April 11th, 2013, 01:24 AM
Indeed this is what I found out, so this thread's title might have been misleading.
I guess I want to edit the share name, so that from windows, I see T2, U2 and V2 as opposed to still seeing b, c and d
How do I do that?
How did you create the shares on Ubuntu?
docJ
April 11th, 2013, 01:29 AM
Would it be as simple as using
gksudo nautilus, then right-clicking the drive, properties & rename it?
How did you create the shares on Ubuntu?
Sorry for being such a hopeless noob, but I don't know what you mean...:confused:
Actually, I beleive I used the last code quote to share the drives
bab1
April 11th, 2013, 01:29 AM
Yep. if that is how you originally created the share.
Edit: What do you mean by "right-clicking the drive"? You really right-click on a folder and share that. If the folder is at the root of the partition then you share the entire partition. In Linux speak the drive is the device. The physical hard drive. You DO NOT share hard drives, you share folders on partitions.
bab1
April 11th, 2013, 01:37 AM
I used the last code quote to share the drives
What's that mean?
Did you share them using the GUI or by editing smb.conf?
docJ
April 11th, 2013, 01:38 AM
Would it be as simple as using
gksudo nautilus, then right-clicking the drive, properties & rename it?
I beleive this would work, but I am afaraid to break something else in the process, like auto mounting fstab thing (man, that got me stumped for days...)
docJ
April 11th, 2013, 01:40 AM
Did you share them using the GUI or by editing smb.conf?
GUI, nautilus as root, right clicking those drives, then properties, then share tab
bab1
April 11th, 2013, 01:41 AM
So tell me what you have done. That won't break anything. ;-)
I just need to see how you did it, We aren't changing anything at this point.
What shares are you mounting via fstab? Do you have multiple Ubuntu hosts?
bab1
April 11th, 2013, 01:44 AM
GUI, nautilus as root, right clicking those drives, then properties, then share tab
If you go back and look you will see that you named the share using the share tab. Tell me about your adventures with fstab.
DON"T CHANGE ANYTHING AT THIS POINT.
docJ
April 11th, 2013, 01:45 AM
Edit: What do you mean by "right-clicking the drive"? You really right-click on a folder and share that. If the folder is at the root of the partition then you share the entire partition. In Linux speak the drive is the device. The physical hard drive. You DO NOT share hard drives, you share folders on partitions.
Again, by bad, you are right I did right click the B folder, in my mind, its a drive cause its the absolute top root, and my 3 data drives have no internal partitioning
docJ
April 11th, 2013, 01:50 AM
Tell me about your adventures with fstab.
DON"T CHANGE ANYTHING AT THIS POINT.
You bet I won't change a thing !:)
I basically followed instructions to edit fstab so my 3 data drives would auto mount; I can't explain how I did it (as it took me like 3 days to "get it"
If it helps, I guess I can quote the code from this fstab thing (?)
bab1
April 11th, 2013, 01:51 AM
Again, by bad, you are right I did right click the B folder, in my mind, its a drive cause its the absolute top root, and my 3 data drives have no internal partitioning
Try and not think in Windows terms. It will help you in the long run to learn Linux terms.
Your 3 data drives most certainly have been partitioned. Even if it is only one partition for the entire physical HDD. The partition is the formatting of the disk so the filesystem (i.e. ext4) can be applied.
bab1
April 11th, 2013, 01:54 AM
You bet I won't change a thing !:)
I basically followed instructions to edit fstab so my 3 data drives would auto mount; I can't explain how I did it (as it took me like 3 days to "get it"
If it helps, I guess I can quote the code from this fstab thing (?)
So let's look at that. Post the output of
cat /etc/fstab
It should look something like this
# /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=c4807753-7a09-4d0a-8052-bf96c1f81d40 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=46a258bf-6ace-4d52-b4d7-db47e7b3de7b /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=69e4c9c7-a439-416d-85a9-c79162983068 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
docJ
April 11th, 2013, 01:59 AM
cat /etc/fstab
# /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=dd45ac45-5856-4fed-9747-77d73c1be122 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=77d98a43-673a-458e-83fd-a34bb24147a9 /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=1cf17074-3d96-49c2-89b3-11ec33498e90 none swap sw 0 0
UUID=9d1b8994-ab09-4d39-8db5-732ac340a791 /media/b ext4 defaults 0 2
UUID=e4cb3ab6-1be1-4cbd-b01e-62e425c916bf /media/c ext4 defaults 0 2
UUID=9398f40a-c0b9-4fe9-9993-afb0cbe8bcbd /media/d ext4 defaults 0 2
bab1
April 11th, 2013, 02:13 AM
cat /etc/fstab
# /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>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=dd45ac45-5856-4fed-9747-77d73c1be122 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=77d98a43-673a-458e-83fd-a34bb24147a9 /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=1cf17074-3d96-49c2-89b3-11ec33498e90 none swap sw 0 0
UUID=9d1b8994-ab09-4d39-8db5-732ac340a791 /media/b ext4 defaults 0 2
UUID=e4cb3ab6-1be1-4cbd-b01e-62e425c916bf /media/c ext4 defaults 0 2
UUID=9398f40a-c0b9-4fe9-9993-afb0cbe8bcbd /media/d ext4 defaults 0 2
Simple enough. For example you have a partition mounted at a folder. This mounts the partition on that drive to you local file system. This has nothing to do with sharing it at a later date. It only makes it available in the local file system to be shared.
You can change the name in the properties tab of the shared folder without disturbing the work you have done to the local file system using fstab.
You might find it useful to NOT use the same share as you have used in fstab. There is no advantage to doing or not doing that. You will find that it is easier to diagnose problems if there is no ambiguity between mountpoints of partitions and share names.
I would go ahead and right-click on one of the shares you have created and change the name if you like. But there is no reason to. The share is functioning correctly now. The only reason I would change it is to make the share name more descriptive. For example: On one of my servers I have a folder at /srv/data. The share name is Public. The user finds it by //SERVER_NAME/Public. The users have no need to know where the data actually resides.
docJ
April 11th, 2013, 02:25 AM
I would still prefer to rename the share to T, U and V (this looks like network share when I acces from windows; I didn't like too much seeing network drives marked C & D, messy-messy)
It seems to be working,
Bab1, I cannot thank you enough for sticking with me here.
I will just reboot and make sure nothing explodes (just kidding)
Thanks again !
docJ
April 11th, 2013, 02:30 AM
I am still in one piece after a reboot, I'll call it a night, thanks a million bud!):P
bab1
April 11th, 2013, 02:30 AM
You might find that it takes awhile for the new share names to show up (15 minutes). Don't panic if it takes that amount of time. I'll be back in a couple of hours if you need me. If it works mark the thread a [SOLVED]. You can do that using this (http://ubuntuforums.org/showthread.php?t=2122459&p=12542445#post12542445) method.
fantab
April 11th, 2013, 06:36 AM
Q: Have you installed Ubuntu within windows with WUBI?
You should change the Windows partition labels with Windows only. You can change them with Linux but I wouldn't recommend it.
Only Linux partitions must be changed from Linux.
One area that many people new to Linux find confusing is the matter of how partitions are used and accessed by the Linux operating system. In DOS/Windows, it is relatively simple: Each partition gets a "drive letter." You then use the correct drive letter to refer to files and directories on its corresponding partition.
This is entirely different from how Linux deals with partitions and, for that matter, with disk storage in general. The main difference is that each partition is used to form part of the storage necessary to support a single set of files and directories. This is done by associating a partition with a directory through a process known as mounting. Mounting a partition makes its storage available starting at the specified directory (known as a mount point).
For example, if partition /dev/hda5 is mounted on /usr/, that would mean that all files and directories under /usr/ physically reside on /dev/hda5. So the file /usr/share/doc/FAQ/txt/Linux-FAQ would be stored on /dev/hda5, while the file /etc/X11/gdm/Sessions/Gnome would not.
Continuing our example, it is also possible that one or more directories below /usr/ would be mount points for other partitions. For instance, a partition (say, /dev/hda7) could be mounted on /usr/local/, meaning that /usr/local/man/whatis would then reside on /dev/hda7 rather than /dev/hda5.
bab1
April 11th, 2013, 02:46 PM
Q: Have you installed Ubuntu within windows with WUBI?
You should change the Windows partition labels with Windows only. You can change them with Linux but I wouldn't recommend it.
Only Linux partitions must be changed from Linux.
It turns out the OP didn't need to change the partition labels at all. The Samba share names needed to be changed. Note that the thread has been marked [SOLVED]. :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.