geckolinux / geckolinux-project

GeckoLinux bug tracker and documentation
https://geckolinux.github.io
209 stars 18 forks source link

Grub error: symbol `grub_calloc' not found. #141

Closed yxinolija closed 3 years ago

yxinolija commented 4 years ago

Hi, I recently stumbled upon this problem while updating with sudo zypper dup and restarting the computer.

Using Gecko Linux ROLLING KDE Plasma..

error: symbol `grub_calloc' not found. Entering rescue mode... grub rescue>

I'm unable to boot on my desktop but i can from laptop.

What should i do?

Thanks.

geckolinux commented 4 years ago

Hi, is the affected system using SecureBoot and/or EFI?

geckolinux commented 4 years ago

Looks like it's probably related to the mess that developed around the "Boothole" GRUB+UEFI bug. Almost all the information I can find about your error message is very recent. Unfortunately it looks like openSUSE wasn't spared from this either, although you appear to be the first to report it. This is the most helpful thread I can find: https://askubuntu.com/questions/1263125/how-to-fix-a-grub-boot-error-symbol-grub-calloc-not-found

I'd recommend filing an openSUSE bug report, as it's definitely upstream. Since GeckoLinux uses 100% openSUSE + Packman packages, openSUSE can support this sort of problem, as an installed GeckoLinux system is essentially openSUSE.

Please let us know what comes of this. Thanks for reporting.

yxinolija commented 4 years ago

It's UEFI/GRUB2 for EFI, and secure boot is off inside BIOS.

Thanks for your help, I'll let you know.

yxinolija commented 4 years ago

Bugzilla Link

geckolinux commented 4 years ago

Thanks @yxinolija . Meanwhile you could try repairing it with a GeckoLinux live USB as described in the above Askubuntu thread.

geckolinux commented 4 years ago

Another couple of questions for @yxinolija :

Was this a fresh install of GeckoLinux that you updated for the first time? Or had you performed successful zypper dup upgrades before on this system?

Are there any other OSes installed on this same machine?

yxinolija commented 4 years ago

Desktop: I dual boot with Win10, i used standard openSUSE Tumbleweed until i ran into gecko. So i guess it was like, format, install gecko and then update via zypper dup, when i stumbled upon that error, i reformatted again two times, reinstalled two times, still the same.

yxinolija commented 4 years ago

Thanks @yxinolija . Meanwhile you could try repairing it with a GeckoLinux live USB as described in the above Askubuntu thread.

I will and report the results here in a few hours. Thank you.

geckolinux commented 4 years ago

So i guess it was like, format, install gecko and then update via zypper dup, when i stumbled upon that error

And after installing GeckoLinux on that machine for the first time did you have any successful zypper dup ? What I'm trying to get at is that the most recent release of GeckoLinux ROLLING was on 2020-07-29, but very shortly after that this whole Boothole thing blew up. But there should have been a brief window after the GeckoLinux release and before the updated GRUB packages. So I just want to make sure that before the buggy GRUB packages were introduced that you could do a successful zypper dup on that setup.

Here's what you could do: Tumbleweed-CLI uses historical snapshots of the Tumbleweed repos. Try installing it and setting it to upgrade to the 20200802 snapshot. If that snapshot updates and reboots successfully try upping it one by one until you figure out which snapshot introduced the bug.

Thanks for your time to help troubleshoot.

yxinolija commented 4 years ago

Nope, only on laptop for some reason which is updated to latest snapshot, but not desktop.

Basically, install and use Tumbleweed-CLI inside Gecko that hasnt been zypper-dupped, right?

geckolinux commented 4 years ago

On 09/08/2020 09:56, yxinolija wrote:> Basically, install and use Tumbleweed-CLI inside Gecko that hasnt been zypper-dupped, right?

Right, what Tumbleweed-CLI will do is change the repos from the normal openSUSE Tumbleweed latest to the snapshot date that you choose. Then it will run the zypper dup for you, or if you interrupt the process then you can run it yourself.

yxinolija commented 4 years ago

When using "tumbleweed switch --install 20200802", should i ignore the line that says it will be updated to 20200807?

yxinolija commented 4 years ago

Nevermind, its an issue as listed in here, will turn off the official tumbleweed repos if that helps.

yxinolija commented 4 years ago

I cant seem to install the 20200802 snapshot even with repos turned off, I'm unable to test the snapshots with tumbleweed-cli even when target is 20200802, it still does a distribution upgrade to the latest 20200807 or just downgrades installed packages.

geckolinux commented 4 years ago

Please post the contents of your /etc/os-release and your /etc/zypp/repos.d/Tumbleweed_OSS.repo file

Then post the output of: tumbleweed status

Then try: tumbleweed switch 20200802

yxinolija commented 4 years ago

Screenshot_20200809_220443

btw its a freshly reinstalled system again, since i kinda tried to ignore the zypper dup line saying its updated to latest 20200807, apologies

geckolinux commented 4 years ago

OK that all looks good, notice the target: 20200802. So now just do a sudo zypper dup and it should get you to the 20200802 snapshot.

yxinolija commented 4 years ago

even tho its switched to 20200802, it still wants to update to the latest 20200807 via here: Screenshot_20200809_202721

geckolinux commented 4 years ago

OK, I see the problem, I think you forgot to initialize the Tumbleweed-CLI configuration: tumbleweed init

Then again: tumbleweed switch 20200802

yxinolija commented 4 years ago

