Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
No.
Labels are a feature (???) of the filesystem itself - ext2/3 support it, as does swap. You'd need to check out any others.
cfdisk (not fdisk) will show the labels.
I have two linux partitions. When I boot, the NTFS partition on which XP is installed is mounted under 'WindowsXP' in /media. But the other linux is mounted under '/media/1'. I want to be able to give a label to ext3 partitions and be mounted under proper names. Plus, I can't figure out how GNOME decides which partitions to mount since these partitions are not entered in /etc/mtab.
Distribution: Fedora, Gentoo, Debian, Slackware, IRIX, OS X
Posts: 187
Thanked: 3
Quote:
Originally Posted by concoran
I have two linux partitions. When I boot, the NTFS partition on which XP is installed is mounted under 'WindowsXP' in /media. But the other linux is mounted under '/media/1'. I want to be able to give a label to ext3 partitions and be mounted under proper names. Plus, I can't figure out how GNOME decides which partitions to mount since these partitions are not entered in /etc/mtab.
First check fstab instead of mtab. mtab just says what is mounted.
It would seem that you labeled you're windows partition "WindowsXP", which is what the automounter uses that create a mount point in /media, the Label on the filesystem. In Linux filesystems are generally labeled at the time of formating. For example:
The -[L|l] assigns a label to the partition. In windows, if you install Ext2IFS, after assigning a Windows drive letter to your Linux Partitions, you can rename the Partition just as you would a [FAT16 | FAT32 | NTFS] partition.
I know this is in response to a post that is over a year old, but I found this page this morning as I searched for an answer to the same question, and so perhaps it is still worth posting a solution that worked for me.
The first step is to determine which device it is that you want to rename. This is far trickier than it should be, IMHO, but there 'tis.
For volumes that already have a label, there is an elegant method to discover which device is associated with each mounted volume. Open the terminal and type
"ls /dev/disk/by-label -lah" and a list of devices and their labels will result. The problem is, devices which are mounted without labels will not be listed.
For unlabeled volumes, the following clunky method will at least give you the information you need:
Open Nautilus by selecting Places > Computer.
Click on the volume whose name you want to change (unlabeled volumes are listed by their size).
Note the name by which it is identified in /media ... at the top of the window. (e.g., /media/disk-3 or some such).
Open GParted by selecting System > Administration > Partition Editor (You will need to enter your password.)
Scroll through the various disks until you see the one that has the mountpoint of interest (in my example, this would be disk-3).
Make a note of the entry in the "Partition" column. This is the device you want to rename.
The second step is to actually rename the partition. In a terminal window, type "sudo e2label device DesiredName" - for example, "sudo e2label /dev/sdc4 Backup" or some such. The new name will be used the next time you boot the system. (It's unusual to have to reboot in Linux, but this is one of the rare cases in which you must.)
Notes: e2label will only work with ext2 or ext3 formatted partitions, and (and this is a good thing) it will not alter the data in the partition.
For more information type "man e2label" in a terminal window.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.