Jump to content

FS Read Only - can't write file


Guest JeffPalmer
 Share

Recommended Posts

Guest JeffPalmer

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest JeffPalmer

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.

Link to comment
Share on other sites

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 by arctic
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...