e2label does not work

Posted on 2004-11-16
Medium Priority
Last Modified: 2013-12-15

I have added a new hard drive on my machine and I use the following steps to mount it.
1. Create the partition using fdisk /dev/sda
2. mkfs /dev/sda
3. Convert it to ext3 using tune2fs –j /dev/sda1
4. Label it using #e2label /dev/sda1 /mnt/data2
5. Create the mount point.
6. Add in the fstab LABEL=/mnt/data2        /mnt/data2              ext3    defaults        1 2

If I mount manually using mount /mnt/data2 it works

When rebooting though it cannot find it automatically and takes me into single user mode

Question by:vangel
  • 2
  • 2
  • 2

Author Comment

ID: 12592102
I am using Red Hat Linux A.S 2.1
LVL 38

Expert Comment

ID: 12599795

> When rebooting though it cannot find it automatically and takes me into single user mode
Please umount it and do (as root)
# fsck -y /dev/sda1

Besides, could you provide the error message in /var/log/messages?


LVL 12

Expert Comment

ID: 12601815
e2label - Change the label on an ext2 filesystem

but your new harddisk using ext3 filesystem, don't know it will work or not, but instead of using the tune2fs –j /dev/sda1 to convert it into ext3 why not try using mkfs.ext3 -L /mnt/data2 -j /dev/sda1

after format the /dev/sda1 using the mkfs.ext3 it will make the /dev/sda1 become the ext3 filesystem, and with the -L /mnt/data2, it will create the volumn lable for you, -j will create  the filesystem with an ext3 journal.

so what you can do now is after get into the single user mode, mount the /etc/ and edit the fstab to remove the /mnt/data2 entry (better to make a backup copy of fstab)
reboot the system and try the above suggestion and edit the /etc/fstab and add the Label=/mnt/data2 entry into it and restart.

if this don't work try to auto mount by adding the entry into /etc/fstab in this way

/dev/sda1        /mnt/data2              ext3    defaults        1 2

This will auto mount the /dev/sda1 with the mount point /mnt/data2, so that at lease you can have a workable system
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 12652134
mkfs.ext3  command is not available on my Linux
LVL 12

Expert Comment

ID: 12652223
how abt my 2nd suggestion, edit the /etc/fstab add the below entry

/dev/sda1    /mnt/data2       ext3     defaults     1 2      < - will mount the /dev/sda1 to /mnt/data2

after restart this should auto mount the /dev/sda1 for you, if not, there is another problem/issue, it's not the e2label issue.
LVL 38

Accepted Solution

wesly_chen earned 1500 total points
ID: 12659228
RHEL 2.1 by default doesn't have mkfs.ext3.
But you can use
/sbin/mkfs -t ext3 /dev/sda1

Please do
tune2fs -l /dev/sda1 | grep -i volume
to check the volume label.


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question