nix-community/nixos-anywhere

On `kexec` black screen

Closed this issue · 31 comments

Hi,
I would like to install NixOS using nixos-anywhere on a mini pc with an Intel N5100.

I have tried to install starting from Fedora 39 and NixOS (via iso), using from a another machine:

nix run \
    github:nix-community/nixos-anywhere \
    -- \
    --flake .#htpc \
    --print-build-logs \
    --debug \
    user@ip

But just after the lines:

+ kexecSyscallFlags=--kexec-syscall-auto
+ /root/kexec/kexec --load /root/kexec/bzImage --kexec-syscall-auto --initrd=/root/kexec/initrd --no-checks --command-line 'init=/nix/store/fpwr9bsdi8ddizn0j9ijhy1gp7yak3m7-nixos-system-nixos-24.05pre-git/init console=tty0 console=ttyS0,115200 loglevel=4'
+ echo 'machine will boot into nixos in 6s...'
machine will boot into nixos in 6s...
+ test -e /dev/kmsg
+ exec

The screen goes black, the minipc is still powered on but nothing happens.

I have to manually power off and power on again.

I get exactly the same behaviour if I just run:

curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run

If I run dmesg during the 6 sec I get:

[   75.819535] + cleanup
[   75.819573] + rm -rf /root/kexec/kexec/tmp.i3NzDovf9i
[   75.819591] + nohup sh -c 'sleep 6 && '\''/root/kexec/kexec/kexec'\'' -e'
[   75.825248] shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Any suggestions?

Thanks

Update 1

