/etc/fstab cannot open file for writing无法修改也无法保存解决办法

有一个磁盘分区,挂到两个目录,直接执行了umount -a 卸载掉两个挂载,/etc/fstab下配置没有清除

vi 打开/etc/fstab之后, 恢复为原来的样子但是保存时提示

-- INSERT -- w10: Warning: Changing a readonly file

改完後保存的时候提示

"fstab" E212: Can't open file for writing

:w! 也没有用

看来是mount成readonly 了.于是执行

root# mount -o remount,rw /

再试vim /etc/fstab, 就可以保存了

This site Original article All followed" Attribution—NonCommercial—ShareAlike 4.0 (CC BY-NC-SA 4.0) ”。 Please keep the following marks for sharing and interpretation:

Original author: Jake Tao Source: 「/etc/fstab cannot open file for writing无法修改也无法保存解决办法」

Praise 207
0 0 207

Post a reply

Log in can only be commented on later
Share this page
Back to top