您的位置:首页 > 运维架构 > Linux

更改linux文件系统为只读的方法

2016-06-03 17:00 429 查看
只要在etc目录下搜索这个文件S10checkroot.sh 

然后把rw模式--->ro模式就可以了

内核启动的时候,在内核中把ubifs文件系统挂载为rw模式,然后系统启动后通过S10checkroot.sh 脚本修改为ro模式,

如果系统启动的进程太多的话,再去修改为ro模式,系统会报错busy

修改后通过mount命令查看,已经修改为只读模式

root@HDMTerm:~# mount

rootfs on / type rootfs (rw)
ubi0:rootfs on / type ubifs (ro,sync,relatime)

devtmpfs on /dev type devtmpfs (rw,relatime,size=114304k,nr_inodes=28576,mode=755)

proc on /proc type proc (rw,relatime)

none on /dev/shm type tmpfs (rw,relatime)

devpts on /dev/pts type devpts (rw,relatime,mode=600)

tmpfs on /var/volatile type tmpfs (rw,relatime,size=16384k)

tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)

tmpfs on /opt/tmp type tmpfs (rw,relatime,size=131072k)

tmpfs on /mnt/.psplash type tmpfs (rw,relatime,size=40k)

sysfs on /sys type sysfs (rw,relatime)

root@HDMTerm:~# 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: