View Issue Details

IDProjectCategoryView StatusLast Update
0008398Kali LinuxGeneral Bugpublic2023-08-31 04:14
Reporterxefeyis114 Assigned Toarnaudr  
PriorityimmediateSeverityblockReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2023.2 
Summary0008398: Unable to boot kali after 'apt upgrade' & stuck at 'Loading Initial ramdisk'
Description

First: In Hyper-V, I had installed Kali 2023.2, I've restarted Hyper-V service and when trying to boot kali it stucks at BusyBox (initramfs) but keyboard not working (Cannot run fsck).

Second: I've installed pre-built virtual machine for Hyper-V in my Hyper-V, it runs smooth, but after doing "sudo apt upgrade", and trying to reboot it stucks at "Loading Initial ramdisk...."; and in the Grub menu I found two images to boot:
-Kali Linux 6.3.0-Kali1
-Kali Linux 6.1.0-Kali9
When Highlighting "Kali Linux 6.1.0-Kali9" it boots normally but not in the newest one.

How to solve these two critical problems?

Attached Files

Activities

xefeyis114

xefeyis114

2023-07-23 13:12

reporter   ~0018254

The second problem was fixed:

1) apt remove linux-image-6.3.0-kali1-amd64
2) apt remove mdadm
3) apt install --fix-missing linux-image-6.3.0-kali1-amd64

Then boot normally

But still the first problem not fixed!!!!

xefeyis114

xefeyis114

2023-07-23 14:08

reporter   ~0018255

Unfortunately this happened one time!

HarmfulBreeze

HarmfulBreeze

2023-07-25 09:27

reporter   ~0018256

Hi, I can confirm this issue and I was able to work around it by booting kernel 6.1.

I haven't been able to debug it however as journalctl --dmesg -b -1 does not yield logs of the boot attempts with kernel 6.3. GRUB also seems to be fine (the bootup sequence hangs after loader/i386/loader.c:1154), it just seems like something's up with the initramfs.
Also this "workaround" of removing the image and mdadm packages did not work for me (I of course reinstalled the kernel with APT but nothing of interest showed up in the logs either). I do not have mdadm installed in the first place.

I'm here if you need any more information.
Thanks!

Pierre

xefeyis114

xefeyis114

2023-08-08 20:32

reporter   ~0018289

This issue is updated

RandonDude

RandonDude

2023-08-22 13:43

reporter   ~0018353

Hi, i can confirm this problem. i got an intel 12gen cpu and nvidia gpu on my notebook.

its something realted to Intel's IBT (Indirect branch tracking). Just turn it off in the GRUB Boot Parameters.

After this, everything works perfectly fine.

Steps:

  1. Reboot
  2. In the GRUB Boot Menu press e to edit params
  3. in the linux line add at the end "ibt=off"
  4. press CTRL+X to save and boot

if you want to make this change permanently just edit /etc/default/grub
https://wiki.archlinux.org/title/kernel_parameters#GRUB

HarmfulBreeze

HarmfulBreeze

2023-08-22 13:48

reporter   ~0018355

Hey RandonDude,

Thanks for the workaround! Indeed it also seems to work on my end (i5-1345U with no discrete GPU).
Hopefully an actual fix is found :)

Pierre

arnaudr

arnaudr

2023-08-22 16:59

manager   ~0018357

Seems like there are two bugs in this report. Question for HarmfulBreeze and RandonDude: are you running Kali with Hyper-V? Or baremetal? Or what?

For xefeyis114: it's possible that you hit a bug with a particular version of a kernel. Or, when you installed Kali in Hyper-V, did you choose to encrypt the drive? I think that this setup doesn't work... Other than that, we tried with latest Kali (2023.3, to be released very soon), the Hyper-V premade image works, and we could successfully upgrade it to a newer kernel, and reboot. No problem, it went smoothly.

HarmfulBreeze

HarmfulBreeze

2023-08-24 09:41

reporter   ~0018364

Hi arnaudr,
I'm running Kali with Hyper-V: Gen2/UEFI. If you need any logs or anything, please tell me.

Thanks!
Pierre

HarmfulBreeze

HarmfulBreeze

2023-08-24 09:43

reporter   ~0018365

Some people seem to face a very similar issue with VMware Player, also fixed with ibt=off: https://communities.vmware.com/t5/VMware-Workstation-Player/kernel-6-3-4-may-break-vmware-player/td-p/2971432

deyixtan

