November 24, 2024, 10:49:54 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Non Standard Labels  (Read 8279 times)

Offline rajesh.bahl

  • Linux Learner
  • ***
  • Posts: 86
Non Standard Labels
« on: December 08, 2007, 04:37:51 PM »

Hi All ,

We upgraded From CentOS 4.4 to CentOS 5.0 recently.
Everything is working as expected. But I have one query:-

The label of root filesystem is being shown as "/1"  instead of normal "/" in /etc/fstab. Although so far we have not faced any problem with this arrangement ,I need to be doubly sure that if there is any implication with this ? Also is there any way to revert it back to "/" ?



rajesh.bahl

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Non Standard Labels
« Reply #1 on: December 11, 2007, 12:18:10 PM »
I have not used centos 5.0
Can you post your /etc/fstab here ?

Offline rajesh.bahl

  • Linux Learner
  • ***
  • Posts: 86
Re: Non Standard Labels
« Reply #2 on: December 12, 2007, 01:59:50 PM »

Following is the /etc/fstab file:

LABEL=/1                 /                       ext3    defaults        1 1
LABEL=/boot         /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/home      /home                   ext3    defaults        1 2
proc                      /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=/tmp        /tmp                    ext3    defaults        1 2
LABEL=/usr          /usr                    ext3    defaults        1 2
LABEL=/var          /var                    ext3    defaults        1 2
LABEL=SWAP-hda3         swap                    swap    defaults        0 0
~                                                                                                                           
~                                                                                                                           
~                                                                                                                 

rajesh.bahl         
~                                                   

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Non Standard Labels
« Reply #3 on: December 12, 2007, 05:33:37 PM »
ok, I got it now what you are talking about.
Labels is just a way to assign a name to physical drive.
you can assign label to a device by using "e2label" command.

Its done by
Code: [Select]
e2lable -L <DEVICE> <lableName>So, here "/1" means that is pointing to your root partition which is mounted under "/" .

So, you give name to a device using e2label called as label then it will make sure that every time right device is mounted even if there might be change in device naming in system.  ie. it can be useful for removal devices like flash drives.

Offline rajesh.bahl

  • Linux Learner
  • ***
  • Posts: 86
Re: Non Standard Labels
« Reply #4 on: December 12, 2007, 06:17:52 PM »

I tried the same thing before putting the matter in this post as:

# e2label /dev/hda2 /

The label got changed. Also changed the name in /etc/fstab. But when I tried to reboot , the system could not boot. It displayed some error:

Could not resolve /1

after that some kernel panic error was displayed.

Again I booted the system from install media --> changed back the label to /1 and then booted -----> it is working okay but the label of root is being displayed as "/1" only.

What causes the change of label like this ?



rajesh.bahl

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Re: Non Standard Labels
« Reply #5 on: December 14, 2007, 07:08:40 PM »
umm.. you tried same for root partition ?
I have not played or experimented with this stuff yet but I read somewhere once that you have to unmount that particular partition before using e2label... that can be done using external media too..
« Last Edit: December 14, 2007, 07:12:18 PM by Ricky »

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Re: Non Standard Labels
« Reply #6 on: December 15, 2007, 02:03:31 AM »
Yes, Ricky you are right.

Rajesh, the "/1" is just a labeled used to mount the partition instead to "/" directory as the parameter "LABEL=/1" explains to you. Traditional days, people use the partition to mount using disk partitions instead of LABEL.

=======
Old days - sda is your First SCSI disk example
=======
/dev/sda1                 /                       ext3    defaults        1 1


=======
Nowadays
=======
LABEL=/1                 /                       ext3    defaults        1 1


Also, since you want to change the LABEL of the root partition "/". You will need to get your boot cd and switch to rescuemode to change it.