You are not logged in.

#1 2020-11-26 14:04:21

alf9009
Member
Registered: 2020-02-29
Posts: 14

kernel panic - date at 2060

The battery of my asus netbook is empty, so RTC is sometimes after power up in the year 2060.
Since almost all default Bios settings are fine for me I plan not to change the battery.

With this date  archlinux32 won't boot, a Kernel Panic.
Changing the  year in the bios (nothing else) to 2020 solves the start issue.

I'm writing this here, to avoid that the crash will happen to every user in the year 20xx - I did't test were the exact limit is.

Offline

#2 2020-11-27 07:58:07

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 312
Website

Re: kernel panic - date at 2060

Mmh, 2038 sounds like a natural limit to me. :-)

Offline

#3 2021-04-12 16:54:36

alf9009
Member
Registered: 2020-02-29
Posts: 14

Re: kernel panic - date at 2060

Is there a fix possible ?
Or what can be a simple workaround ?

Pressing F2 to load bios defaults after each cold boot is not the issue, but going every time into bios and changing+saving the date is a bit ugly.

As workaround I have in mind to put somewhere (initramfs ?) e.g. 2020 as date, so it would boot, and then get via systemd-timesyncd the corrrect time later.

Changing Bios battery on my asus netbook is ugly too - I looked some videos...

Thanks :-)

Offline

#4 2021-04-12 17:50:40

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 888

Re: kernel panic - date at 2060

Well properly the fix is to fix your RTC, probably by changing the battery before it leaks acid all over your motherboard.

If you're looking for a software workaround for your lack of hardware maintenance, then you could look at putting in a hook then rebuilding your initcpio.  It all depends how early the kernel does it's snafu I guess.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#5 2021-04-14 18:37:12

alf9009
Member
Registered: 2020-02-29
Posts: 14

Re: kernel panic - date at 2060

Thanks :-)

If others are interested, this is video for "ASUS Eee PC 1000H disassembly cleaning cooler fan", where you can also see the step, when the battery is accessible:
https://www.youtube.com/watch?v=25lJcv55XqU

Offline

#6 2021-04-15 20:25:53

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 888

Re: kernel panic - date at 2060

Yes, it seems to be under the keyboard and the covering plate.  No need to pop anything out of the back.  Only problem is I'm finding it a little tricky to find an exact replacement, although the odds are something for something else will do, I just didn't get a good look at the connector from that video.  Looks like a CR2032 in a little bag, just need the right plug on the end.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#7 2021-04-16 15:21:17

alf9009
Member
Registered: 2020-02-29
Posts: 14

Re: kernel panic - date at 2060

I'm still thinking about a software solution,
something like the raspery pi has, or better not has: a rtc.

I searched the kernel command lines for a switch to disable rtc read.
I searched in the upacked initramfs image.
hwclock works on this device only with the option --directisa.
I tried also to block I/O to Ports 0x70 and 0x71 (reserve= and pnp_reserve_io=    )
no luck so far.

Offline

#8 2021-04-16 16:06:52

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 888

Re: kernel panic - date at 2060

I suspect what the kernel does on a rpi is look for an RTC and if it doesn't find one set it to something usable.  On your eeePC on the other hand you have an RTC it's just giving out invalid and harmful dates at present.

On my machine (an EeePC 901) hwclock reports the date either with --directisa or without any flags.  I'd expect your machine to be similar, but I don't know how similar.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

#9 2021-04-16 19:17:58

alf9009
Member
Registered: 2020-02-29
Posts: 14

Re: kernel panic - date at 2060

I found another solution,
grub is your friend, it has a build in date command, for read and set :-)

# /etc/grub.d/09_datepatch

export d=$(date "+%Y-%m-%d %H:%M:%S")
echo "adding date patch ${d}" >&2

cat << EOF
date ${d}
EOF

does the trick.

Last edited by alf9009 (2021-04-16 19:18:32)

Offline

#10 2021-04-16 19:37:54

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 888

Re: kernel panic - date at 2060

I'm kind of surprised that systemd doens't need to real date before that point.  Perhaps it goes back and writes the dmesg into the log once it wakes properly.


Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.

Offline

Board footer

Powered by FluxBB