RPi CMOS
Frederick Bambrough (1372) 837 posts |
I recently added a SSD to my RPi4. Having moved everything over to it, I decided to leave the originals on the SD card with !Boot/Loader. An instant backup should the drive fail. Experimenting with scripts for SyncDiscs, I saw that a copy of CMOS was being copied from !Boot.Choices. That didn’t seem correct given that it’s supposed to live in Loader. Noting how the file dates changed I concluded that the process was that CMOS gets saved to Choices then gets copied to Loader on shutdown. Wanting to find out why it works that way, I had a look at ROOL’s doc, ‘CMOS on the Raspberry Pi’. What I see there doesn’t seem to match my observations. Is it out of date or am I incorrect or …? ROS 5.29 |
Stuart Painting (5389) 714 posts |
Author of CMOS RAM on the Raspberry Pi piping up here. !Boot.Loader.CMOS gets updated at each tidy shutdown. This is to maintain the last known system time (as the Raspberry Pi doesn’t have a battery-backed RTC). !Boot.Choices.CMOS is created (and updated) after the user clicks MENU on the Configuration window and chooses “CMOS > Save”. This file should then stay in the same state until the user repeats the process at a later date. To check whether something had changed recently, I built a new boot SD from the latest 5.29 ROM (18 November 2022) and HardDisc4 image (29 November 2022), then plugged it into my trusty Pi3B and switched on. As expected, !Boot.Loader.CMOS had a very old date, and !Boot.Choices.CMOS didn’t exist at all. I created !Boot.Choices.CMOS (using “CMOS > Save” as mentioned above) then pressed Shift-Ctrl-F12 to shut down. On restarting, !Boot.Loader.CMOS had acquired a recent timestamp, but !Boot.Choices.CMOS still had its original timestamp. Just in case this was a one-off issue, I waited a few minutes, then pressed Shift-CTRL-F12 again. After the restart, !Boot.Choices.CMOS still had its original timestamp and !Boot.Loader.CMOS had an even newer timestamp. I can only suppose that something on your system (most likely an Obey file called at startup or shutdown) is saving an extra copy of CMOS settings to !Boot.Choices.CMOS. |
Frederick Bambrough (1372) 837 posts |
No, no, no! What you’re describing is exactly what I see. No quibble there. It was just that it was a new observation for me, so unexpected, and didn’t seem explained by the docs. Just wanted to confirm my observation. Edit: I see where there may be confusion. My comment about copies was about ME making backups, thus noticing the location of CMOS. |