persistent storage and bcc upgrade
Team,
I have a following question
1. what are directories mounted as rw and kept as persistent across reboot?
2. How are we updating BMC image and what happens to persistent storage after upgrade. I am using “flashcp” which copies complete 32 mb image which means it wipes out everything stored currently.
Regards
-Vijay
Quoted 5 lines · Vijay Khemka
Team,
I have a following question
what are directories mounted as rw and kept as persistent across
reboot?
It depends on the flash layout you choose, but the default phosphor initramfs will mount a readwrite overlay over the whole root. From that, /tmp and /run are excluded via a ramfs.
The UBI option will only allow writes to /var and /etc, and /home/root (well, also /run and /tmp are tmpfs again).
That said you can do other customization.
Quoted 3 lines
How are we updating BMC image and what happens to persistent storage after upgrade. I am using “flashcp” which copies complete 32 mb image which means it wipes out everything stored currently.
Are you doing flashcp while the filesystem is mounted? How are you avoiding errors?
Are you booting in "code update mode" which will copy the squashfs
to RAM? If so then read on.
The phosphor-initfs recipe has a whitelist file (was going to be a directory but never made the patch) that will copy files from the read-write backing filesystem to the overlay over the / to the /run initramfs. When booted in code-update mode, the files and directories in the whitelist are copied to /run.
When systemd shutown target is activated, the initramfs shutdown script will call the update script to save any initramfs images. After writing images with flash_erase and flash_cp it will mount the read-write partition and copy back the ram overlay to the persistent read-write filesystem (only the files in the whitelist). The shutdown script will also copy the u-boot env partition back to the mtd, so variables there will also be restored.
This is the default for aspeed AST2500 and ASt2400 and as far as I know would also run for npcm (they just have an additional partition).
This was somewhat described in the newly merged (today)
https://github.com/openbmc/docs/blob/master/code-update/flash-layout.md
Feels free to ask more questions though the list.
milton