Skip to content

"Unable to handle kernel paging request at virtual address" during kexec #578

@p0lyw0lf

Description

@p0lyw0lf

Prerequisites

  • I have updated to the latest version using nix run --refresh github:nix-community/nixos-anywhere
  • I have reproduced the issue with the --debug flag
  • I have searched existing issues to make sure this isn't a duplicate

Bug Description

Not sure if I should report here or https://github.com/nix-community/nixos-images, but in any case, I am not able to use nixos-anywhere to install on my aarch64-linux system because the kexec fails with a kernel panic.

Steps to Reproduce

  1. Run a local qemu-system-aarch64 virtual machine. Simple instructions here
  2. Try to apply nixos-anywhere to it
  3. Observe the kexec panic

Debug Logs

+ shift
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ kexecUrl=/nix/store/5zahmifgahyq0sdaxxlxn92fq1nqy236-kexec-tarball/nixos-kexec-installer-aarch64-linux.tar.gz
+ shift
+ shift
+ [[ 0 -gt 0 ]]
+ [[ '' != '' ]]
+ diskoMode=disko
+ diskoAttr=diskoScript
+ [[ y == \n ]]
+ [[ y == \y ]]
+ nixOptions+=("-L")
+ [[ y == \y ]]
+ nixCopyOptions+=("--substitute-on-destination")
+ [[ n == \n ]]
+ [[ -z localhost-qemu ]]
+ [[ auto == \l\o\c\a\l ]]
+ [[ -n .#qemu-aarch64 ]]
+ [[ .#qemu-aarch64 =~ ^(.*)#([^#"]*)$ ]]
+ flake=.
+ flakeAttr=qemu-aarch64
+ [[ -z qemu-aarch64 ]]
+ [[ qemu-aarch64 != nixosConfigurations.* ]]
+ flakeAttr='nixosConfigurations."qemu-aarch64".config'
+ [[ n == y ]]
+ [[ auto == \a\u\t\o ]]
+ checkBuildLocally
+ local system extraPlatforms machineSystem
++ nix --extra-experimental-features 'nix-command flakes' config show system
+ system=x86_64-linux
++ nix --extra-experimental-features 'nix-command flakes' config show extra-platforms
+ extraPlatforms='aarch64-linux i686-linux'
+ [[ 0 -gt 0 ]]
+ [[ -n '' ]]
++ nix --extra-experimental-features 'nix-command flakes' eval --raw '.#nixosConfigurations."qemu-aarch64".config.pkgs.system'
++ echo unknown
+ machineSystem=unknown
+ [[ unknown == \u\n\k\n\o\w\n ]]
+ buildOn=auto
+ return
+ [[ -n . ]]
+ [[ auto == \l\o\c\a\l ]]
+ [[ -n '' ]]
++ ssh -o IdentitiesOnly=yes -i /tmp/tmp.WrsTnHSvmd/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -G localhost-qemu
Warning: Identity file /tmp/tmp.WrsTnHSvmd/nixos-anywhere not accessible: No such file or directory.
+ sshSettings='host localhost-qemu
user root
hostname 127.0.0.1
port 8022
addressfamily any
batchmode no
canonicalizefallbacklocal yes
canonicalizehostname false
checkhostip no
compression no
controlmaster false
enablesshkeysign no
clearallforwardings no
exitonforwardfailure no
fingerprinthash SHA256
forwardx11 no
forwardx11trusted no
gatewayports no
hashknownhosts no
hostbasedauthentication no
identitiesonly yes
kbdinteractiveauthentication yes
nohostauthenticationforlocalhost no
passwordauthentication yes
permitlocalcommand no
proxyusefdpass no
pubkeyauthentication true
requesttty auto
sessiontype default
stdinnull no
forkafterauthentication no
streamlocalbindunlink no
stricthostkeychecking false
tcpkeepalive yes
tunnel false
verifyhostkeydns false
visualhostkey no
updatehostkeys false
enableescapecommandline no
canonicalizemaxdots 1
connectionattempts 1
forwardx11timeout 1200
numberofpasswordprompts 3
serveralivecountmax 3
serveraliveinterval 0
requiredrsasize 1024
obscurekeystroketiming yes
ciphers [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr
hostkeyalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
hostbasedacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
kexalgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
loglevel INFO
macs [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
securitykeyprovider internal
pubkeyacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
xauthlocation /usr/X11R6/bin/xauth
identityfile ~/.ssh/id_rsa
identityfile ~/.ssh/id_ecdsa
identityfile ~/.ssh/id_ecdsa_sk
identityfile ~/.ssh/id_ed25519
identityfile ~/.ssh/id_ed25519_sk
identityfile ~/.ssh/id_xmss
canonicaldomains none
globalknownhostsfile /etc/ssh/ssh_known_hosts
userknownhostsfile /dev/null
logverbose none
channeltimeout none
permitremoteopen any
addkeystoagent false
forwardagent no
connecttimeout none
tunneldevice any:any
canonicalizePermittedcnames none
controlpersist no
escapechar ~
ipqos af21 cs1
rekeylimit 0 0
streamlocalbindmask 0177
syslogfacility USER'
++ echo 'host localhost-qemu
user root
hostname 127.0.0.1
port 8022
addressfamily any
batchmode no
canonicalizefallbacklocal yes
canonicalizehostname false
checkhostip no
compression no
controlmaster false
enablesshkeysign no
clearallforwardings no
exitonforwardfailure no
fingerprinthash SHA256
forwardx11 no
forwardx11trusted no
gatewayports no
hashknownhosts no
hostbasedauthentication no
identitiesonly yes
kbdinteractiveauthentication yes
nohostauthenticationforlocalhost no
passwordauthentication yes
permitlocalcommand no
proxyusefdpass no
pubkeyauthentication true
requesttty auto
sessiontype default
stdinnull no
forkafterauthentication no
streamlocalbindunlink no
stricthostkeychecking false
tcpkeepalive yes
tunnel false
verifyhostkeydns false
visualhostkey no
updatehostkeys false
enableescapecommandline no
canonicalizemaxdots 1
connectionattempts 1
forwardx11timeout 1200
numberofpasswordprompts 3
serveralivecountmax 3
serveraliveinterval 0
requiredrsasize 1024
obscurekeystroketiming yes
ciphers [email protected],[email protected],[email protected],aes128-ctr,aes192-ctr,aes256-ctr
hostkeyalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
hostbasedacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
kexalgorithms mlkem768x25519-sha256,sntrup761x25519-sha512,[email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
loglevel INFO
macs [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
securitykeyprovider internal
pubkeyacceptedalgorithms [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
xauthlocation /usr/X11R6/bin/xauth
identityfile ~/.ssh/id_rsa
identityfile ~/.ssh/id_ecdsa
identityfile ~/.ssh/id_ecdsa_sk
identityfile ~/.ssh/id_ed25519
identityfile ~/.ssh/id_ed25519_sk
identityfile ~/.ssh/id_xmss
canonicaldomains none
globalknownhostsfile /etc/ssh/ssh_known_hosts
userknownhostsfile /dev/null
logverbose none
channeltimeout none
permitremoteopen any
addkeystoagent false
forwardagent no
connecttimeout none
tunneldevice any:any
canonicalizePermittedcnames none
controlpersist no
escapechar ~
ipqos af21 cs1
rekeylimit 0 0
streamlocalbindmask 0177
syslogfacility USER'
++ awk '/^user / { print $2 }'
+ sshUser=root
+ sshHost=localhost-qemu
+ uploadSshKey
+ local sshCopyHome=/home/nixos
+ mkdir -p /home/nixos/.ssh/
+ [[ -n /home/nixos/.ssh/id_ed25519 ]]
+ cp /home/nixos/.ssh/id_ed25519 /tmp/tmp.WrsTnHSvmd/nixos-anywhere
+ ssh-keygen -y -f /tmp/tmp.WrsTnHSvmd/nixos-anywhere
+ step Uploading install SSH keys
+ echo '### Uploading install SSH keys ###'
### Uploading install SSH keys ###
+ [[ n == y ]]
+ HOME=/home/nixos
+ ssh-copy-id -o IdentitiesOnly=no -o ConnectTimeout=10 -o IdentitiesOnly=yes -i /tmp/tmp.WrsTnHSvmd/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no localhost-qemu
/run/current-system/sw/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/tmp/tmp.WrsTnHSvmd/nixos-anywhere.pub"
/run/current-system/sw/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/run/current-system/sw/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
                (if you think this is a mistake, you may want to use -f option)

+ importFacts
+ step Gathering machine facts
+ echo '### Gathering machine facts ###'
### Gathering machine facts ###
+ local facts filteredFacts
++ runSsh -o ConnectTimeout=10 enableDebug=-x sh --
++ ssh -t -o IdentitiesOnly=yes -i /tmp/tmp.WrsTnHSvmd/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no localhost-qemu -o ConnectTimeout=10 enableDebug=-x sh --
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '[127.0.0.1]:8022' (ED25519) to the list of known hosts.
++ test -f /etc/os-release
++ grep -Eq 'ID(_LIKE)?="?nixos"?' /etc/os-release
++ echo y
+ isNixos=y
+ cat
++ uname
++ uname -m
++ test -f /etc/is_kexec
++ echo n
++ '[' y = y ']'
++ grep -Eq 'VARIANT_ID="?installer"?' /etc/os-release
++ echo n
+++ has systemd-detect-virt
+++ command -v systemd-detect-virt
+++ echo y
++ '[' y = y ']'
++ systemd-detect-virt --container
+++ has ip
+++ command -v ip
+++ echo y
++ '[' y = n ']'
++ ip r g 1
++ echo n
++ has tar
++ command -v tar
++ echo y
++ has cpio
++ command -v cpio
++ echo y
++ has sudo
++ command -v sudo
++ echo y
++ has doas
++ command -v doas
++ echo n
++ has wget
++ command -v wget
++ echo n
++ has curl
++ command -v curl
++ echo y
++ has setsid
++ command -v setsid
++ echo y
++ command -v nixos-facter
++ echo n
+ facts='isOs=Linux
isArch=aarch64
isKexec=n
isNixos=y
isInstaller=n
isContainer=none
hasIpv6Only=n
hasTar=y
hasCpio=y
hasSudo=y
hasDoas=n
hasWget=n
hasCurl=y
hasSetsid=y
hasNixOSFacter=n'
++ echo 'isOs=Linux
isArch=aarch64
isKexec=n
isNixos=y
isInstaller=n
isContainer=none
hasIpv6Only=n
hasTar=y
hasCpio=y
hasSudo=y
hasDoas=n
hasWget=n
hasCurl=y
hasSetsid=y
hasNixOSFacter=n'
++ grep -E '^(has|is)[A-Za-z0-9_]+=\S+'
+ filteredFacts='isOs=Linux
isArch=aarch64
isKexec=n
isNixos=y
isInstaller=n
isContainer=none
hasIpv6Only=n
hasTar=y
hasCpio=y
hasSudo=y
hasDoas=n
hasWget=n
hasCurl=y
hasSetsid=y
hasNixOSFacter=n'
+ [[ -z isOs=Linux
isArch=aarch64
isKexec=n
isNixos=y
isInstaller=n
isContainer=none
hasIpv6Only=n
hasTar=y
hasCpio=y
hasSudo=y
hasDoas=n
hasWget=n
hasCurl=y
hasSetsid=y
hasNixOSFacter=n ]]
++ echo 'isOs=Linux
isArch=aarch64
isKexec=n
isNixos=y
isInstaller=n
isContainer=none
hasIpv6Only=n
hasTar=y
hasCpio=y
hasSudo=y
hasDoas=n
hasWget=n
hasCurl=y
hasSetsid=y
hasNixOSFacter=n'
++ xargs
+ export isOs=Linux isArch=aarch64 isKexec=n isNixos=y isInstaller=n isContainer=none hasIpv6Only=n hasTar=y hasCpio=y hasSudo=y hasDoas=n hasWget=n hasCurl=y hasSetsid=y hasNixOSFacter=n
+ isOs=Linux
+ isArch=aarch64
+ isKexec=n
+ isNixos=y
+ isInstaller=n
+ isContainer=none
+ hasIpv6Only=n
+ hasTar=y
+ hasCpio=y
+ hasSudo=y
+ hasDoas=n
+ hasWget=n
+ hasCurl=y
+ hasSetsid=y
+ hasNixOSFacter=n
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z Linux ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z aarch64 ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z n ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z n ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z none ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z n ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z y ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z y ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z y ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z n ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z n ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z y ]]
+ for var in isOs isArch isKexec isInstaller isContainer hasIpv6Only hasTar hasCpio hasSudo hasDoas hasWget hasCurl hasSetsid
+ [[ -z y ]]
+ [[ y == \n ]]
+ [[ y == \n ]]
+ [[ y == \n ]]
+ maybeSudo=
+ [[ y == \y ]]
+ maybeSudo=sudo
+ [[ Linux != \L\i\n\u\x ]]
+ [[ 1 == 1 ]]
+ runKexec
+ [[ n == \y ]]
+ [[ n == \y ]]
+ [[ none != \n\o\n\e ]]
+ [[ /nix/store/5zahmifgahyq0sdaxxlxn92fq1nqy236-kexec-tarball/nixos-kexec-installer-aarch64-linux.tar.gz == '' ]]
+ step Switching system into kexec
+ echo '### Switching system into kexec ###'
### Switching system into kexec ###
+ [[ n == \y ]]
+ local remoteCommandTemplate
++ printf '%q ' ''
+ remoteCommandTemplate='
set -eu -x
sudo rm -rf /root/kexec
sudo mkdir -p /root/kexec
%TAR_COMMAND%
TMPDIR=/root/kexec setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags '\'''\''
'
+ localUploadCommand=()
+ local localUploadCommand
+ remoteUploadCommand=()
+ local remoteUploadCommand
+ [[ -f /nix/store/5zahmifgahyq0sdaxxlxn92fq1nqy236-kexec-tarball/nixos-kexec-installer-aarch64-linux.tar.gz ]]
+ localUploadCommand=(cat "$kexecUrl")
+ local tarCommand
+ local remoteCommands
+ [[ 2 -eq 0 ]]
+ tarCommand='sudo tar -C /root/kexec -xvzf-'
+ remoteCommands='
set -eu -x
sudo rm -rf /root/kexec
sudo mkdir -p /root/kexec
sudo tar -C /root/kexec -xvzf-
TMPDIR=/root/kexec setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags '\'''\''
'
+ cat /nix/store/5zahmifgahyq0sdaxxlxn92fq1nqy236-kexec-tarball/nixos-kexec-installer-aarch64-linux.tar.gz
++ printf %q '
set -eu -x
sudo rm -rf /root/kexec
sudo mkdir -p /root/kexec
sudo tar -C /root/kexec -xvzf-
TMPDIR=/root/kexec setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags '\'''\''
'
+ runSsh sh -c '$'\''\nset -eu -x\nsudo rm -rf /root/kexec\nsudo mkdir -p /root/kexec\nsudo tar -C /root/kexec -xvzf-\nTMPDIR=/root/kexec setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags \'\''\'\'' \n'\'''
+ ssh -t -o IdentitiesOnly=yes -i /tmp/tmp.WrsTnHSvmd/nixos-anywhere -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no localhost-qemu sh -c '$'\''\nset -eu -x\nsudo rm -rf /root/kexec\nsudo mkdir -p /root/kexec\nsudo tar -C /root/kexec -xvzf-\nTMPDIR=/root/kexec setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags \'\''\'\'' \n'\'''
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '[127.0.0.1]:8022' (ED25519) to the list of known hosts.
+ sudo rm -rf /root/kexec
+ sudo mkdir -p /root/kexec
+ sudo tar -C /root/kexec -xvzf-
kexec/
kexec/initrd
kexec/ip
kexec/run
kexec/kexec
kexec/bzImage
+ TMPDIR=/root/kexec
+ setsid --wait sudo /root/kexec/kexec/run --kexec-extra-flags ''
+ kexec_extra_flags=
+ '[' 2 -gt 0 ']'
+ case "$1" in
+ kexec_extra_flags=
+ shift
+ shift
+ '[' 0 -gt 0 ']'
+ init=/nix/store/d4qcdzj9lgk8dc179n14fazng9jqrdpf-nixos-system-nixos-installer-kexec-25.05pre-git/init
+ kernelParams='console=tty0 console=ttyAMA0,115200 console=ttyS0,115200 zswap.enabled=1 zswap.max_pool_percent=50 zswap.compressor=zstd zswap.zpool=zsmalloc nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf'
+++ readlink -f /root/kexec/kexec/run
++ dirname /root/kexec/kexec/run
+ SCRIPT_DIR=/root/kexec/kexec
++ TMPDIR=/root/kexec/kexec
++ mktemp -d
+ INITRD_TMP=/root/kexec/kexec/tmp.7ZmAAjxsBq
+ cd /root/kexec/kexec/tmp.7ZmAAjxsBq
+ trap cleanup EXIT
+ mkdir -p ssh
+ extractPubKeys /root
+ home=/root
+ for file in .ssh/authorized_keys .ssh/authorized_keys2
+ key=/root/.ssh/authorized_keys
+ test -e /root/.ssh/authorized_keys
+ grep -o '\(\(ssh\|ecdsa\|sk\)-[^ ]* .*\)' /root/.ssh/authorized_keys
+ for file in .ssh/authorized_keys .ssh/authorized_keys2
+ key=/root/.ssh/authorized_keys2
+ test -e /root/.ssh/authorized_keys2
+ test -n ''
+ test -n root
++ sh -c 'echo ~root'
+ sudo_home=/root
+ extractPubKeys /root
+ home=/root
+ for file in .ssh/authorized_keys .ssh/authorized_keys2
+ key=/root/.ssh/authorized_keys
+ test -e /root/.ssh/authorized_keys
+ grep -o '\(\(ssh\|ecdsa\|sk\)-[^ ]* .*\)' /root/.ssh/authorized_keys
+ for file in .ssh/authorized_keys .ssh/authorized_keys2
+ key=/root/.ssh/authorized_keys2
+ test -e /root/.ssh/authorized_keys2
+ test -e /etc/ssh/authorized_keys.d/root
+ cat /etc/ssh/authorized_keys.d/root
+ test -n root
+ test -e /etc/ssh/authorized_keys.d/root
+ cat /etc/ssh/authorized_keys.d/root
+ for p in /etc/ssh/ssh_host_*
+ test -e /etc/ssh/ssh_host_ed25519_key
+ cp -a /etc/ssh/ssh_host_ed25519_key ssh
+ for p in /etc/ssh/ssh_host_*
+ test -e /etc/ssh/ssh_host_ed25519_key.pub
+ cp -a /etc/ssh/ssh_host_ed25519_key.pub ssh
+ for p in /etc/ssh/ssh_host_*
+ test -e /etc/ssh/ssh_host_rsa_key
+ cp -a /etc/ssh/ssh_host_rsa_key ssh
+ for p in /etc/ssh/ssh_host_*
+ test -e /etc/ssh/ssh_host_rsa_key.pub
+ cp -a /etc/ssh/ssh_host_rsa_key.pub ssh
+ /root/kexec/kexec/ip --json addr
+ /root/kexec/kexec/ip -4 --json route
+ /root/kexec/kexec/ip -6 --json route
+ '[' -f /etc/machine-id ']'
+ cp /etc/machine-id machine-id
+ find .
+ cpio -o -H newc
+ gzip -9
18 blocks
+ kexecSyscallFlags=
+ sort -c -V
++ uname -r
+ printf '%s\n' 6.1 6.12.39
+ kexecSyscallFlags=--kexec-syscall-auto
+ sh -c ''\''/root/kexec/kexec/kexec'\'' --load '\''/root/kexec/kexec/bzImage'\''   --kexec-syscall-auto      --initrd='\''/root/kexec/kexec/initrd'\'' --no-checks   --command-line '\''init=/nix/store/d4qcdzj9lgk8dc179n14fazng9jqrdpf-nixos-system-nixos-installer-kexec-25.05pre-git/init console=tty0 console=ttyAMA0,115200 console=ttyS0,115200 zswap.enabled=1 zswap.max_pool_percent=50 zswap.compressor=zstd zswap.zpool=zsmalloc nohibernate root=fstab loglevel=4 lsm=landlock,yama,bpf'\'''
kexec_file_load failed: Resource busy
kexec failed, dumping dmesg
+ echo 'kexec failed, dumping dmesg'
+ dmesg
+ tail -n 100
[ 2320.747803] systemd[1]: Reached target User and Group Name Lookups.
[ 2320.943860] systemd-journald[7956]: Collecting audit messages is enabled.
[ 2321.127740] systemd[1]: Started Journal Service.
[ 2367.867053] systemd-journald[7956]: Time jumped backwards, rotating.
[ 2754.828228] systemd-journald[7956]: Time jumped backwards, rotating.
[ 2851.576789] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3013.061368] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3238.929438] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3271.197398] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3400.210387] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3561.478758] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3593.739719] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3626.011810] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3690.684336] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3754.998803] systemd-journald[7956]: Time jumped backwards, rotating.
[ 3787.308283] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4013.144712] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4560.373575] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4689.392828] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4786.155901] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4883.030444] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4915.291947] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4947.480121] systemd-journald[7956]: Time jumped backwards, rotating.
[ 4979.692587] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5334.508694] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5528.084978] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5592.569513] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5657.122431] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5721.582438] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5786.129163] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5850.641965] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5915.134431] systemd-journald[7956]: Time jumped backwards, rotating.
[ 5979.624560] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6044.193350] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6108.669191] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6173.222661] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6237.690546] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6302.241919] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6366.742433] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6431.265984] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6495.720791] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6560.289924] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6624.771356] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6818.295110] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6882.803116] systemd-journald[7956]: Time jumped backwards, rotating.
[ 6979.604115] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7044.115180] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7108.600972] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7173.196465] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7270.186697] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7366.728171] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7398.971298] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7463.646520] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7495.805051] systemd-journald[7956]: Time jumped backwards, rotating.
[ 7882.779502] systemd-journald[7956]: Time jumped backwards, rotating.
[ 8425.709519] Unable to handle kernel paging request at virtual address ffffffffc0000000
[ 8425.719586] Mem abort info:
[ 8425.721805]   ESR = 0x0000000096000006
[ 8425.725766]   EC = 0x25: DABT (current EL), IL = 32 bits
[ 8425.733497]   SET = 0, FnV = 0
[ 8425.738936]   EA = 0, S1PTW = 0
[ 8425.745294]   FSC = 0x06: level 2 translation fault
[ 8425.753028] Data abort info:
[ 8425.759339]   ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
[ 8425.765781]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 8425.771551]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 8425.775178] swapper pgtable: 4k pages, 52-bit VAs, pgdp=00000000b4809000
[ 8425.783773] [ffffffffc0000000] pgd=10000000b53e8003, p4d=00000000b52e4003, pud=00000000b52e5003, pmd=0000000000000000
[ 8425.802429] Internal error: Oops: 0000000096000006 [#1] SMP
[ 8425.808980] Modules linked in: xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_tcpudp ip6t_rpfilter ipt_rpfilter xt_pkttype nft_compat nf_tables libcrc32c tls crct10dif_ce polyval_ce polyval_generic sm4_ce_gcm sm4_ce_ccm sm4_ce sm4_ce_cipher sm4 sm3_ce sm3 sha3_ce sha512_ce sha512_arm64 cfg80211 rfkill 8021q garp mrp nls_iso8859_1 nls_cp437 sch_fq_codel fuse tap macvlan bridge stp llc nfnetlink vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vmw_vmci vsock dmi_sysfs qemu_fw_cfg ip_tables x_tables dm_mod dax virtio_gpu virtio_dma_buf
[ 8425.883893] CPU: 0 UID: 0 PID: 10132 Comm: kexec Not tainted 6.12.39 #1-NixOS
[ 8425.895033] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202408-prebuilt.qemu.org 08/13/2024
[ 8425.907237] pstate: 81402005 (Nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[ 8425.914403] pc : trans_pgd_create_copy+0x1e8/0x7a0
[ 8425.925320] lr : trans_pgd_create_copy+0x34/0x7a0
[ 8425.929356] sp : ffff800083303c60
[ 8425.934021] x29: ffff800083303c60 x28: fff00001a726a000 x27: fff00001fffff000
[ 8425.941711] x26: fff0008000000000 x25: ffffa88fe1a09000 x24: ffffa88fe1a09000
[ 8425.946783] x23: 0040000000000001 x22: ffffffffc0000000 x21: fff00001a726a000
[ 8425.953945] x20: fff1000000000000 x19: fff0000000000000 x18: 0000000000000000
[ 8425.961948] x17: 0000000000000000 x16: 0000000000000000 x15: 696c007472617473
[ 8425.968218] x14: 2d647274696e692c x13: 2d6d6f72662d6465 x12: 0000000000000000
[ 8425.970759] x11: 0000000000000000 x10: 0000000000000000 x9 : ffff800000000000
[ 8425.987838] x8 : fff00001a726b000 x7 : 0040000000000041 x6 : 000000000000003f
[ 8425.992376] x5 : 0000000000000040 x4 : fff0008000000000 x3 : 000000023ffff000
[ 8425.995858] x2 : ffff7fffffffffff x1 : fff0ffffffffffff x0 : 180000023fffe003
[ 8426.009248] Call trace:
[ 8426.010976]  trans_pgd_create_copy+0x1e8/0x7a0
[ 8426.015012]  machine_kexec_post_load+0x94/0x348
[ 8426.018137]  __arm64_sys_kexec_file_load+0x40c/0x530
[ 8426.023828]  invoke_syscall+0x50/0x160
[ 8426.026265]  el0_svc_common.constprop.0+0x48/0x130
[ 8426.031134]  do_el0_svc+0x24/0x50
[ 8426.032626]  el0_svc+0xd0/0x170
[ 8426.034826]  el0t_64_sync_handler+0x140/0x150
[ 8426.039477]  el0t_64_sync+0x190/0x198
[ 8426.042572] Code: b24c2c00 8b160c16 17ffffb9 b40007e0 (f94002c0)
[ 8426.049606] ---[ end trace 0000000000000000 ]---
[ 8435.262227] systemd-journald[7956]: Time jumped backwards, rotating.
[11306.129360] systemd-journald[7956]: Time jumped backwards, rotating.
+ exit 1
+ cleanup
+ rm -rf /root/kexec/kexec/tmp.7ZmAAjxsBq
+ rm -rf /tmp/tmp.WrsTnHSvmd

Command Used

nix run github:nix-community/nixos-anywhere -- -i ~/.ssh/id_ed25519 --flake "github:p0lyw0lf/infrastructure/8ad81c967be71291f594f7ade2461fb1358faa89?dir=nixos#qemu-aarch64" -p 8022 root@localhost --debug --kexec "$(nix build --print-out-paths github:nix-community/nixos-images#packages.aarch64-linux.kexec-installer-nixos-stable)/nixos-kexec-installer-aarch64-linux.tar.gz"

Target System

Virtual machine

NixOS Version

unstable

Environment Information

  • Host OS: NixOS running in WSL2, x86_64-linux
  • Nix version: (Lix, like Nix) 2.93.2
  • Target architecture: aarch64-linux

Configuration Files

Additional Context

Have not yet fully tested on cloud servers, but I think it might be happening there too? Will update if it's clear I'm not doing anything crazy first.

Also, it seems like the installation partially completes? Boot entry is created, just not switched to immediately, and the exit code of nixos-anywhere is still non-zero.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions