LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-07-2007, 08:32 PM   #1
OldAl
Member
 
Registered: Oct 2006
Location: Canberra, Australia
Distribution: ubuntu MATE LTS
Posts: 102

Rep: Reputation: 15
mounting partitions by label


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.

From shivering Canberra,
OldAl.
 
Old 07-07-2007, 09:21 PM   #2
OldAl
Member
 
Registered: Oct 2006
Location: Canberra, Australia
Distribution: ubuntu MATE LTS
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by OldAl
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 what is missing?

Confused OldAl.
 
Old 07-07-2007, 09:28 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
So did you check in /dev/disk/by-label/ ???
Personally I wouldn't use the quotes.
 
Old 07-07-2007, 10:47 PM   #4
OldAl
Member
 
Registered: Oct 2006
Location: Canberra, Australia
Distribution: ubuntu MATE LTS
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00
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.
 
Old 05-11-2010, 08:01 AM   #5
mbr
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by OldAl View Post
So it looks like the much hated Windoz reboot is creeping into linux, too.
Not quite right.

Check this up: http://www.linuxquestions.org/questi...6/#post3960817
 
Old 05-13-2010, 01:08 AM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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).
 
Old 05-14-2010, 07:49 PM   #7
OldAl
Member
 
Registered: Oct 2006
Location: Canberra, Australia
Distribution: ubuntu MATE LTS
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73 View Post
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!

Ubuntu rocks with grub2, anyway!
 
  


Reply



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
Linux & Windows partitions label were deleted Dr_Death_UAE Linux - General 5 02-21-2006 04:06 AM
partitions are not mounting dasy2k1 Slackware 3 12-08-2005 05:07 PM
mounting partitions alanbarnard Ubuntu 3 06-26-2005 04:00 PM
Mounting partitions thebored Linux - Networking 3 04-10-2005 06:09 AM
mounting partitions Niflheim Linux - Newbie 3 01-25-2005 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:48 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
Open Source Consulting | Domain Registration