Questions tagged [kexec]

kexec is a system call that enables to load and boot into another kernel from the currently running kernel.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Add additional parameter after running Kexec -l

I want to run Kexec -l to load a kernel, but before I run Kexec -e I want to add additional kernel parameters without running Kexec -l again. I tried running Kexec -e --append=STRING but it doesn't ...
user avatar
0 votes
1 answer
56 views

How to chainload another kernel with kexec inside a LUKS2 + LVM2 partition?

I have a Debian 11 installation with the following partition layout: path format mount point /dev/nvme0n1p7 ext4 (no encryption) /boot (Debian 11) /dev/nvme0n1p8 dm-crypt LUKS2 LVM2 (named vg_main) ...
user avatar
  • 103
0 votes
1 answer
146 views

Unable to Get Kernel Crash Dump on Kernel Panic

I'm using kexec-tools to get a crash dump of kernel on kernel panic. However, when I trigger the panic using sysrq-trigger, the system freezes. I have to power off and then power on to restore the ...
user avatar
  • 75
1 vote
0 answers
90 views

Load a second kernel at boot

At boot, the bootloader loads a kernel, let's say vmlinuz1. Is there a way to pass some kind of parameters to it in order to chainload another kernel (let's say vmlinuz2)? I know kexec can load ...
user avatar
2 votes
0 answers
404 views

How should I fix a failed kexec that produces "CPUs are stuck in the kernel" in dmesg?

I have built both a kernel from the Raspberry Pi sources and kexec-tools for arm64, and booted my kernel on a Raspberry Pi 4. When I attempt to run kexec, it produces no output, exits with a nonzero ...
user avatar
-2 votes
1 answer
2k views

Installing `kali-win-kex` on WSL2 fails

I tried installing Kali-Win-Kex by following the official guide. $ sudo apt install kali-win-kex -y dpkg: error processing archive /var/cache/apt/archives/kali-win-kex_2.7_amd64.deb (--unpack):...
user avatar
4 votes
1 answer
1k views

kexec reboot no longer skips firmware/hard reboot after upgrade to ubuntu 20.04

(Posting here rather than the Ubuntu subsite because I don't think it's specifically related to Ubuntu...) I've previously been successfully using kexec-reboot -lr from the exceptionally useful page ...
user avatar
  • 477
1 vote
0 answers
110 views

If retain_initrd is used, can this cpio image be accessed from userspace?

By default, the Linux kernel frees the memory that was used for an initramfs after its unpack is complete. If the kernel argument retain_initrd is used, then kexec --reuseinitrd becomes available to --...
user avatar
0 votes
1 answer
156 views

Reboot with kexec without making it default and vice versa

Upon installing kexec-tools, on Ubuntu at least, I am asked if I want to use kexec to handle all invocations of reboot. I don't, but there are some occasions that I do want graceful termination of ...
user avatar
  • 3,528
1 vote
1 answer
294 views

SSH key added on boot without password prompt - how and why?

I have a passphrase-protected SSH key stored in ~/.ssh/id_rsa. In my .zshrc I have this fragment: if ! ssh-add -l > /dev/null; then ssh-add fi After booting, I usually open the terminal, see ...
user avatar
  • 669
3 votes
1 answer
2k views

How to reset the video mode of the Intel driver i915 for the kexec-ed kernel so I can see what kexec kernel is doing?

I'm running Arch Linux and I've set up kdump so that when the current kernel panics(or I manually induce a crash via sysrq+c) then another kernel(the kexec kernel) starts up in order to create a crash ...
user avatar
2 votes
2 answers
1k views

Kexec into new kernel, but I can't access the initramfs prompt!

I used kexec to successfully load my kernel, but it's just printing dmesg lines. How do I get out of this to drop into the initramfs prompt? Ctrl-Alt-F2 just loads a black screen and ctrl-c does ...
user avatar
3 votes
0 answers
1k views

Hard lockup triggers reboot but no panic and no kdump

