e2label does not work


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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vangelAuthor Commented:
I am using Red Hat Linux A.S 2.1

> 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?


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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

vangelAuthor Commented:
mkfs.ext3  command is not available on my Linux
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.
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.