Re: I'm suddenly booting into BIOS/UEFI instead of to 22.04 login screen
Originally Posted by
MAFoElffen
I would also check the voltage of the CMOS battery. A long-shot, but suspect.
There is a way to do that "programatically"... On shutdown, do
Code:
dd if=/dev/nvram of=cmos_ram_01.bin
On startup do it again to a comparison file
Code:
dd if=/dev/nvram of=cmos_ram_02.bin
TEST=$(cmp -b cmos_ram_01.bin cmos_ram_02.bin) # This will printout any bytes that differ
if [! -z "$TEST" ]
then
logger "NVRAM corrupted." # This will enter a message into the syslog
fi
I am also at this point suspecting the CMOS battery, but could I maybe get some clarification about running the the above commands?
So just before shutting down, I created a cmos_ram_01.bin file with your first line above.
Then I re-started and created the cmos_ram_02.bin file immediately after starting up.
The rest is what I have trouble with. I can enter this line at my prompt:
TEST=$(cmp -b cmos_ram_01.bin cmos_ram_02.bin)
and nothing happens, except that I am returned to my shell prompt. (Maybe nothing is supposed to happen yet.)
But when I enter:
if [! -z "$TEST" ]
I am put into a secondary "if -->" prompt (which I may have long ago set up as a python prompt, something like that) and nothing else happens. I can then enter logger "NVRAM corrupted." but none of these entries return any info on the commandline.
Maybe what I need to see from this is in the syslog, but I don't recall exactly where in the file system syslog is located.
Wait -- just now opening the lnav app, it puts me into syslog_log, and I see this:
Dec 1 16:07:43 rjbox rj: NVRAM corrupted.
But that's only because I wrote "logger "NVRAM corrupted" at the prompt, right? Shouldn't I see somewhere a voltage difference?
I'm afraid I'm not clear on how to run the commands you put above.
(For what it's worth, I did this (thoug it may not tell the whole story):
Code:
--> cat /proc/driver/rtc | grep batt
batt_status : okay
Last edited by watchpocket; December 1st, 2023 at 11:28 PM.
CPU: AMD Ryzen 7 3800XT Mobo: Asus ROG Crosshair VIII Hero wifi
Drives: 2 1TB Sabrent Rocket 4+ NVMEs; 1 SanDisk Ultra II 960GB SSD
Graphics: NVIDIA Gigabyte GeForce RTX 3060
RAM: 4x 32-GB G.SKILL. I use Vim not gedit; Zsh not Bash