# ./kexec --load bzImage --initrd initrd --debug --reuse-cmdline
Try gzip decompression.
kernel: 0x7f5c692b8060 kernel_size: 0x9cf200
MEMORY RANGES
0000000000000400-000000000009efff (0)
000000000009f000-00000000000fffff (1)
0000000000100000-0000000071103fff (0)
0000000071104000-0000000071104fff (1)
0000000071105000-0000000071fbafff (0)
0000000071fbb000-00000000744bafff (1)
00000000744bb000-000000007473afff (2)
000000007473b000-000000007483afff (3)
000000007483b000-0000000074efefff (1)
0000000074eff000-0000000074efffff (0)
0000000074f00000-000000007fbfffff (1)
00000000c0000000-00000000cfffffff (1)
00000000fe000000-00000000fe010fff (1)
00000000fec00000-00000000fec00fff (1)
00000000fed00000-00000000fed00fff (1)
00000000fed20000-00000000fed7ffff (1)
00000000fee00000-00000000fee00fff (1)
00000000ff000000-00000000ffffffff (1)
0000000100000000-00000002803fffff (0)
sym: sha256_starts info: 12 other: 00 shndx: 2 value: 1110 size: 48
sym: sha256_starts value: 2803f8140 addr: 2803f7032
R_X86_64_64
sym: sha256_update info: 12 other: 00 shndx: 2 value: 3c70 size: 19
sym: sha256_update value: 2803faca0 addr: 2803f7043
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 9 value: 40 size: 100
sym: sha256_regions value: 2803fc040 addr: 2803f704e
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 9 value: 40 size: 100
sym: sha256_regions value: 2803fc140 addr: 2803f7078
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 9 value: 20 size: 20
sym: sha256_digest value: 2803fc020 addr: 2803f7087
R_X86_64_64
sym: sha256_finish info: 12 other: 00 shndx: 2 value: 3c90 size: 15c
sym: sha256_finish value: 2803facc0 addr: 2803f7099
R_X86_64_64
sym:     memcmp info: 12 other: 00 shndx: 2 value: 596 size: 21
sym: memcmp value: 2803f75c6 addr: 2803f70b0
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf30 addr: 2803f70c4
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 2 value: 4b7 size: a0
sym: printf value: 2803f74e7 addr: 2803f70d2
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf60 addr: 2803f70dc
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf50 addr: 2803f70ea
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf66 addr: 2803f710a
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf68 addr: 2803f711f
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf78 addr: 2803f715c
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 2 value: 4b7 size: a0
sym: printf value: 2803f74e7 addr: 2803f7168
R_X86_64_64
sym: setup_arch info: 12 other: 00 shndx: 2 value: 762 size: 56
sym: setup_arch value: 2803f7792 addr: 2803f7175
R_X86_64_64
sym: skip_checks info: 11 other: 00 shndx: 9 value: 0 size: 4
sym: skip_checks value: 2803fc000 addr: 2803f7181
R_X86_64_64
sym: verify_sha256_digest info: 12 other: 00 shndx: 2 value: 0 size: 12a
sym: verify_sha256_digest value: 2803f7030 addr: 2803f7190
R_X86_64_64
sym: post_verification_setup_arch info: 12 other: 00 shndx: 2 value: 7f0 size: 58
sym: post_verification_setup_arch value: 2803f7820 addr: 2803f71a2
R_X86_64_64
sym:    putchar info: 12 other: 00 shndx: 2 value: d8e size: 119
sym: putchar value: 2803f7dbe addr: 2803f71b5
R_X86_64_64
sym:    putchar info: 12 other: 00 shndx: 2 value: d8e size: 119
sym: putchar value: 2803f7dbe addr: 2803f71f5
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf8a addr: 2803f7300
R_X86_64_64
sym:   vsprintf info: 12 other: 00 shndx: 2 value: 17d size: 2a4
sym: vsprintf value: 2803f71ad addr: 2803f74cd
R_X86_64_64
sym:   vsprintf info: 12 other: 00 shndx: 2 value: 17d size: 2a4
sym: vsprintf value: 2803f71ad addr: 2803f756d
R_X86_64_64
sym:    entry32 info: 10 other: 00 shndx: 2 value: 5c0 size: 0
sym: entry32 value: 2803f75ec addr: 2803f75fd
R_X86_64_PC32
sym:    entry32 info: 10 other: 00 shndx: 2 value: 5c0 size: 0
sym: entry32 value: 2803f75ec addr: 2803f7612
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fc15c addr: 2803f762d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fc13c addr: 2803f7634
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae44 addr: 2803f763a
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fc1ac addr: 2803f7640
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae1c addr: 2803f7646
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faeb1 addr: 2803f7679
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faec0 addr: 2803f7680
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faecb addr: 2803f7687
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faed6 addr: 2803f768e
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faee1 addr: 2803f7695
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faeec addr: 2803f769c
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faef7 addr: 2803f76a3
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faee6 addr: 2803f76aa
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fc271 addr: 2803f76b1
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faedc addr: 2803f76c3
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faf0c addr: 2803f76d9
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae4c addr: 2803f76ec
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae54 addr: 2803f76f3
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae5c addr: 2803f76fa
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae64 addr: 2803f7701
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae6c addr: 2803f7708
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae74 addr: 2803f770f
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae7c addr: 2803f7716
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae84 addr: 2803f771d
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae8c addr: 2803f7724
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae94 addr: 2803f772b
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803fae9c addr: 2803f7732
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faea4 addr: 2803f7739
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faeac addr: 2803f7740
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faeb4 addr: 2803f7747
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faebc addr: 2803f774e
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faec4 addr: 2803f7755
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faecc addr: 2803f775b
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faf0c addr: 2803f7763
R_X86_64_PC32
sym: jump_back_entry info: 11 other: 00 shndx: 9 value: 2008 size: 8
sym: jump_back_entry value: 2803fe004 addr: 2803f777d
R_X86_64_PC32
sym:       .bss info: 03 other: 00 shndx: b value: 0 size: 0
sym: .bss value: 2803ffffc addr: 2803f7784
R_X86_64_PC32
sym:  purgatory info: 12 other: 00 shndx: 2 value: 12a size: 53
sym: purgatory value: 2803f7156 addr: 2803f7789
R_X86_64_PLT32
sym:    entry64 info: 10 other: 00 shndx: 2 value: 690 size: 0
sym: entry64 value: 2803f76bc addr: 2803f778e
R_X86_64_PLT32
sym:  reset_vga info: 11 other: 00 shndx: 9 value: 2012 size: 1
sym: reset_vga value: 2803fe012 addr: 2803f7794
R_X86_64_64
sym: x86_reset_vga info: 12 other: 00 shndx: 2 value: ea7 size: 232
sym: x86_reset_vga value: 2803f7ed7 addr: 2803f77a3
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 9 value: 2011 size: 1
sym: legacy_pic value: 2803fe011 addr: 2803f77b0
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 2 value: 10d9 size: 35
sym: x86_setup_legacy_pic value: 2803f8109 addr: 2803f77bf
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 9 value: 2011 size: 1
sym: legacy_pic value: 2803fe011 addr: 2803f77ce
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 2 value: 10d9 size: 35
sym: x86_setup_legacy_pic value: 2803f8109 addr: 2803f77dd
R_X86_64_64
sym: cmdline_end info: 11 other: 00 shndx: 9 value: 2000 size: 8
sym: cmdline_end value: 2803fe000 addr: 2803f77ea
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 9 value: 2008 size: 8
sym: jump_back_entry value: 2803fe008 addr: 2803f77fc
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 6 value: 0 size: 0
sym: .rodata.str1.1 value: 2803faf9b addr: 2803f780b
R_X86_64_64
sym:    sprintf info: 12 other: 00 shndx: 2 value: 421 size: 96
sym: sprintf value: 2803f7451 addr: 2803f7815
R_X86_64_64
sym: panic_kernel info: 11 other: 00 shndx: 9 value: 2010 size: 1
sym: panic_kernel value: 2803fe010 addr: 2803f7822
R_X86_64_64
sym: crashdump_backup_memory info: 12 other: 00 shndx: 2 value: cb3 size: 3e
sym: crashdump_backup_memory value: 2803f7ce3 addr: 2803f7831
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 9 value: 2008 size: 8
sym: jump_back_entry value: 2803fe008 addr: 2803f783e
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 2 value: 7b8 size: 38
sym: x86_setup_jump_back_entry value: 2803f77e8 addr: 2803f784e
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 9 value: 2008 size: 8
sym: jump_back_entry value: 2803fe008 addr: 2803f785d
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 2 value: 7b8 size: 38
sym: x86_setup_jump_back_entry value: 2803f77e8 addr: 2803f786d
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe047 addr: 2803f7897
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe04f addr: 2803f789d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe075 addr: 2803f78bd
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe07f addr: 2803f78c3
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe089 addr: 2803f78c9
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe093 addr: 2803f78cf
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe076 addr: 2803f78d6
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe08d addr: 2803f78dd
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe06d addr: 2803f79a7
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe075 addr: 2803f79ad
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe09b addr: 2803f79cd
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe0a5 addr: 2803f79d3
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe0af addr: 2803f79d9
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe0b9 addr: 2803f79df
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe0e2 addr: 2803f7a22
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe12b addr: 2803f7a65
R_X86_64_PC32
sym: backup_src_size info: 11 other: 00 shndx: 9 value: 2070 size: 8
sym: backup_src_size value: 2803fe070 addr: 2803f7ce5
R_X86_64_64
sym: backup_start info: 11 other: 00 shndx: 9 value: 2080 size: 8
sym: backup_start value: 2803fe080 addr: 2803f7cf7
R_X86_64_64
sym: backup_src_start info: 11 other: 00 shndx: 9 value: 2078 size: 8
sym: backup_src_start value: 2803fe078 addr: 2803f7d09
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 2 value: 57e size: 18
sym: memcpy value: 2803f75ae addr: 2803f7d16
R_X86_64_64
sym: serial_base info: 11 other: 00 shndx: 9 value: 2090 size: 2
sym: serial_base value: 2803fe090 addr: 2803f7d23
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe088 addr: 2803f7d33
R_X86_64_64
sym: serial_baud info: 11 other: 00 shndx: 9 value: 208c size: 4
sym: serial_baud value: 2803fe08c addr: 2803f7d6a
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe088 addr: 2803f7d98
R_X86_64_64
sym: console_vga info: 11 other: 00 shndx: 9 value: 2093 size: 1
sym: console_vga value: 2803fe093 addr: 2803f7dc0
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe098 addr: 2803f7dd6
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe098 addr: 2803f7e38
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe094 addr: 2803f7e4e
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe094 addr: 2803f7e66
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe094 addr: 2803f7e96
R_X86_64_64
sym: console_serial info: 11 other: 00 shndx: 9 value: 2092 size: 1
sym: console_serial value: 2803fe092 addr: 2803f7ea8
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7d21 addr: 2803f7ebc
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 2 value: 1160 size: 29f2
sym: sha256_process value: 2803f8190 addr: 2803fabe1
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 2 value: 57e size: 18
sym: memcpy value: 2803f75ae addr: 2803fac4c
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 2 value: 1160 size: 29f2
sym: sha256_process value: 2803f8190 addr: 2803fac5e
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 2 value: 57e size: 18
sym: memcpy value: 2803f75ae addr: 2803fac8c
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803fab90 addr: 2803faca7
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803fab90 addr: 2803fad08
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fe0a0 addr: 2803fad17
R_X86_64_64
sym:    entry16 info: 10 other: 00 shndx: 2 value: 850 size: 0
sym: entry16 value: 2803f7880 addr: 2803fae48
R_X86_64_64
sym:    entry32 info: 10 other: 00 shndx: 2 value: 5c0 size: 0
sym: entry32 value: 2803f75f0 addr: 2803faed0
R_X86_64_64
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faee0 addr: 2803faee2
R_X86_64_64
sym:    .rodata info: 03 other: 00 shndx: 4 value: 0 size: 0
sym: .rodata value: 2803faf10 addr: 2803faf12
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7030 addr: 2803fafd8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f715a addr: 2803fb01c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f71ad addr: 2803fb050
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7451 addr: 2803fb09c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f74e7 addr: 2803fb0b8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7587 addr: 2803fb0f0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f759a addr: 2803fb104
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f75ae addr: 2803fb118
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f75c6 addr: 2803fb12c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7792 addr: 2803fb158
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f77e8 addr: 2803fb178
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7820 addr: 2803fb18c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7ce3 addr: 2803fb1c8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7d21 addr: 2803fb1f8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7dbe addr: 2803fb20c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f7ed7 addr: 2803fb240
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f8109 addr: 2803fb270
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f8140 addr: 2803fb2a0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803f8190 addr: 2803fb2b4
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803fab90 addr: 2803fb2f8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803faca0 addr: 2803fb35c
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 2 value: 0 size: 0
sym: .text value: 2803facc0 addr: 2803fb370
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 9 value: 0 size: 0
sym: .data value: 2803fc140 addr: 2803fc142
R_X86_64_64
Loaded purgatory at addr 0x2803f7000
Loaded real_mode_data and command line at 0x2803f1000
kernel init_size 0x2fa8000
Loaded 64bit kernel at 0x27d400000
Loaded initrd at 0x2672d8000 size 0x16127264
E820 memmap:
0000000000000400-000000000009efff (1)
000000000009f000-00000000000fffff (2)
0000000000100000-0000000071103fff (1)
0000000071104000-0000000071104fff (2)
0000000071105000-0000000071fbafff (1)
0000000071fbb000-00000000744bafff (2)
00000000744bb000-000000007473afff (3)
000000007473b000-000000007483afff (4)
000000007483b000-0000000074efefff (2)
0000000074eff000-0000000074efffff (1)
0000000074f00000-000000007fbfffff (2)
00000000c0000000-00000000cfffffff (2)
00000000fe000000-00000000fe010fff (2)
00000000fec00000-00000000fec00fff (2)
00000000fed00000-00000000fed00fff (2)
00000000fed20000-00000000fed7ffff (2)
00000000fee00000-00000000fee00fff (2)
00000000ff000000-00000000ffffffff (2)
0000000100000000-00000002803fffff (1)
/sys/firmware/edd does not exist.
kexec_load: entry = 0x2803f7760 flags = 0x3e0000
nr_segments = 7
segment[0].buf   = 0x7f5c692b7c10
segment[0].bufsz = 0x70
segment[0].mem   = 0x100000
segment[0].memsz = 0x1000
segment[1].buf   = 0x7f5c692b7430
segment[1].bufsz = 0x1b8
segment[1].mem   = 0x101000
segment[1].memsz = 0x1000
segment[2].buf   = 0x7f5c692b7a20
segment[2].bufsz = 0x30
segment[2].mem   = 0x102000
segment[2].memsz = 0x1000
segment[3].buf   = 0x7f5c5318f430
segment[3].bufsz = 0x16127264
segment[3].mem   = 0x2672d8000
segment[3].memsz = 0x16128000
segment[4].buf   = 0x7f5c692bd060
segment[4].bufsz = 0x9ca200
segment[4].mem   = 0x27d400000
segment[4].memsz = 0x2fa8000
segment[5].buf   = 0x7f5c53180460
segment[5].bufsz = 0x50fe
segment[5].mem   = 0x2803f1000
segment[5].memsz = 0x6000
segment[6].buf   = 0x7f5c53186450
segment[6].bufsz = 0x70e0
segment[6].mem   = 0x2803f7000
segment[6].memsz = 0x9000