I have been trying to debug random system freezes when running the 4.14.93-rt kernel. To this end, I have enabled the lockup detector in the kernel using the following config: ...
user avatar
  • 31
3 votes
0 answers
244 views

kexec: relocate_kernel fails

I am not able to get kexec to work. For x86_64 relocate_kernel fails to store information for jumping back. Kexec stops in movq %r9, CP_PA_TABLE_PAGE(%r11). works fine for kernel 4.4.162, doesn't ...
user avatar
0 votes
1 answer
6k views

How to umount /var /usr safely on systemd without reboot

I have a Linux server on a VM which the reboot does work as powering off due to misconfiguration of a third part provider. I do not have access to VM configuration. The person who installed the ...
user avatar
1 vote
1 answer
143 views

Could the capture kernel be used as a normal kernel after a kexec?

I have read about the kexec/kdump facilities, we know that crashed/panic'ed kernel is made available via /proc/vmcore. I have heard people use kexec based booting to bypass EFI/BIOS/FW initialization ...
user avatar
8 votes
5 answers
2k views

Kexec to GRUB (or to Syslinux, or Windows)

I have an application where I need to boot to Linux, execute automated scripts and then automatically boot to Windows. Can I use Kexec to run grub? Another use case would be to boot a Linux kernel to ...
user avatar
  • 1,602
1 vote
0 answers
47 views

Boot Linux from Linux on embedded board

I'd like to know, is there a way to boot a new Linux system, from a Linux ? Let me explain : I want to keep 2 systems separated on an embedded board. One system is used to perform tasks at the ...
user avatar
  • 101
8 votes
2 answers
3k views

How to check if currently running Linux kernel has been loaded with kexec?

By checking I mean something quite rock-solid, i. e., trying to analyse loader's configuration or available kernel files and matching to uname's output clearly isn't an option.
user avatar
  • 5,959
14 votes
2 answers
3k views

Reboot without having to decrypt LUKS partitions?

Is there a way to kexec reboot a running kernel without having to decrypt an encrypted LUKS root filesystem? I'd imagine not, but I'm not sure if there's a workaround for this.
user avatar
  • 36.1k
3 votes
0 answers
2k views

Boot rescue kernel at high memory address using kexec on arm

Summary: Crashkernel boots at 512MB address in RAM with kexec -e/-l but not with kexec -p - why? Embedded platform with Marvell Armada XP (MV78460) (ARMv7 with 4 cores) and 1GB of RAM. production ...
user avatar
7 votes
1 answer
956 views

kexec and USE_GRUB_CONFIG

I find kexec very useful to speed-up the reboot of Linux servers. One parameter into /etc/default/kexec is USE_GRUB_CONFIG. This parameter is meant to "read Grub configuration file". But I don't ...
user avatar
3 votes
1 answer
927 views

kexec crashing when booting a kernel without initramfs (ARM)

First, a few details about the setup: Linux-3.14.1 ARM am335x chip U-Boot bootloader What I am trying to achieve: U-Boot loads a kernel that contains an initramfs (call this kernel 1). U-Boot ...
user avatar
4 votes
0 answers
348 views

kexec doesn't unmount root filesystem

With a Debian Jessie 8.0, freshly installed (with systemd), I installed kexec. When I restart the computer with the reboot command, this invoke kexec. The reboot is ok but I have a message into the ...
user avatar
4 votes
1 answer
465 views

does the second kernel need kexec enabled

It's clear that you need the kexec syscalls in the 'first' kernel. But does the kernel that should get loaded (with kexec_load and reboot) need to be compiled with kexec? If yes, what extra code ...
user avatar
  • 245
4 votes
2 answers
2k views

Easy way initrd to chain loading another kernel with kexec

I have here a machine which won't boot 64-bit kernels (it has efi32 with a little bit of... uncommon firmware). Currently, my only way to boot my 64-bit linux system is: Booting a 32-bit distro from ...
user avatar
  • 8,614