All of lore.kernel.org
 help / color / mirror / Atom feed
* Make one directory writeable
@ 2019-02-13  7:21 Bhupendra Singh
  2019-02-13  8:22 ` Ulf Samuelsson
  2019-02-13  8:27 ` Josef Holzmayr
  0 siblings, 2 replies; 4+ messages in thread
From: Bhupendra Singh @ 2019-02-13  7:21 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

Hello 

I have built core-image-minimal  with read only rootfs  then now  I want to
make one directory (like /mnt) writable. 

Is it possible to make one directory writeable in read only rootfs if yes
,please tell me how can I do same.   

 

Bhupendra Singh

 


[-- Attachment #2: Type: text/html, Size: 2901 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make one directory writeable
  2019-02-13  7:21 Make one directory writeable Bhupendra Singh
@ 2019-02-13  8:22 ` Ulf Samuelsson
  2019-02-13  8:27 ` Josef Holzmayr
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Samuelsson @ 2019-02-13  8:22 UTC (permalink / raw)
  To: Bhupendra Singh; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

You can use overlayfs for this. You mount the overlayfs on top of your rootfs and then it appear like you have a writeable file system.
In reality all the new  stuff is written to another (writeable) file system.
If you dismount the overlayfs, the rootfs reverts back to its original state.
If you again  mount the overlayfs, you get your modifications back.

Best Regards,
Ulf Samuelsson
+46 722 427 437

> 13 feb. 2019 kl. 08:21 skrev Bhupendra Singh <bhupendra.singh@ppsinternational.in>:
> 
> Hello
> I have built core-image-minimal  with read only rootfs  then now  I want to make one directory (like /mnt) writable.
> Is it possible to make one directory writeable in read only rootfs if yes ,please tell me how can I do same.   
>  
> Bhupendra Singh
>  
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

[-- Attachment #2: Type: text/html, Size: 3868 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make one directory writeable
  2019-02-13  7:21 Make one directory writeable Bhupendra Singh
  2019-02-13  8:22 ` Ulf Samuelsson
@ 2019-02-13  8:27 ` Josef Holzmayr
  2019-02-13 10:08   ` Mike Looijmans
  1 sibling, 1 reply; 4+ messages in thread
From: Josef Holzmayr @ 2019-02-13  8:27 UTC (permalink / raw)
  To: Bhupendra Singh; +Cc: yocto

Hi Bhupendra,

On Wed, Feb 13, 2019 at 12:51:17PM +0530, Bhupendra Singh wrote:
> Hello 
> 
> I have built core-image-minimal  with read only rootfs  then now  I want to
> make one directory (like /mnt) writable. 
> 
> Is it possible to make one directory writeable in read only rootfs if yes
> ,please tell me how can I do same.   

This is not exactly yocto specific, general linux concepts apply. You
can use a secondary, tertiary, ... partition or starage device and then
mount that as read-write. But it always has to be a seperate filesystem.
There is no way to make only one path of a given filesystem RW, it
always means that the whole filesystem is writeable.

Greetz
-- 
———————————————
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548 

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Make one directory writeable
  2019-02-13  8:27 ` Josef Holzmayr
@ 2019-02-13 10:08   ` Mike Looijmans
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Looijmans @ 2019-02-13 10:08 UTC (permalink / raw)
  To: Josef Holzmayr, Bhupendra Singh; +Cc: yocto@yoctoproject.org

As for the particular case of /mnt, on most images, /mnt is a symlink to 
/media, and /media is (on) a filesystem in RAM, so it's already writeable.

If the write does not need to persist across reboots, use a tmpfs mount.

If your real problem is that you cannot create anything in /mnt (or /media for 
modern users), the issue is that someone broke something in your image, 
because that should work out of the box.


On 13-02-19 09:27, Josef Holzmayr wrote:
> Hi Bhupendra,
> 
> On Wed, Feb 13, 2019 at 12:51:17PM +0530, Bhupendra Singh wrote:
>> Hello
>>
>> I have built core-image-minimal  with read only rootfs  then now  I want to
>> make one directory (like /mnt) writable.
>>
>> Is it possible to make one directory writeable in read only rootfs if yes
>> ,please tell me how can I do same.
> 
> This is not exactly yocto specific, general linux concepts apply. You
> can use a secondary, tertiary, ... partition or starage device and then
> mount that as read-write. But it always has to be a seperate filesystem.
> There is no way to make only one path of a given filesystem RW, it
> always means that the whole filesystem is writeable.
> 
> Greetz
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-02-14  6:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13  7:21 Make one directory writeable Bhupendra Singh
2019-02-13  8:22 ` Ulf Samuelsson
2019-02-13  8:27 ` Josef Holzmayr
2019-02-13 10:08   ` Mike Looijmans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.