View Issue Details

IDProjectCategoryView StatusLast Update
0004956Kali Linux[All Projects] Kali Package Improvementpublic2018-09-16 09:27
Reporteranonymoususer216Assigned Torhertzog 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version2018.2 
Target VersionFixed in Version2018.4 
Summary0004956: Upgrading from Kali 2018.2 to 2018.3 causes GRUB problems
DescriptionA long time ago, I installed Kali Linux 2018.2 on my laptop via USB. I had to do some tweaking to fit my needs, but overall it worked fine. However, recently I got a notification from the Software app about an OS Update. I restarted my computer and it automatically installed. Right off the bat I noticed a bunch of "start jobs" that were apparently trying to fix upgrading while offline? I wasn't sure of their purpose, only that there were a lot, and they might cause some problems later. Anyway, so after about 15 minutes, I checked back on my laptop, and I saw the computer was restarting. However, upon booting into the GRUB, I got stuck on this screen, which I have linked. I couldn't seem to figure out how to fix it. Luckily, I was able to backup my files, but now Kali GRUB seems rendered useless. How can I fix this? If you need me to, I can boot into Kali (using Super GRUB, an online tool for bringing up a temporary GRUB) to do some Terminal work.

Please help!
- AU216

Activities

anonymoususer216

2018-09-05 19:42

reporter  

grub-terminal.jpg (546,056 bytes)

elwood

2018-09-05 22:40

administrator   ~0009583

Thank you for the bug report. Can you also provide some additional information relating to what hardware are you using? Would this be EFI or a standard BIOS on this system? What is the model and brand of the laptop?

We are interested in helping with this issue, however we really need more to go on otherwise we just don't have enough here to recreate the issue. Please read https://kali.training/chapter-6/filing-a-good-bug-report/. Also, this would be a great topic to discuss with the community on the Kali Forums at http://forums.kali.org.

baduwi

2018-09-06 01:43

reporter   ~0009584

Seems like a problem with the latest version of grub. I've been struggling all day long trying to know why my dual boot kali-macOS was falling after fresh install of both. Turned to be that it works fine if I disable the option that adds the official repos when installing kali, then it doesn't install the latest version of Grub.

As far as I found looks like grub isn't creating its config file correctly, leaving it with the default options.

I hope this solves soon

baduwi

2018-09-06 05:34

reporter   ~0009585

So here is what I found in the last hours:

If you need to boot to your kali partition just follow these instructions -> https://askubuntu.com/questions/232215/stuck-in-grub-rescue-mode

Skip the las part where you do update-grub, it doesn't work. Just in case anyone needs this info:

System: MBP 9,2 (Mid-2012 i7 8GB RAM)
EFI, using refind to manage different OS's. Updated with the last grub version 2.02"something"1-16

Problem: It looks like grub isn't changing the default config parameters in its own config file.

Hope that helps

rhertzog

2018-09-06 07:08

administrator   ~0009586

FWIW the screenshot of @anonymoususer216 shows an ubuntu version of Grub. That's not something that Kali is shipping.

What version of Kali's grub introduced the problem for you @baduwi? There has been a new version a few days ago: grub2 2.02+dfsg1-6 on September 3rd.
https://pkg.kali.org/pkg/grub2

Did the problem start with this version? On the Debian side, I don't see any recent bug report showing a similar problem.

You seem to imply that update-grub is not updating Grub's configuration. Can you attach the broken /boot/grub/grub.cfg and try to find out any difference with the known-good version from before the upgrade?

rhertzog

2018-09-06 07:28

administrator   ~0009587

Also can you all make sure that you are using UEFI to boot and that SecureBoot is effectively disabled on your systems? The last versions of grub disabled some fallback code in SecureBoot mode, so if you were using this fallback, it might be that grub just stopped working for you.

ppnbp

2018-09-06 08:40

reporter   ~0009590

I also encountered the same problem, I need to manually enter the kali system, after entering the system

