Find the answer to your Linux question:
Results 1 to 10 of 10
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Missing /etc/fstab in Ubuntu. How to rescue?


    I am running Ubuntu Dapper Drake and in doing some work with the fstab file the other night, apparently either moved or deleted the file. As a result when my machine tries to boot, the startup process goes through and is able to mount the filesystems, but immediately after that it tries to start ACPI and hits an error (I don't have in front of me because I am at work). In the errors that show on the screen, there are repeated messages about not being able to find /etc/fstab, so I am guessing that is the main problem.

    Specifically, i was working to mount my NTFS partition on my box (It's a laptop that dual boots with WinXP). I know that I backedup the fstab file into /etc/fstab.bak, but I am starting to think that I did a mv /etc/fstab /etc/fstab.bak instead of using a cp /etc/fstab /etc/fstab.bak

    Either way, I know that I have a backup of the correct file, but I can't figure out how to get Ubuntu to boot into resuce mode so I can gain root access and copy the old fstab file back into place.

    I do have copies of the install disk, but I couldn't figure out how to get into rescue mode.

    Can anyone point me in the right direction?

  2. #2
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    Hi !

    Ubuntu Installation CD is LiveCD... boot from it... LiveCD will mount all partitions. locate backup copy of fstab and rename it.



    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    I tried that, and was able to get the live CD to come up. The problem that I has was that while it did find the individual partitions that existed, it wouldn't let me mount any of them, so I couldn't mount the / partiton and change the file from there.
    There was an error message displayed when I tried that, but beings I don't have the machine with me (I am at work), I will have to wait until tonight to get the exact text of the error.


    I also tried Knoppix to see if it would allow me to have access to the drive, but no luck.

    Is there anyway to use the live CD as more of a true Rescue CD?

  4. $spacer_open
    $spacer_close
  5. #4
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    Hi !

    for fstab file recovery, Ubuntu LiveCd is best option. you dont need to mount partitions manually. Ubuntu LiveCD mounts all partitions...
    in case, it dont mount, use 'sudo' to mount manually.

    sudo mount -t ext3 /dev/partiton /mountpoint



    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    I will try that once I get home and see what happens. Then at least if it doesn't work, I will be able to post the error message I am getting, which hopefully will help clarify the situation.

    I will post back on what happens.

    Thanks

  7. #6
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    When you try to mount a partition, it's probably failing
    because it wants to read /etc/fstab to determine
    the filesystem and mount point. You will need to explicitly
    supply this info to the mount command.

    http://www.die.net/doc/linux/man/man8/mount.8.html

  8. #7
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    Quote Originally Posted by rcgreen
    When you try to mount a partition, it's probably failing
    because it wants to read /etc/fstab to determine
    the filesystem and mount point. You will need to explicitly
    supply this info to the mount command.
    Hi !

    i dont think LiveCd will look into installed System's /etc/fstab file. may be i am wrong but if i have 5 OS installed, then whose fstab will be used by LiveCD?



    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Linux User src2206's Avatar
    Join Date
    Aug 2006
    Location
    Kolkata, India
    Posts
    285
    Hi casper,
    In my Ubuntu the FC5 partition is mounting automatically but in a read only and limited access mode. I checked the fstab file, and the line is there but I'm not sure what changes to bring to the line to make the FC5 partition from Ubuntu completely accessible.
    So could you please help me out?
    Thank you

  10. #9
    Linux User src2206's Avatar
    Join Date
    Aug 2006
    Location
    Kolkata, India
    Posts
    285
    Hi !

    i dont think LiveCd will look into installed System's /etc/fstab file. may be i am wrong but if i have 5 OS installed, then whose fstab will be used by LiveCD?
    I tried the which fstab command using live CD but ut saud that the file can not be found though in normal hdd installation it is at usual /etc. I think Live CDs load a temporary ver of it in the RAM thats whay it may not be found.

  11. #10
    SuperMod (Back again) devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,777
    Quote Originally Posted by src2206
    I checked the fstab file, and the line is there but I'm not sure what changes to bring to the line to make the FC5 partition from Ubuntu completely accessible
    .

    for write/complete access, umask should be 0

    /dev/<partition> /<mountpoint> <file System> defaults,rw,umask=0 0 0




    casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •