* Re: Read-only file system with persistent storage
2015-07-16 11:36 Read-only file system with persistent storage Gary Thomas
@ 2015-07-16 13:05 ` Daniel.
2015-07-17 13:03 ` Nikolay Dimitrov
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Daniel. @ 2015-07-16 13:05 UTC (permalink / raw)
To: Gary Thomas; +Cc: Yocto Project
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
Hi Gary, I'm interested in that too. In my case I want to have a
reset-to-factory-defaults-button on my device. The idea was use an readonly
filesystem and, on top of it, a read-write filesystem. All modifications
goes to top-half, once the RTFD button is pressed the top-half is formated
and the system goes back to its instalattion.
I have no ideia about support for that on Yocto, I know of OverlayFS
existence only. I think its possible but I don't know really how to do it,
also never tried. I'm just fearing that dealing with OverlayFS on rootfs
could be a headache. Anyway, take a look on this:
https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt
Best regards
- dhs
2015-07-16 8:36 GMT-03:00 Gary Thomas <gary@mlbassoc.com>:
> I'd like to set up a system with a read-only root file system
> along with some persistent read-write storage. What are the
> [best] options in Poky/Yocto for this? Is there any support
> for some type of overlay file system?
>
> Thanks for any ideas/pointers
>
> --
> ------------------------------------------------------------
> Gary Thomas | Consulting for the
> MLB Associates | Embedded world
> ------------------------------------------------------------
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
--
*"Do or do not. There is no try"*
*Yoda Master*
[-- Attachment #2: Type: text/html, Size: 2321 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Read-only file system with persistent storage
2015-07-16 11:36 Read-only file system with persistent storage Gary Thomas
2015-07-16 13:05 ` Daniel.
@ 2015-07-17 13:03 ` Nikolay Dimitrov
2015-07-20 6:07 ` Mike Looijmans
2015-07-21 16:01 ` Matt Schuckmann
3 siblings, 0 replies; 7+ messages in thread
From: Nikolay Dimitrov @ 2015-07-17 13:03 UTC (permalink / raw)
To: Gary Thomas, Yocto Project
Hi Gary,
On 07/16/2015 02:36 PM, Gary Thomas wrote:
> I'd like to set up a system with a read-only root file system
> along with some persistent read-write storage. What are the
> [best] options in Poky/Yocto for this? Is there any support
> for some type of overlay file system?
>
> Thanks for any ideas/pointers
I remember that back in my automotive days, one of my teams had to use
Genivi's persistence component:
http://projects.genivi.org/persistence-management/
There are also git repositories over there. I can't comment on the code
quality and stability, but this component is part of the Genivi
reference platform (which technically doesn't mean anything), and
there's at least 1 vehicle from a major OEM which uses this component
on the roads. As usual, keep your eyes open for possible issues.
Kind regards,
Nikolay
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Read-only file system with persistent storage
2015-07-16 11:36 Read-only file system with persistent storage Gary Thomas
2015-07-16 13:05 ` Daniel.
2015-07-17 13:03 ` Nikolay Dimitrov
@ 2015-07-20 6:07 ` Mike Looijmans
2015-07-21 15:01 ` Thomas Petazzoni
2015-07-21 16:01 ` Matt Schuckmann
3 siblings, 1 reply; 7+ messages in thread
From: Mike Looijmans @ 2015-07-20 6:07 UTC (permalink / raw)
To: yocto
On 16-07-15 13:36, Gary Thomas wrote:
> I'd like to set up a system with a read-only root file system
> along with some persistent read-write storage. What are the
> [best] options in Poky/Yocto for this? Is there any support
> for some type of overlay file system?
>
> Thanks for any ideas/pointers
Depends. NOR or NAND flash?
with NOR, you can store a squashfs rootfs into it, and then use another
portion with jffs2 or ubifs for r/w capability. If you want to be able to
change 'everything', you can use an overlay fs, this requires some fiddling
with pivot_root and friends.
with NAND, you'd have to use a fault-tolerant filesystem to store the rootfs.
Dunno if it's possible to store a squashfs as a volume into ubi. The rest is
similar to NOR.
Kind regards,
Mike Looijmans
System Expert
TOPIC Embedded Products
Eindhovenseweg 32-C, NL-5683 KH Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
Telefax: +31 (0) 499 33 69 70
E-mail: mike.looijmans@topicproducts.com
Website: www.topicproducts.com
Please consider the environment before printing this e-mail
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Read-only file system with persistent storage
2015-07-16 11:36 Read-only file system with persistent storage Gary Thomas
` (2 preceding siblings ...)
2015-07-20 6:07 ` Mike Looijmans
@ 2015-07-21 16:01 ` Matt Schuckmann
2015-07-23 13:24 ` Lukas Böhm
3 siblings, 1 reply; 7+ messages in thread
From: Matt Schuckmann @ 2015-07-21 16:01 UTC (permalink / raw)
To: Gary Thomas, Yocto Project
If you are using systemd you can simply create a separate writeable partition and then use the volatile_binds.bb recipe to map files or directories from the read only rootfs to the writable partition via bind mounts.
If you are not using systemd you can do the same thing with sysVinit you'll just have to write your own recipe equivalent to volatile_binds.bb
This method works and the way volatile_binds is written it takes the default settings from the read only rootfs which is nice.
The only problem I've found is if you have a bind mount to a file you have to be careful not to delete the file or it will break the mount link.You'd be surprised how often you want to delete the file when you go to update it. Therefore I tend to use directories with volatile_binds.bb instead of individual files.
Matt S.
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] On Behalf Of Gary Thomas
> Sent: Thursday, July 16, 2015 4:37 AM
> To: Yocto Project
> Subject: [yocto] Read-only file system with persistent storage
>
> I'd like to set up a system with a read-only root file system along with some
> persistent read-write storage. What are the [best] options in Poky/Yocto for
> this? Is there any support for some type of overlay file system?
>
> Thanks for any ideas/pointers
>
> --
> ------------------------------------------------------------
> Gary Thomas | Consulting for the
> MLB Associates | Embedded world
> ------------------------------------------------------------
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Read-only file system with persistent storage
2015-07-21 16:01 ` Matt Schuckmann
@ 2015-07-23 13:24 ` Lukas Böhm
0 siblings, 0 replies; 7+ messages in thread
From: Lukas Böhm @ 2015-07-23 13:24 UTC (permalink / raw)
To: yocto
Am 21.07.2015 um 18:01 schrieb Matt Schuckmann:
> If you are using systemd you can simply create a separate writeable partition and then use the volatile_binds.bb recipe to map files or directories from the read only rootfs to the writable partition via bind mounts.
How should one use the volatile-binds.bb recipe? How can I configure which
files, directories shall be bind mounted?
Thanks
> If you are not using systemd you can do the same thing with sysVinit you'll just have to write your own recipe equivalent to volatile_binds.bb
>
> This method works and the way volatile_binds is written it takes the default settings from the read only rootfs which is nice.
>
> The only problem I've found is if you have a bind mount to a file you have to be careful not to delete the file or it will break the mount link.You'd be surprised how often you want to delete the file when you go to update it. Therefore I tend to use directories with volatile_binds.bb instead of individual files.
>
> Matt S.
>
>> -----Original Message-----
>> From: yocto-bounces@yoctoproject.org [mailto:yocto-
>> bounces@yoctoproject.org] On Behalf Of Gary Thomas
>> Sent: Thursday, July 16, 2015 4:37 AM
>> To: Yocto Project
>> Subject: [yocto] Read-only file system with persistent storage
>>
>> I'd like to set up a system with a read-only root file system along with some
>> persistent read-write storage. What are the [best] options in Poky/Yocto for
>> this? Is there any support for some type of overlay file system?
>>
>> Thanks for any ideas/pointers
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas | Consulting for the
>> MLB Associates | Embedded world
>> ------------------------------------------------------------
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
--
Lukas Böhm fon: ++49 351 26996-0
iseg Spezialelektronik GmbH fax: ++49 351 26996-21
Bautzner Landstr. 23 mail: lukas.boehm@iseg-hv.de
D-01454 Radeberg OT Rossendorf web: www.iseg-hv.de
Geschäftsführer/Managing Director:
Dr. Frank Gleisberg, Dr. Joachim Pöthig
Registergericht/Lower District Court:
Amtsgericht Dresden HRB 16250
Umsatzsteuer-Identnummer / VAT Id:
DE 812 50 89 42
^ permalink raw reply [flat|nested] 7+ messages in thread