I am able to kexec to the same kernel:

/root/kexec/kexec \
    --load /boot/EFI/nixos/2cfafsf4d972h7wf6znlz8idl1qqc8bf-linux-6.1.80-bzImage.efi \
    --initrd /boot/EFI/nixos/5q1d1041qalglmvjhnvxrwqcq04axpw6-initrd-linux-6.1.80-initrd.efi \
    --reuse-cmdline \
    --debug

/root/kexec/kexec -e

Update 2

  • 23.11: error
curl \
    --location \
    https://github.com/nix-community/nixos-images/releases/download/nixos-23.11/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz |
    sudo tar -C /root -xvzf-
/root/kexec/run
  • 23.05: error
curl \
    --location \
    https://github.com/nix-community/nixos-images/releases/download/nixos-23.05/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz |
    sudo tar -C /root -xvzf-
/root/kexec/run
  • 22.11: kexec correctly
curl \
    --location \
    https://github.com/nix-community/nixos-images/releases/download/nixos-22.11/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz |
    sudo tar -C /root -xvzf-
/root/kexec/run

What was your original kernel version and did it help to drop --kexec-syscall-auto to fix the issue?

What was your original kernel version and did it help to drop --kexec-syscall-auto to fix the issue?

I was using Fedora 39 with kernel 6.7.6

