UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have several versions of Linux installed in different partitions on my PC, including kubuntu 7.04. With kerrnel 2.6.20-xx the partitions are assigned hash names (UUID). Some of these names do change when another distro is installed and that plays havoc with grub and access to different distros on the same PC.
I hear that it is possible to mount partitions by their label, rather than UUID, or in older kernels /dev/xxxx. I would greatly appreciate your help on two aspects of this:
1. What is the format for mounting partitions by their labels (i.e. a sample of text in fstab)?
2. How can one assign partition label for partitions without labels?
I would greatly appreciate some advice, particularly when using kubuntu/ubuntu.
Hi, (snip...)
1. What is the format for mounting partitions by their labels (i.e. a sample of text in fstab)?
2. How can one assign partition label for partitions without labels?
OldAl.
As a trial, I assigned a label to partition on the second IDE disk, /dev/hdb3, with the following command
Code:
# tune2fs -L "HDB3" /dev/hdb3
This shows up OK when checked with cfdisk /dev/hdb. However, if I try to mount it as follows, if fails with a message:
Code:
# mount LABEL=HDB3 /hdb3
"mount" responds with:
mount: Special device /dev/disk/by-label/HDB3 does not exist.
So did you check in /dev/disk/by-label/ ???
Personally I wouldn't use the quotes.
Thanks for the answer. No, initially I did not check the /dev/disk/by-label. I rebooted and then the mount command worked and then there was an entry in the /dev/disk/by-label. So it looks like the much hated Windoz reboot is creeping into linux, too.
Actually, it is not often that one would want to label disks and use labels for mounting, so the reboot is not as bad as the reboot after every program installation.
I was not sure about the use of '"'. I will try next partition label creation without it. I expect it will work, but if it does not, I will report to this list. (If I don't report, it means that it does work and the '"' are superfluous and should not be used.)
Thank you for your help. I feel that the question is truly resolved.
I believe hdparm -z should do the trick. Alternatively, if you use gparted, just make it scan the drives again after making you edits and that should work, too (possibly because it is indirectly calling the hdparm command).
I believe hdparm -z should do the trick. Alternatively, if you use gparted, just make it scan the drives again after making you edits and that should work, too (possibly because it is indirectly calling the hdparm command).
Thanks for that. I see that the question was asked in 2007 and that was in the days of "Legacy GRUB". Frankly, I can not remember why mounting by label was important for me at the time...
I have not yet tried the hdparm -z, but thanks jay73 for your kind reply. Will try RSN!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.