1diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh 2index 2a32d26ffc..a8cc76d440 100644 3--- a/obmc-init.sh 4+++ b/obmc-init.sh 5@@ -287,6 +287,14 @@ then 6 fi 7 fi 8 9+# Ensure that we clean our rwfs on version change 10+if mount $rwdev $rwdir -t $rwfst -o $rwopts; then 11+ if ! cmp "$rwdir"/os-release /etc/os-release 2>/dev/null; then 12+ echo "RWFS from older BMC version, cleaning" 13+ touch $trigger 14+ fi 15+ umount "$rwdir" 16+fi 17 if grep -w clean-rwfs-filesystem $optfile 18 then 19 echo "Cleaning of read-write overlay filesystem requested." 20@@ -411,6 +419,9 @@ HERE 21 debug_takeover "$msg" 22 fi 23 24+# Keep track of the last version to use this rwfs 25+cp /etc/os-release "$rwdir"/os-release 26+ 27 # Empty workdir; do not remove workdir itself for it will fail to recreate it if 28 # RWFS is full 29 if [ -d $work ] 30