deyixtan

2023-08-24 12:49

reporter   ~0018369

Hi arnaudr,

I've tried both 2023.3 iso and the Hyper-V premade image released today and this issue still persists. I had also verified that with RandonDude's workaround, both iso and premade image works.

I believed this is an issue introduced since the adoption of kernel 6.3: https://bugzilla.redhat.com/show_bug.cgi?id=2221531

HarmfulBreeze

HarmfulBreeze

2023-08-24 15:10

reporter   ~0018371

A patch was merged into the kernel: https://github.com/torvalds/linux/commit/d5ace2a776442d80674eff9ed42e737f7dd95056

deyixtan

deyixtan

2023-08-24 16:14

reporter   ~0018372

Yup, I've tried rebuilding the kernel with said patch it works:
https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/patch/?id=d5ace2a776442d80674eff9ed42e737f7dd95056

arnaudr

arnaudr

2023-08-24 21:13

manager   ~0018375

Do you happen to know if this patch is in the 6.4 kernel? We have kernel version 6.4.11-1kali1 in kali-experimental, feel free to give it a try.

Here's a quick doc to enable the Kali experimental repository: https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/#enabling-kali-additional-branches

Then you can install the kernel with a command such as: sudo apt update && sudo apt install -t kali-experimental linux-image-amd64

deyixtan

deyixtan

2023-08-25 09:02

reporter   ~0018376

Tested kernel 6.4.11-1kali1 and it works.
Also verified that the kernel 6.4 source had the patch applied.

Screenshot 2023-08-25 165803.png (146,071 bytes)   
Screenshot 2023-08-25 165803.png (146,071 bytes)   
arnaudr

arnaudr

2023-08-31 04:12

manager   ~0018424

Hello all, first thanks for the reports, and the time you spent following up and testing. This is much appreciated.

We just rebuilt and published a new Hyper-V pre-made image. It contains the kernel 6.4. This image is available at the usual location: https://www.kali.org/get-kali/#kali-virtual-machines. When you download it, you will notice that the image has the version 2023.3a. That's it, that's the one, that's the image with the fix!

So, for everyone affected by the issue with the pre-made Hyper-V image: just download it again.

Now, second case: for those who can't use the pre-made image, and instead need to install Kali within Hyper-V (hence using a installer image from https://www.kali.org/get-kali/#kali-installer-images). We did NOT rebuild those images, so you might still be affected by the bug. You have the following options:

  1. Don't use a installer image, use a premade Hyper-V image instead
  2. Otherwise, use the latest weekly installer image (it comes with kernel 6.4)
  3. As a last resort, you can always disable IBT by adding ibt=off to the kernel cmdline

Just to clarify: not everyone is affected by this issue, from what I could gather: « IBT is supported, for kernel code only, in Intel processors starting with the Tiger Lake generation, which hit the market in late 2020 » So the issue doesn't affect those who have Intel CPUs older than that.

Thanks to everyone involved!

Issue History

Date Modified Username Field Change
2023-07-23 11:39 xefeyis114 New Issue
2023-07-23 13:12 xefeyis114 Note Added: 0018254
2023-07-23 14:08 xefeyis114 Note Added: 0018255
2023-07-25 09:27 HarmfulBreeze Note Added: 0018256
2023-08-08 20:32 xefeyis114 Note Added: 0018289
2023-08-22 13:43 RandonDude Note Added: 0018353
2023-08-22 13:48 HarmfulBreeze Note Added: 0018355
2023-08-22 16:59 arnaudr Note Added: 0018357
2023-08-24 09:41 HarmfulBreeze Note Added: 0018364
2023-08-24 09:43 HarmfulBreeze Note Added: 0018365
2023-08-24 12:49 deyixtan Note Added: 0018369
2023-08-24 15:10 HarmfulBreeze Note Added: 0018371
2023-08-24 16:14 deyixtan Note Added: 0018372
2023-08-24 21:13 arnaudr Note Added: 0018375
2023-08-25 09:02 deyixtan File Added: Screenshot 2023-08-25 165803.png
2023-08-25 09:02 deyixtan Note Added: 0018376
2023-08-31 04:12 arnaudr Note Added: 0018424
2023-08-31 04:13 arnaudr Assigned To => arnaudr
2023-08-31 04:13 arnaudr Status new => assigned
2023-08-31 04:14 arnaudr Status assigned => resolved
2023-08-31 04:14 arnaudr Resolution open => fixed