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

来源:互联网 发布:javascript经典实例pdf 编辑:程序博客网 时间:2024/05/21 11:04

只要在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:~# 

0 0
原创粉丝点击