Guest JeffPalmer Posted May 6, 2005 Report Share Posted May 6, 2005 I corrupted my /etc/fstab file, but have a backup. I am able to boot the system far enough to be able to access /etc and the backup fstab file, but when I try to copy it to the /etc directory, I get an error that states the the filesystem is read-only. How can I get the corrected file into the /etc directory? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 6, 2005 Report Share Posted May 6, 2005 What are you logged on as? If you are logged in with your username, do the following commands: su [return] enter password for root account. Then copy the file into place - cp is the command for copy. Quote Link to comment Share on other sites More sharing options...
Guest JeffPalmer Posted May 6, 2005 Report Share Posted May 6, 2005 It only boots in single user mode. I'm prompted to use the root password to get into recovery mode. Yes, I'm using CP. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 6, 2005 Report Share Posted May 6, 2005 I booted single mode today for a problem I had. I just typed login ian supplied my password and then carried on in the normal way using su to get into superuser mode and do everything I needed to. Try the similar to this and let me know how you get on, or have you done already and still got problems? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 6, 2005 Report Share Posted May 6, 2005 When you boot, how are you booting? I used failsafe from my LILO menu, and then went from there with the login stuff I mentioned before. I've just had a play around and I've managed to copy and overwrite the files once I used su to get root privileges. Quote Link to comment Share on other sites More sharing options...
Guest JeffPalmer Posted May 6, 2005 Report Share Posted May 6, 2005 Mandrake 10.1. The system boots up (doesn't matter if I pick failsafe or not), starts to go through the process, then states that a header on a drive is missing or invalid (because of wrong info in fstab). I am asked to either enter the root password to go into the recovery mode or hit CTRL-D to reboot the system (there is no gui). Entering the root password gives me a prompt that starts with [recovery.....] 1 # Where the number increments with every command entered. The filesystem that /etc is on is mounted READ ONLY and I am unable to change the /etc/fstab file. There is no prompt for a user ID. There is no gui. Quote Link to comment Share on other sites More sharing options...
arctic Posted May 7, 2005 Report Share Posted May 7, 2005 (edited) do you have a live cd at hand (knoppix or something like that)? if yes, boot the cd, then open a terminal, mount your mandriva partition and run an editor as root. thus can open the fstab-file, hack it and save it again, restoring the mandriva system. maybe the easiest way... oh... and if you are able to get into a gui when booting mandriva, simply open a terminal, type su for becoming superuser and start konqueror. you can change file-attributes with it and/or paste the original file over the old one. Edited May 7, 2005 by arctic Quote Link to comment Share on other sites More sharing options...
iphitus Posted May 7, 2005 Report Share Posted May 7, 2005 In single user mode partitions are generally mounted read only. to make them read-write: mount /dev/hdxx -o remount,rw iphitus Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.