The problem is probably that / is mounted read-only. Before running vi to
edit the file you want to change, enter
mount / -o remount,rw
I've recently had to do this, and I was able to save a new file, even one
without writeable permissions, by using the ":w!" command.
Jim Cunning
On Sun, 21 Jan 2001, Patrick Lacchia wrote:
>
> Yes I tried and it doesn't work. Here is what happen
>
> 1) I type "vi rc.sysinit"
> 2) The file open and the bottom line says "rc.sysinit [readonly]
> 3) I jump to the lines I want to delete and do a "dd" on the first one
> 4) The bottom line becomes red and says "warning: changing a readonly file"
> 5) immediatly after a message pops up saying "Unable to open swap file for
> "rc.sysinit", recovery impossible
> 6) follows by a new message "Press RETURN or enter command to continue"
> 7) I press RETURN and go back to the lines
> 8) I can now "dd" the 3 lines
> 9) but when I try to "wq!" I get a message saying "rc.sysinit Can't open
> file for writing" and then "Press RETURN or enter command to continue"
>
> Nothing was saved. I can't understand why it was so easy to modify a sys
> file in the first place with a text pad and now it's impossible to modify it
> again. Looks like all the files are read-only. I am wondering if it's due to
> the linux emergency mode.
>
> Patrick
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list