Killertechno
Posts: 151
Joined: Wed Jan 02, 2013 8:28 am

Rootfs in read-only: any advantage?

Fri Jan 19, 2018 10:47 am

Hi to all, usually Raspberry SD card is used in read/write mode for development purposes, so I've read in different threads it'll be safer set filesystem in read-only mode for final application (to prevent SD card damages due to continous read/write operations).

https://www.acmesystems.it/save_microsd

Now I plan to develop my application on Compute Module starting from microSD, then move OS into eMMC and disable access from outside to prevent unhautorized access and SD card duplication.

My doubt is this: should I set eMMC for read-only?
Could I get some advantages in terms of memory lifetime and/or rootfs corruption?
Thanks.

I forget: there will be any issue loosing power supply when writing on eMMC in r/w rootfs?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1914
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Rootfs in read-only: any advantage?

Fri Jan 19, 2018 10:57 am

If you can make the filing system read-only then you eliminate all sorts of potential corruption from partial writes etc., but that is only asking the OS not to write to the device and doesn't preclude updates. Actually making the eMMC read-only is probably best avoided.

Killertechno
Posts: 151
Joined: Wed Jan 02, 2013 8:28 am

Re: Rootfs in read-only: any advantage?

Fri Jan 19, 2018 11:05 am

Sorry, I don't understand difference between "filing system read-only" and " making the eMMC read-only" when using eMMC.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1914
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Rootfs in read-only: any advantage?

Fri Jan 19, 2018 11:19 am

Marking the filing system as read-only is asking the OS not to write to the eMMC, while making the eMMC read-only would actually stop any writes from happening even if the OS tried.

Killertechno
Posts: 151
Joined: Wed Jan 02, 2013 8:28 am

Re: Rootfs in read-only: any advantage?

Fri Jan 19, 2018 12:17 pm

Ok, sorry, little misunderstanding: as "read only" I meant just filesystem in read-only.

Return to “Compute Module”