This syscall flag is a bit of a hit and miss. Sometimes its needed to fix kexec and sometimes it's not. It's just often hard to re-produce or debug these type of issues, if you have not full control over the hypervisor or if you don't own the hardware.

In this case fedora was installed bare-metal on a mini pc (Intel N5100), no virtualization.

I believe there is something related to the hardware.
As starting from the same software base (Fedora 39, 6.7.9, bare-metal), it works without any problem on an old laptop with Intel i6500U.

How much RAM do you have on this board?

8 GB, the laptop 16 GB

Ok. This is more than enough.

Do get more console output, it may be helpful to comment out these console lines: https://github.com/nix-community/nixos-images/blob/6286096fcbda0a30d8698bd2c37e8f595298b3fc/nix/installer.nix#L12
Unless you are using serial to get the output.

No, I am not using serial.
Are you suggesting to comment line 12-16?

Yes. You can rebuild the kexec image and than pass it to nixos-anywhere via the --kexec parameter.

Thanks for the suggestion, I will give a try in the next days.

Hi,
as you suggested:

  1. I forked the nixos-images repository and comment the boot.kernelParams section (nix-community/nixos-images@main...yellowhat:nixos-images:main).

  2. Run nixos-anywhere using custom kexec:

    ARCH=$(nix eval --raw --impure --expr builtins.currentSystem)
    
    out=$(nix build \
        --option accept-flake-config true \
        --print-out-paths \
        "github:yellowhat/nixos-images#packages.${ARCH}.kexec-installer-nixos-unstable-noninteractive"
    )
    kexec="${out}/nixos-kexec-installer-noninteractive-${ARCH}.tar.gz"
    
    nix run github:nix-community/nixos-anywhere -- \
        --flake .#htpc \
        --kexec "$kexec" \
        --print-build-logs \
        --debug \
        user@ip

