botched fstab


Results 1 to 6 of 6

Thread: botched fstab

  1. #1
    Join Date
    Dec 2001
    Posts
    122

    botched fstab

    Yesterday i rolled up a new 2.4.22 kernel and also removed the 'LABEL' references from the fstab ( i guess redhat puts them there).....anyhow, instead of /dev/hda3 for mounting / i put /dex/hda3

    now when i reboot i get a 'maintenance' login to correct the problem.

    i login...
    do a 'df'.....it shows /dev/hda3 mounted as /
    all is well so far.
    then i go to load in fstab into vi and it wont let me save the changes...
    it will tell me that the filesystem is 'read only'

    i dont have a boot disk made....nor a cd drive installed ( i did when i installed it but took it out)

    is there a way i can save this change to the fstab file without having to have a boot floppy, reinstall the cdrom drive, or pull the drive and mount it on another nix system?

  2. #2
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    Once you're in Single User mode, you should be able to issue the following command:

    > mount -o remount,rw / /

    This will mount the root filesystem as read/write and allow you to change the file.

    If this doesn't work, try reading the man page for mount and check the syntax. I'm not in front of a Linux console, so I stole that command off the net.

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  3. #3
    Join Date
    Oct 2002
    Location
    Illinois
    Posts
    3,281
    you may also have to issue the ! option with vi in order to force the save, depending on its permissions

  4. #4
    Join Date
    Dec 2001
    Posts
    122
    thanks Satanic Atheist. I will try that when i get home.

    dkeav, thanks for your input too. i tried that as well last night and it still wouldn't fly. i even tried to copy the fstab to fstab.old and edit that but the copy wouldnt work either....mentioning 'read-only filesystem'

  5. #5
    Join Date
    Dec 1999
    Location
    Toronto
    Posts
    39,307
    If the remount command posted above does not work (it should though), you can try

    mount -o remount,rw /

    or

    mount -o remount,rw /dev/hda3 /
    SEARCH FIRST... ASK SECOND Read the JL 'Community Help Posting Guidelines' before posting in the forums.

    Precompiled Redhat NTFS Modules

    Linuxplanet Tutorials

    If Linux doesn't have the solution, you have the wrong problem. ... Please do not send me a PM asking for help...

    Please read the search suggestion thread in JL Ideas

  6. #6
    Join Date
    Dec 2001
    Posts
    122
    Thanks mdwatts, and to everyone. Satanic Atheist's answer worked like a charm.

    Once again, i appreciate it.

Posting Permissions

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