use command:
update-grub
grub-install

updated grub.cfg
Reboot
still the same after booting up
attached is my updated grub.cfg

grub.cfg (6,286 bytes)

baduwi

2018-09-06 14:01

reporter   ~0009594

The last thing that I found is that Grub is making its config just fine but it isn't loading it at boot time. I'm not able to do screenshots, but you can get to that conclusion if you do "set" into the grub cli, without parameters. Then you'll see that instead of changing the prefix for the one that kali uses it stays with the one that Debian uses. I suppose that's why nobody in the debian bug tracker did make any report about it.

Even though the screenshot made by @anonymoususer216 shows an ubuntu version of Grub I can assure you that it happens with the one used by kali.

Yes, that's the one that introduced all the problems to me. I can't find any difference between the config file before and after the update to 2.02+dfsg1-6.

Since I am using a MacBook Pro i'm by default using UEFI and secureboot doesn't apply to macs.

ppnbp

2018-09-06 14:41

reporter  

20180906_221158.jpg (1,916,325 bytes)

rhertzog

2018-09-06 20:42

administrator   ~0009597

As a data point, I installed the current weekly image (W36) in EFI mode and the system booted just fine. That weekly image installs grub2 version 2.02+dfsg1-5. I then dist-upgraded to get version 2.02+dfsg1-6 and it still worked. The installer installed /EFI/kali/grubx64.efi in the EFI boot partition and that's what got used to boot (I double checked by moving away the left-over files from other test installs).

The 2018.3 release ISO embeds grub2 version 2.02+dfsg1-4 which doesn't have this change that could be related to the issue raised here since people mention some path problems: https://salsa.debian.org/grub-team/grub/commit/d0d396f00dde159fe031558bac7a8174d69cd245

baduwi

2018-09-06 21:35

reporter   ~0009598

@rhertzog Try using this one -> http://cdimage.kali.org/kali-2018.3/kali-linux-2018.3-amd64.iso

Then install as normal and let kali add its repos. It'll automatically install version 2.02+dfsg1-6 over your clean installation. That's exactly how I reproduce it every time, over and over

elwood

2018-09-06 22:53

administrator   ~0009599

Working to reproduce this issue, and it does appear as if -6 is isolated as the issue. On a fresh install, when it asks you if you would like to use a network install say no and the installation should work correctly. We will be reviewing -6 to see what the issue there is.

baduwi

2018-09-06 23:24

reporter   ~0009600

not a very good workaround: If you need for whatever reason to do apt-get upgrade && apt-get dist-upgrade (like getting the linux-headers) it'll install the problematic version of grub. Also you will need to add the repositories manually.

I guess it's a better workaround to just install the problematic version and set the parameters manually whenever you want to boot.

elwood

2018-09-06 23:33

administrator   ~0009601

If you want to do an update after installing, just updating the repos based on https://docs.kali.org/general-use/kali-linux-sources-list-repositories and then you can just hold back grub from the update with an apt-mark hold. You can then do updates as needed.

Full fix will be coming.

rhertzog

2018-09-07 08:21

administrator   ~0009603

I made further discoveries explaining the difference between install with network enabled and without. When you have the network enabled, the installer will use grub-efi-amd64-signed. When it's not enabled, it can't use this package since it's not on the ISO.

The -signed package (as built by Debian) uses a monolitic grub image that is hardcoded to look up /EFI/debian/grub.cfg. But this script doesn't exist after the install, it's /EFI/kali/grub.cfg that we have. For this reason, booting the system is basically doing this in the grub shell:
> set prefix=(hd0,gpt1)/EFI/kali
> source $prefix/grub.cfg

Obviously you need to replace (hd0,gpt1) with the real EFI partition in case it's not the first one on the first harddrive.

FWIW, when you install without network you don't get any /EFI/kali/grub.cfg at all, the grubx64.efi in that case is able to find out the grub configuration directly from the place where kali has been installed. Now I need to figure out where that discrepancy is introduced.