Returns this:

Screenshot_20200809_203150

geckolinux commented 4 years ago

That's fine, it's just saying that's what the target is set to. Your /etc/zypp/repos.d/Tumbleweed_OSS.repo should be different now, and zypper dup should now offer to take you to 20200802.

yxinolija commented 4 years ago

Unfortunately it still returns 20200807 Screenshot_20200809_203451

geckolinux commented 4 years ago

For some reason it's not modifying your repository files. I think you need to su root first. Then try:

tumbleweed uninit tumbleweed init

yxinolija commented 4 years ago

without luck, still the same: Screenshot_20200809_203832

geckolinux commented 4 years ago

Please post a screenshot of Yast Repositories.

yxinolija commented 4 years ago

Here: image

geckolinux commented 4 years ago

For whatever reason it's not modifying the repositories. You can just manually change the Tumbleweed_OSS repo URL to this: http://download.opensuse.org/history/20200802/tumbleweed/repo/oss/

Then zypper dup

yxinolija commented 4 years ago

Success, will report when the grub error still shows up on 20200802

geckolinux commented 4 years ago

OK, thanks a lot for your time, and really sorry for the hassle.

yxinolija commented 4 years ago

Its alright.

Btw, it returns the same after zypper dup to 20200802, grub_calloc not found

geckolinux commented 4 years ago

Ah, that's interesting. So they introduced the bug very shortly after the most recent GeckoLinux release. If I generate a current GeckoLinux ROLLING Plasma ISO from the latest packages would you mind installing it and seeing if that successfully updates to future Tumbleweed releases?

yxinolija commented 4 years ago

Sure, ill try

geckolinux commented 4 years ago

OK, give me an hour or so and I'll have a download link for you. Thanks!

yxinolija commented 4 years ago

No problem, thanks.

yxinolija commented 4 years ago

Will it make a difference if ill just clone my windows somewhere and use my whole SSD for Gecko without dualboot? Just to repeat the steps from before if dualboot is the problem

geckolinux commented 4 years ago

I don't fully understand what happened with this Boothole mess, but it had something to do with Microsoft being the certificate authority that confirms that the GRUB bootloader is legitimate. So when they found a serious GRUB vulnerability, Microsoft blacklisted that version, and then they discovered problems caused by the fixes to GRUB and rolled them back, leaving GRUB in some kind of a limbo state where the old version can't be used and it can't boot to update to the new one. Something like that.

So it's pretty easy to generate a new GeckoLinux ISO, I'd be interested in knowing if that continues to work from here on out.

Meanwhile could you please try to completely remove the GRUB bootloader from your UEFI settings?

yxinolija commented 4 years ago

Sounds like a big mess after that vulnerability discovery. I can remove it but via reformatting the boot partition where GRUB is installed thru LiveCD, if thats ok with you.

geckolinux commented 4 years ago

Ah yes, true, reformatting the EFI partition should work. Probably backup that partition somewhere first to keep around the Windows bootloader, just in case. Then you could just use the Advanced partitioning option in Calamares once I get you the new ISO.

yxinolija commented 4 years ago

Alright, standing by.

yxinolija commented 4 years ago

Should i use rufus or etcher for writing the image?

geckolinux commented 4 years ago

Should i use rufus or etcher for writing the image?

Probably etcher, but both should work. Here you go: https://sourceforge.net/projects/geckolinux/files/testing/ The GeckoLinux_ROLLING_Plasma.x86_64-999.200808.0.iso will be available for download in a few minutes as soon as it gets picked up by the mirrors.

yxinolija commented 4 years ago

Thank you, update coming soon.

yxinolija commented 4 years ago

Even though the Calamares installer randomly exited on me close to the end, i successfully booted inside, running zypper dup now.

rebooting..

and successful boot, everything working now.

I salute you and thank you for solving this.

geckolinux commented 4 years ago

Thanks for your persistence. The real test will be in a day or two the next time there is a new Tumbleweed release, especially if it contains updated GRUB packages. Please report back how that goes.

yxinolija commented 4 years ago

True, no prob. Will do when the problem comes back. Thanks again.

yxinolija commented 4 years ago

Leaving a link to reddit post about the same thing but on Leap:Reddit

geckolinux commented 4 years ago

Leaving a link to reddit post about the same thing but on Leap:Reddit

I saw that too... So this is absolutely an upstream issue, i.e. nothing I can do to prevent it from hitting GeckoLinux users. If @yxinolija confirms that his freshly installed system from the GeckoLinux 20200808 ISO survives a few zypper dups, then I'll probably refresh the entire GeckoLinux lineup so that at least fresh installs don't get hit by this bug. Existing users should probably not update their systems until we have some sort of official resolution from openSUSE and it is confirmed to have hit the update repositories.

yxinolija commented 4 years ago

Just a little update when i started my laptop:

I listed my boot options, one is grub, second one is geckolinux-secureboot. The grub choice returns the grub_alloc obviously, but the secureboot boots up normally even though secure boot inside LT BIOS is disabled. Just a little heads up.

geckolinux commented 4 years ago

Interesting. I honestly don't understand the intricacies of how UEFI works, I'm very old-school in that sense.

yxinolija commented 4 years ago

Update:

Zypper-dup successful from 20200807 to 20200810 while using the updated GeckoLinux_ROLLING_Plasma.x86_64-999.200808.0.iso on my laptop.

More info coming soon on the desktop computer.