But I get the same behavior, on kexec the screen becomes black with no output.

You figured anything out here? I've tried two computers (Lenovo m92p and Lenovo T520) and I see the same issue on both of them

You mention 22.11 is working, but can this be done adjusting the flake?, like

  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";

I tried this, but still the same

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/is-nixos-anywhere-supposed-to-work-at-all/48172/1

There is no also --kexec-extra-flags flag that allows to pass down kexec flags. Interesting ones to try is the --kexec-syscall flag as described here: https://www.man7.org/linux/man-pages/man8/kexec.8.html
Otherwise if you are dealing with local hardware anyway, it might be easier to boot our installer iso that you see here: https://github.com/nix-community/nixos-images?tab=readme-ov-file#iso-installer-images and use nixos-anywhere just to connect against this ip address. If nixos-anywhere detects an installer it won't run kexec.

You figured anything out here? I've tried two computers (Lenovo m92p and Lenovo T520) and I see the same issue on both of them

You mention 22.11 is working, but can this be done adjusting the flake?, like

  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";

I tried this, but still the same

In my case, I forked the repo and changed the kexec_url and then run:

nix run github:yellowhat/nixos-anywhere -- \
    ...<opts>

@yellowhat ok, wow; that worked perfectly;). Thanks a bunch

What kernel version does 22.11 use? Maybe we should provide different kernel versions, but I don't see the pattern yet.