rhertzog

2018-09-07 10:09

administrator   ~0009604

I'm in touch with the Debian maintainer, I filed this bug report: https://bugs.debian.org/908200

I'm working on a fix too.

rhertzog

2018-09-07 14:21

administrator   ~0009606

I have opted to fork grub in kali for now. I have uploaded version 2.02+dfsg1-6kali1 that should hopefully fix this issue.

baduwi

2018-09-08 03:44

reporter   ~0009607

Awesome man, I found out that too (what you said about grub looking for /EFI/debian/grub.cfg) but since i'm not that expert on how grub works and because english isn't my native tongue I didn't know how to explain myself.

So cool that you found out exactly what's wrong with that version and I hope that your fork gets into the main distribution soon.

I will keep an eye here just to know when the new version gets out. Also I will try it and give a report.

rhertzog

2018-09-08 07:44

administrator   ~0009612

The new grub is in kali-rolling and things should be working again.

anonymoususer216

2018-09-15 15:15

reporter   ~0009732

Hey everyone, thanks for all of the feedback; I've been away and haven't had access to this page, but thank you for helping me!

I posted more details on Super User (Stack Exchange), and I've received lots of negative input there, so I checked back and look what's happened!

Anyway, enough praise, I ended up reinstalling Kali after backing everything up, and now the GRUB works. I've read the other notes and it seems @rhertzog has fixed the issue, so I don't need anymore help, but in case this helps others:
I went into the Kali terminal and ran 'update-grub' and it DID NOT fix the issue. The full reinstall was the only working method for me.

Well, thanks again for the help!

-AU216

Issue History

Date Modified Username Field Change
2018-09-05 19:42 anonymoususer216 New Issue
2018-09-05 19:42 anonymoususer216 File Added: grub-terminal.jpg
2018-09-05 22:40 elwood Status new => acknowledged
2018-09-05 22:40 elwood Note Added: 0009583
2018-09-06 01:43 baduwi Note Added: 0009584
2018-09-06 05:34 baduwi Note Added: 0009585
2018-09-06 07:08 rhertzog Note Added: 0009586
2018-09-06 07:08 rhertzog Assigned To => rhertzog
2018-09-06 07:08 rhertzog Status acknowledged => assigned
2018-09-06 07:09 rhertzog Status assigned => feedback
2018-09-06 07:28 rhertzog Note Added: 0009587
2018-09-06 08:40 ppnbp File Added: grub.cfg
2018-09-06 08:40 ppnbp Note Added: 0009590
2018-09-06 14:01 baduwi Note Added: 0009594
2018-09-06 14:41 ppnbp File Added: 20180906_221158.jpg
2018-09-06 20:42 rhertzog Note Added: 0009597
2018-09-06 21:35 baduwi Note Added: 0009598
2018-09-06 22:53 elwood Note Added: 0009599
2018-09-06 23:24 baduwi Note Added: 0009600
2018-09-06 23:33 elwood Note Added: 0009601
2018-09-07 08:21 rhertzog Note Added: 0009603
2018-09-07 10:09 rhertzog Note Added: 0009604
2018-09-07 14:21 rhertzog Note Added: 0009606
2018-09-08 03:44 baduwi Note Added: 0009607
2018-09-08 07:44 rhertzog Status feedback => resolved
2018-09-08 07:44 rhertzog Resolution open => fixed
2018-09-08 07:44 rhertzog Fixed in Version => 2018.4
2018-09-08 07:44 rhertzog Note Added: 0009612
2018-09-15 15:15 anonymoususer216 Status resolved => feedback
2018-09-15 15:15 anonymoususer216 Resolution fixed => reopened
2018-09-15 15:15 anonymoususer216 Note Added: 0009732
2018-09-16 09:27 rhertzog Status feedback => resolved
2018-09-16 09:27 rhertzog Resolution reopened => fixed