[Buildroot] [PATCH] fs/skeleton: allow rootfs not to be remounted read-write

Luca Ceresoli luca at lucaceresoli.net
Tue Jul 5 20:33:17 UTC 2011


Hi Diego,

Diego Iastrubni wrote:
> On Sun, Jul 3, 2011 at 1:56 PM, Luca Ceresoli <luca at lucaceresoli.net 
> <mailto:luca at lucaceresoli.net>> wrote:
> Signed-off-by: Luca Ceresoli <luca at lucaceresoli.net 
> <mailto:luca at lucaceresoli.net>>
>   +config BR2_REMOUNT_ROOTFS_RW
> +       bool "remount root filesystem read-write during boot"
> +       default y
> +       help
> +         The root filesystem is typically mounted read-only at boot.
> +         By default, buildroot remounts it in read-write mode early 
> during the
> +         boot process.
> +         Say no here if you would rather like your root filesystem to 
> remain
> +         read-only.
> +         If unsure, say Y.
> +
>  endif # BR2_ROOTFS_SKELETON_DEFAULT
>
>
> Wait... nothing breaks...? this just works?

It does not break anything.

If the new BR2_REMOUNT_ROOTFS_RW option is left at its default value (y),
then the generated filesystem does the same thing it used to do in the past.

If you disable it, BR will simply comment out the "mount -o remount,rw /"
line in /etc/inittab, thus the rootfs will stay read-only.

It works quite well, unless your apps need to write the rootfs.
I use it since >1 year without problems.

The only issue I notice is that the random seed cannot be saved on shutdown.
But this is a no-issue on those embedded devices that can be shut down only
by removing power: these will never see a clean shutdown.

Luca




More information about the buildroot mailing list