diff options
author | Ciaran Concannon <cjcon90@pm.me> | 2024-01-23 19:15:01 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2024-02-29 01:39:21 +0300 |
commit | 2e1c7b17fc238d773f056b7825b227354a4f0d0d (patch) | |
tree | 6c3ad0d7df4099cfd5a4c19496847b85178a5d74 /meta-ieisystems | |
parent | 2731f2b86c39abc8cdefd5fae0d5119ce3d7b841 (diff) | |
download | openbmc-2e1c7b17fc238d773f056b7825b227354a4f0d0d.tar.xz |
meta-phosphor: static-norootfs: check for uboot env to mount ubifs as tmpfs
Add a check if `openbmconce` U-boot env set as `no-persist-fs`
if so, then instead of mounting `/run/mnt-persist` as ubifs filesystem,
simply mount it as tmpfs. This will prevent issues related to a mounted,
persistent filesystem when running data sanitization scripts to wipe
the BMC.
Test:
Build and run in QEMU. Initial mounts:
```
root@bletchley:~# mount | grep "mnt-persist"
ubi0:rwfs on /run/mnt-persist type ubifs (rw,relatime,sync,compr=zstd,assert=read-only,ubi=0,vol=0)
overlay on /var type overlay (rw,relatime,lowerdir=/var,upperdir=/run/mnt-persist/var-data,workdir=/run/mnt-persist/var-work,uuid=on)
overlay on /etc type overlay (rw,relatime,lowerdir=/etc,upperdir=/run/mnt-persist/etc-data,workdir=/run/mnt-persist/etc-work,uuid=on)
overlay on /home/root type overlay (rw,relatime,lowerdir=/home/root,upperdir=/run/mnt-persist/home/root-data,workdir=/run/mnt-persist/home/root-work,uuid=on)
overlay on /mnt/data type overlay (rw,relatime,lowerdir=/mnt/data,upperdir=/run/mnt-persist/mnt/data-data,workdir=/run/mnt-persist/mnt/data-work,uuid=on)
```
Run `fw_setenv openbmconce no-persist-fs && reboot`. Afterwards:
```
root@bletchley:~# mount | grep mnt-persist
tmpfs on /run/mnt-persist type tmpfs (rw,relatime)
overlay on /var type overlay (rw,relatime,lowerdir=/var,upperdir=/run/mnt-persist/var-data,workdir=/run/mnt-persist/var-work,redirect_dir=nofollow,uuid=null)
overlay on /etc type overlay (rw,relatime,lowerdir=/etc,upperdir=/run/mnt-persist/etc-data,workdir=/run/mnt-persist/etc-work,redirect_dir=nofollow,uuid=null)
overlay on /home/root type overlay (rw,relatime,lowerdir=/home/root,upperdir=/run/mnt-persist/home/root-data,workdir=/run/mnt-persist/home/root-work,redirect_dir=nofollow,uuid=null)
overlay on /mnt/data type overlay (rw,relatime,lowerdir=/mnt/data,upperdir=/run/mnt-persist/mnt/data-data,workdir=/run/mnt-persist/mnt/data-work,redirect_dir=nofollow,uuid=null)
```
Observe /run/mnt-persist is mounted with tmpfs instead of ubifs and all
the overlays are still mounted.
Change-Id: I4b0251bce114ddad38706b5cd93aef31aa7e8e12
Signed-off-by: Ciaran Concannon <cjcon90@pm.me>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'meta-ieisystems')
0 files changed, 0 insertions, 0 deletions