How can I boot the rootfs readonly?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How can I boot the rootfs readonly?

ソリューションへジャンプ
6,200件の閲覧回数
blangero_wang
Contributor I

Hi:

     I want to load rootfs readonly on my imx6q, the rootfs is debian_armhf.

     In uboot I set the args as:

     setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 rootwait ro video=mxcfb0:dev=lcd,1440x900,if=RGB24'

     and I do get verbose in bootup:

    

     EXT3-fs (mmcblk1p1): mounted filesystem with writeback data mode

     VFS: Mounted root (ext3 filesystem) readonly on device 179:25.

     But in the system I still get rw in mtab and the rootfs is still writable.

     How can I solve it?

     Thanks!

タグ(3)
0 件の賞賛
返信
1 解決策
3,843件の閲覧回数
blangero_wang
Contributor I

I got it resolved.

It's the fstab file which defines the readonly, but not uboot args.

元の投稿で解決策を見る

5 返答(返信)
3,843件の閲覧回数
katherrafi
Contributor II

Hope this may help to make the read only in fstab.

/dev/root         /      auto      remount,ro      1    1

3,843件の閲覧回数
Raana
Contributor III

Hi Kather Rafi,

 

Even I've tried the same in boot arguments, but failed. So, I've tried with fstab and it's working fine.
May I know, 
Why 'ro' is not working in boot arguments ?
Is this related to NXP or default uboot or something ?
Whether 'fstab' is the only way or fine way to make rootfs as 'ro' ?

 

Thank You.

Best Regards,

J.P.Raja

0 件の賞賛
返信
3,844件の閲覧回数
blangero_wang
Contributor I

I got it resolved.

It's the fstab file which defines the readonly, but not uboot args.

3,843件の閲覧回数
Raana
Contributor III

Hi Blangero Wang,

Even I've tried the same in boot arguments, but failed. So, I've tried with fstab and it's working fine.
May I know,
Why 'ro' is not working in boot arguments ?
Is this related to NXP or default uboot or something ?
Whether 'fstab' is the only way or fine way to make rootfs as 'ro' ?

Thank You.

Best Regards,

J.P.Raja

0 件の賞賛
返信
2,938件の閲覧回数
shaoxiao_guo_dn
Contributor I

Do you know why now?

0 件の賞賛
返信