Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I cleaned /etc/fstab so I could fix my booting error of mounting drive, and I can not log into my main account. Although I can log in as "guest".

Also I have a backup of fstab in my home directory, but I don't remember the folders name. It may be something like __Back_UP.

How can I fix this?

share|improve this question
    
Thank for Answers, Sorry I was temperory created this question since I could not enter to ubuntu, I registered as DanielLnx, So thanks for answers and sorry I can not tick your answers. I used Live CD, and with permission access like this ==> "sudo cp "source /fstab" media/"ROOT DRIVE"/fstab" I solved my situation. THANKS AGAIN. –  daniel Jun 10 '12 at 17:29

2 Answers 2

up vote 1 down vote accepted

fstab is the file which helps linux decide which partition is to be mounted, which to be used as swap, which is the / (filesystem). Its essential to have that file.

As you said, you had the back up of fstab in your home directory, so as an initial step you can try to find the file:

  1. Log in somehow (guest account or live cd or live usb with any linux distro). If guest is able to access /home/ directory.

  2. Run the following commands in the Terminal:

    cd /home/[user account you were using before]
    find | grep -i back
  3. If you are lucky, that should result in a small list of matching files. From that list check if you are able to identify the backedup fstab file. Once found copy the file to /etc using:

    cp source-filename /etc/fstab
  4. Alternatively, if you were unable to find the file, comment here back with the output of:

    sudo blkid
    
share|improve this answer
    
Thanks As a guest i can login but In guest home directory is not anything, I think it is in another home directory of My real User name something i login always, and I can not open that one. –  daniel Jun 10 '12 at 15:31
    
Oops I forgot that you don't have the fstab file. :) . It'd be great if you could boot from the live cd. Run the distro without installing. Open nautilus. Mount all the drives you see, by clicking on each of them. One of them will be the / of the system you were using. This directory'd have the home directory and the user directory. Open terminal. follow the steps as mentioned above. –  drake01 Jun 10 '12 at 15:45
    
One more thing, Once you boot from the live cd and mount the partitions using nautilus (or command line: sudo mount -a) The mount points will be horrible names (a big name with alphanumerics). After identifying the root of the system, you should note the intials of the name of this directory. This names can be found in media directory of the live session after mounting the partitions. –  drake01 Jun 10 '12 at 15:56
    
Thanks for the additions @EliahKagan .Yeah you are right, I missed those things there. Appreciate your help :-) –  drake01 Jun 10 '12 at 17:43

you can try to start your system with a live CD or USB drive, then try to find your backup file and restore it. If you have your data in a separate /home partition then you can try to reinstall your system again.

hope that helps

share|improve this answer
    
No worries, as the poster above stated this can be fixed easily. Come back here if you need more detailed help. –  Floyd Jun 10 '12 at 15:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.