@yellowhat ok, now I'm on another computer, a Microsoft Surface 2 Pro and I get the same error, again;)

I'm confused. I don't understand this bug.

Can you connect to the machine though? It could be also that the tty is connected to an internal serial port.

Also surface pro may not work with the stock kernel: https://github.com/NixOS/nixos-hardware/blob/master/microsoft/surface/common/kernel/default.nix
Best to avoid when you want to primary run NixOS on it.

I am closing this issue. I don't have the resource and hardware to fix kexec on random hardware. If it happens on some hardware/infrastructure where I have enough access to, I could check it out but otherwise there is nothing I can productivly do.

I understand that, but I have trouble to understand what the actual problem is. I mean, would it help to use your iso, which you pointed me to or is that irrelevant?

@madorian Yes. if you boot from the iso, you can avoid using kexec all-together.

@madorian Yes. if you boot from the iso, you can avoid using kexec all-together.

Not sure I understand this, but anyhoo; are there some instructions on how to generate this iso?

I must state that I'm utterly confused;) What are these images and which one to pick?

These images avoid using kexec? I don't understand this part, cause if I boot from your iso, it would be just the same as booting from my iso. I would still have to kexec nixos-anywhere along with disko information, not?;)

Mic92 commented

Not all hardware will work with kexec. It's more likely that the iso image will boot correctly though. And if nixos-anywhere detects an installer it doesn't do kexec. See also here: https://nix-community.github.io/nixos-anywhere/howtos/no-os.html