Problem with fstab file

Posted on 2007-07-26
Last Modified: 2013-11-15

I installed Ubuntu 7.0.4 Desktop i386. My computer has 2 hard-disks, one is 20G one in which Ubuntu was installed. Another one is 30GB hard-disk used for data storage. So, there are 3 partitions in my computer: hda1, hda5 (swap partition), and hdb. I would like to mount hdb5 automatically at boot, so I edited the fstab file. Here is my steps:

1. Using Terminal to set for user Admin can access folder /etc
su (change to root)
chown Admin /etc
chmod -R 777 /etc

2. Exit Terminal, use Text Editor to open fstab file in /etc folder, then add one more line at the end of fstab file:
UUID=308ce7f4-f657-4dcb-b638-bab5465dfa32   /home/Admin/hdd2  ext3  defaults   0   0
Save the fstab file.

3. Create a folder hdd2 in Home Folder, that is create the folder  /home/Admin/hdd2

4. Restart the computer.

It works good. The hard-disk was mounted and its content is in hdd2 folder.

However, right after that, some other system functions like Synaptic Package Manager, Update Manager, GNOME Partittion Editor, etc. cannot run. I edited the fstab again by remove the last line, so that it is like the original one, then restart the PC. Those functions do not work, and I now even cannot mount the second hard-disk any more.

Where does the problem come from? How can I fix it? Is there any place for downloading the original fstab file? Please help.
Question by:free4vn
    LVL 14

    Accepted Solution

    when you change the permissions for files like /etc/passwd and /etc/shadow and the rest of the stuff to a 777 the system is bound to give you errors.  

    chmod -R is a good option only on the data part.  not in the system area. right now all the permissions have been changed to globally available and therefore the system would never run properly.

    run the installation again (choose not to format disk) and opt for a minimal install.  that ways the files are left intact and the system automatically changes the requisite file permissions.

    Author Comment

    Is there no way to set the permission back without re-install?
    LVL 14

    Assisted Solution

    there are far too many number of files and directories.  like /etc/init.d   /etc/rc.d and so on

    probably you can have a second system somewhere and then keep going one file after the other which is equally time consuming.  

    a minimal reinstall without format would take hardly anytime and hasslefree

    even the existing users and passwords remain intact if that is your worry!!!

    Author Comment

    Ubuntu live CD do not have option for installing without format. That is the problem.

    Assisted Solution

    You can do a non format install from the Ubuntu 7.04 Alternate CD.
    It's available here: (remember to tick the alternate cd checkbox at the bottom of the download area.

    I don;t really understand why you were changing the perms on /etc/ in the first place.. its not necessary.

    It will be much too time consuming to change all the perms back to their proper values.

    Author Comment

    Because I'm a newbie in Linux :"> I'n not familiar with command line. I would like to do commands in Gnome, so I change the permissions so that user Admin can edit files.

    Anyway, I made a new installation. It is faster than download the Alternate CD because my internet speed is low.

    Thank both of you for your comments.

    Expert Comment

    There is a decent website explaining the use of sudo:

    There is also gksudo which is used for graphical frontend.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    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…

    734 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

    20 Experts available now in Live!

    Get 1:1 Help Now