#
dcfadad5 |
| 23-May-2023 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Run fsck on the alternate image and hostfw
Before mounting the alternate image, run fsck on it to determine if the filesystem is corrupted, this could happen if the BMC rebooted in the middle o
mmc: Run fsck on the alternate image and hostfw
Before mounting the alternate image, run fsck on it to determine if the filesystem is corrupted, this could happen if the BMC rebooted in the middle of a code update for example. Invalidate the image if it's found to be corrupted.
Run fsck on the hostfw partition too, this is a writable partition that can benefit from autocorrection. The mmc initramfs runs fsck on the rwfs partition already. It's a good practice to run fsck on writable partitions. Do not fail if fsck fails on the hostfw partition, if it's corrupted, an error would occur during the power on.
Tested: Verified there were no errors with this change. This change adds about 1s to the execution of the mount service, from 5s to 6s to start:
May 24 19:07:27 p10bmc systemd[1]: Starting Mount BMC rofs volumes after a reboot... May 24 19:07:27 p10bmc obmc-flash-bmc[328]: /dev/disk/by-partlabel/rofs-a: clean, 6430/68816 files, 192421/275012 blocks May 24 19:07:27 p10bmc kernel: EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Quota mode: disabled. May 24 19:07:33 p10bmc fsck.ext4[474]: hostfw: clean, 247/655360 files, 196363/1310720 blocks May 24 19:07:34 p10bmc kernel: EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Quota mode: disabled. May 24 19:07:34 p10bmc systemd[1]: obmc-flash-mmc-mount.service: Deactivated successfully. May 24 19:07:34 p10bmc systemd[1]: Finished Mount BMC rofs volumes after a reboot.
Change-Id: I0efedb6d72e1d0d6018974598c4b361eafe7441b Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
1e81f23c |
| 18-Jan-2022 |
Adriana Kobylak <anoo@us.ibm.com> |
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is func
Determine functional versions from mount directory
In order to support the same version on the primary and backup flash locations, the version string is not enough to determine which version is functional. Therefore add a functional suffix to the mount directory of the functional and use that to set the Version as functional.
Tested: The mount directories indicate which version is functional, associations look correct.
- static: root@romulus:~# ls -l /run/media/rofs-79139bc0-functional/etc/ lrwxrwxrwx 1 root root 15 Jan 22 20:11 os-release -> /etc/os-release
root@romulus:~# busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/functional org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.Association endpoints v as 1 "/xyz/openbmc_project/software/79139bc0"
- ubi root@witherspoon:~# df /dev/ubiblock0_0 18816 18816 0 100% /media/rofs-cfb85943-functional /dev/ubiblock4_0 18816 18816 0 100% /media/rofs-26085328
- mmc: Verified functional association is correct, the rofs directories are still unmounted after the bmc updater starts.
Change-Id: I8114a86b36ca1c6b1634b01fcce3cef0a2369eca Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
8c5209d3 |
| 12-Jul-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Add support for update/delete hostfw The hostfw image file can be delivered in the code update tarball. If it is, then update it (copy the file to the hostfw partition directory
mmc: Add support for update/delete hostfw The hostfw image file can be delivered in the code update tarball. If it is, then update it (copy the file to the hostfw partition directory. To delete it, need to first unmount the secondary (non- running) hostfw mount, then delete the file. Change-Id: I352dd017114d58b79f9e624983841eafce5badf1 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
#
d7fbc1e3 |
| 06-Jun-2020 |
Adriana Kobylak <anoo@us.ibm.com> |
mmc: Add mount services The iterm updater relies on the versions being mounted in the MEDIA_DIR in order to create the D-Bus objects when the BMC first starts up. Create two
mmc: Add mount services The iterm updater relies on the versions being mounted in the MEDIA_DIR in order to create the D-Bus objects when the BMC first starts up. Create two services: one to mount the emmc rootfs partitions so that the version D-Bus objects get created, and another one to unmount them after the item updater has run because there's no need to keep the mounts around, actually they shouldn't be mounted during a code update. The UBI layout does an unmount at the start of an update, but it's less risky to just unmount once the mount is no longer needed in case the update is done manually by starting the update service file or directly calling obmc-flash-bmc. These services get started automatically by adding a dependency to the item updater service: "WantedBy=xyz.openbmc_project.Software.BMC.Updater.service" The mount has a "Before" directive and the unmount has an "After" directive. This allows the item updater to have the mounts available for processing and they are unmounted once the processing is complete. Also add a dash "-" to ExecStart to ignore errors: https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= This is needed since the non-running filesystem may had been invalidated during a Delete operation. This directive still logs an error but does not put the service file in Failed state: Ex: Jul 11 16:36:07 rainier systemd[1]: Starting Mount BMC rofs volumes after a reboot... Jul 11 16:36:07 rainier sh[423]: mount: /media/rofs-b: wrong fs type, bad option, bad superblock on /dev/mmcblk0p5, missing codepage or helper program, or other error. Jul 11 16:36:07 rainier systemd[1]: obmc-flash-mmc-mount.service: Succeeded. Jul 11 16:36:07 rainier systemd[1]: Finished Mount BMC rofs volumes after a reboot. Jul 11 16:36:07 rainier systemd[1]: Started OpenBMC Software Update Manager. Jul 11 16:36:07 rainier systemd[1]: Starting Unmount BMC rofs volumes... Jul 11 16:36:08 rainier umount[427]: umount: /media/rofs-b: no mount point specified. Jul 11 16:36:08 rainier systemd[1]: obmc-flash-mmc-umount.service: Succeeded. Jul 11 16:36:08 rainier systemd[1]: Finished Unmount BMC rofs volumes. Tested: Verified the D-Bus version objects are created after BMC reboot, and the item updater service starts successfully after a Delete operation. Change-Id: Ic0c83391a2879b8508bf5aa9f18941590d96352d Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|