Skip to main content

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
1 vote
1 answer
58 views

Is it possible to boot into new Linux image which is stored in RAM (and not written to disk)

I'm looking to create a setup where an OS image is (automatically) downloaded over the network and then booted into. The obvious way would be to write it to disk, reconfigure grub (or whatever) and ...
PhilipRoman's user avatar
0 votes
0 answers
73 views

kexec: is initrd fully pinned in memory or still backed by storage?

I have an embedded system booting on an eMMC, and I would like an easy way to flash the whole eMMC over ssh, without having to rely on PXE boot or things like that, for pratical reasons. I can easily ...
Etienne Doms's user avatar
2 votes
0 answers
101 views

Linux reboots with no panic when booting SMP configuration from kexec

I'm working on a project involving kexec. I have it working on some of our hardware platforms. On one platform, I'm getting sudden reboots with no panic dump during SMP setup: [ 25.219028] smpboot: ...
Sarvadi's user avatar
  • 121
1 vote
2 answers
182 views

5.4 Linux kernel on x86 panics with alignment exception when kexec'ed from 6.1 kernel

The boot chain here is UEFI -> 6.1.14 kernel built with EFI stub, initramfs loads and checks 5.4.109 kernel, then kexecs it. CPU is a 2-core Intel Atom N6210. When booted this way, at startup when ...
Corey Mutter's user avatar
0 votes
1 answer
537 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) ...
Eduardo's user avatar
  • 103
1 vote
1 answer
2k 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 ...
Harsh's user avatar
  • 151
1 vote
0 answers
253 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 ...
user3534974's user avatar
2 votes
0 answers
744 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 ...
Micah R Ledbetter's user avatar
-2 votes
1 answer
3k 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):...
Aayush Boliya's user avatar
5 votes
1 answer
2k 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 ...
ljwobker's user avatar
  • 539
1 vote
0 answers
215 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 --...
Charles Duffy's user avatar
0 votes
1 answer
811 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 ...
Melab's user avatar
  • 4,148
1 vote
1 answer
446 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 ...
gronostaj's user avatar
  • 708
4 votes
1 answer
3k 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
2k 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 ...
SurpriseDog's user avatar
4 votes
0 answers
2k 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: ...
tomptz's user avatar
  • 41
3 votes
0 answers
299 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 ...
Jewgeni T.'s user avatar
1 vote
1 answer
10k 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 ...
Tiago Pimenta's user avatar
1 vote
1 answer
215 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 ...
Junaid Shahid's user avatar
11 votes
5 answers
4k 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 ...
rudib's user avatar
  • 1,632
1 vote
0 answers
51 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 ...
PinkPR's user avatar
  • 101
10 votes
2 answers
4k 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.
poige's user avatar
  • 6,280
14 votes
2 answers
4k 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.
Naftuli Kay's user avatar
  • 40.2k
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 ...
Hans W. Heckel's user avatar
7 votes
1 answer
1k 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 ...
Gregory MOUSSAT's user avatar
3 votes
1 answer
1k 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 ...
Phil Williams's user avatar
4 votes
0 answers
491 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 ...
Gregory MOUSSAT's user avatar
4 votes
1 answer
542 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 ...
Uroc327's user avatar
  • 265
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 ...
peterh's user avatar
  • 9,828