LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Change HD 'Label' (https://www.linuxquestions.org/questions/linux-newbie-8/change-hd-label-894474/)

nnjond 07-29-2011 08:36 AM

Change HD 'Label'
 
Hi,

I have to additional HDs which are mounted at

/media/xx...a

and

/media/xx...b

Can you tell me how I might shorten their 'names' ?

Thanks

pwc101 07-29-2011 08:39 AM

Use gparted to edit the labels on the partitions.

kbp 07-29-2011 08:41 AM

If they're ext2/3/4 you can unmount them and use 'e2label /dev/sdX <new_label>', if they're fat32 you can use dosfslabel and if they're ntfs you can use ntfslabel.

cheers

nnjond 07-29-2011 09:00 AM

Thanks for your help. I see now It's the UUID I want to shorten. Do you offer the same advice?

pwc101 07-29-2011 09:19 AM

Check the contents of /etc/fstab to see if the mount points are hard-coded in there. If so, modify the mount points of your partitions (the /media/xx...a and /media/xx...b columns) in /etc/fstab. You will need to create the directories yourself otherwise the mount will fail (if you're using the command line program "mount"). I don't know whether GUI tools (e.g. nautilus and dolphin) honour the contents of /etc/fstab when mounting drives.

Make a backup of /etc/fstab (cp /etc/fstab $HOME/fstab.bak) BEFORE you make any changes to fstab so if you break something, you can easily fix it.

kbp 07-30-2011 12:49 AM

When drives are auto-mounted and have no label, the auto-generated mount point will be /media/<UUID>. If a disk is labelled then that is used as the mount point - /media/<label>

hth


All times are GMT -5. The time now is 01:04 PM.