e2label does not work

Posted on 2004-11-16
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

    Author Comment

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

    Expert Comment


    > 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

    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

    Author Comment

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

    Expert Comment

    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

    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

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    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…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now