Closed tmigone closed 7 months ago
[tmigone] This issue has attached support thread https://jel.ly.fish/60de1fe8-7240-4666-9277-fd7c9f48d400
IIRC I think we recently created a new diagram for a blog I was working with @andrewnhem Have to check which blog and if it is actually new. Checking
@vipulgupta2048 @tmigone talking about this one?
I think the only incorrect thing there is Boot partition
is actually read-write
and I think it always has been.
Also the second and third columns should be Root partition A/B
, not "Boot".
Also applies to this one https://www.balena.io/docs/reference/OS/overview/2.x/#image-partition-layout
@klutchell root partitions are also writable according to my (limited) testing.
@tmigone It may have looked that way since some directories have the read-write state partition overlayed on top of the active root partition which is otherwise read-only.
root@1582068:~# mount | grep state
/dev/mmcblk0p5 on /mnt/state type ext4 (rw,relatime)
root@1582068:~# mount | grep 0p5
/dev/mmcblk0p5 on /mnt/state type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/machine-id type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/fake-hwclock type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/NetworkManager/conf.d type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/NetworkManager/system-connections type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/docker type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/balena-supervisor type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/hostname type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/openvpn type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/ssh/hostkeys type ext4 (rw,relatime)
/dev/mmcblk0p5 on /etc/udev/rules.d type ext4 (rw,relatime)
/dev/mmcblk0p5 on /home/root/.docker type ext4 (rw,relatime)
/dev/mmcblk0p5 on /home/root/.rnd type ext4 (rw,relatime)
/dev/mmcblk0p5 on /home/root/.ssh type ext4 (rw,relatime)
/dev/mmcblk0p5 on /usr/share/ca-certificates/balena type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/lib/NetworkManager type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/volatile/lib/NetworkManager type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/lib/bluetooth type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/volatile/lib/bluetooth type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/lib/chrony type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/volatile/lib/chrony type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/lib/systemd type ext4 (rw,relatime)
/dev/mmcblk0p5 on /var/volatile/lib/systemd type ext4 (rw,relatime)
So on my device any files/directories not in the above list will be read-only. It's a long list of exceptions, and one we wish were shorter to be sure. But it also means we are very intentional when we make a directory read-write, as the default is always read-only.
@klutchell Should we change the diagram then to reflect the current scheme?
@vipulgupta2048 Yeah, I don't know who has the source for this .png but the boot partition should be changed to read-write. https://www.balena.io/docs/reference/OS/overview/2.x/#stateless-and-read-only-rootfs
Or switch to the new image and make the corrections I listed above.
I think the only incorrect thing there is Boot partition is actually read-write and I think it always has been. Also the second and third columns should be Root partition A/B, not "Boot".
@apexider : Can you please update this image? it's the one we created and used for this blog post (third diagram). Let me know if you need any help interpreting the above.
Corrections by @klutchell and crew:
read-write
@andrewnhem Here I updated the diagram to have "read-write" for "boot partition" for both, the post and for the docs :)
cc @klutchell
Thanks @apexider! I added some comments to the images, but it looks good otherwise!
Root
not Boot
AUDS
for the data partition instead of AUFS
@klutchell oh sorry and thank you for the annotations! I've updated the images :)
Looks good @apexider, thank you!
@vipulgupta2048 How do we update the image in the docs?
@klutchell @vipulgupta2048 Imperfect solution here, but I've added both to our assets repo (how we store editorial-based stuff):
I say it's imperfect because I would much prefer housing images and assets somewhere that better maps to our product architecture. But that kinda thinking is TBD/WIP.
I will update the Offline Updates post. I can update the docs one too, unless Vipul already has this on his mind to do.
Feedback and questions welcome.
Diagram here: https://www.balena.io/docs/reference/OS/overview/2.x/#stateless-and-read-only-rootfs
It states
resin-boot
,resin-rootA
andresin-rootB
are "read only" whileresin-state
andresin-data
areread/write
. In reality all of them are mounted asrw
in balenaOS:For details see: https://www.flowdock.com/app/rulemotion/public-s-community/threads/x8Rgs067mIto4OQ6ThUe471Da94