Skip to content

NixOS does not boot #1001

@macpijan

Description

@macpijan

NixOS does not boot after installation (the installer boots fine). The kexec command line is not created correctly.

The original grub.cfg file:

# Automatically generated.  DO NOT EDIT THIS FILE!

    search --set=drive1 --fs-uuid 56D5-4720
    if [ -s $prefix/grubenv ]; then
    load_env
    fi

    # ‘grub-reboot’ sets a one-time saved entry, which we process here and
    # then delete.
    if [ "${next_entry}" ]; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set timeout=1
    else
    set default=0
    set timeout=5
    fi

    # Setup the graphics stack for bios and efi systems
    if [ "${grub_platform}" = "efi" ]; then
    insmod efi_gop
    insmod efi_uga
    else
    insmod vbe
    fi

        insmod font
        if loadfont ($drive1)//converted-font.pf2; then
        insmod gfxterm
        if [ "${grub_platform}" = "efi" ]; then
        set gfxmode=auto
        set gfxpayload=keep
        else
        set gfxmode=1024x768
        set gfxpayload=text
        fi
        terminal_output gfxterm
        fi

            background_color '#2F302F'

        insmod png
        if background_image --mode 'normal' ($drive1)//background.png; then
        set color_normal=white/black
        set color_highlight=black/white
        else
        set menu_color_normal=cyan/blue
        set menu_color_highlight=white/blue
        fi


menuentry "NixOS - Default" --unrestricted {
search --set=drive1 --fs-uuid 56D5-4720
  linux ($drive1)//kernels/65f9va1ql6x2vy23x4nqw0x18jz3a3x8-linux-5.10.45-bzImage init=/nix/store/0jpc6ilx8xikwrmcgbqsvakl1inbpbxj-nixos-system-nixos-21.05.1187.8112fbe212f/init loglevel=4
  initrd ($drive1)//kernels/2jaca9jz9qcr08vlbvgnjn2kz3cbp1yf-initrd-linux-5.10.45-initrd
}


submenu "NixOS - All configurations" {
menuentry "NixOS - Configuration 1 (2021-06-26 - 21.05.1187.8112fbe212f)"  {
search --set=drive1 --fs-uuid 56D5-4720
  linux ($drive1)//kernels/65f9va1ql6x2vy23x4nqw0x18jz3a3x8-linux-5.10.45-bzImage init=/nix/store/0jpc6ilx8xikwrmcgbqsvakl1inbpbxj-nixos-system-nixos-21.05.1187.8112fbe212f/init loglevel=4
  initrd ($drive1)//kernels/2jaca9jz9qcr08vlbvgnjn2kz3cbp1yf-initrd-linux-5.10.45-initrd
}

}

The kexec_default.1.txt created by heads:

NixOS - Default|elf|kernel /grub/()//kernels/65f9va1ql6x2vy23x4nqw0x18jz3a3x8-linux-5.10.45-bzImage|initrd /grub/()//kernels/2jaca9jz9qcr08vlbvgnjn2kz3cbp1yf-initrd-linux-5.10.45-initrd|append init=/nix/store/0jpc6ilx8xikwrmcgbqsvakl1inbpbxj-nixos-system-nixos-21.05.1187.8112fbe212f/init loglevel=4

I can boot with kexec-boot using following entry:

NixOs - Default|elf|kernel /kernels/65f9va1ql6x2vy23x4nqw0x18jz3a3x8-linux-5.10.45-bzImage|initrd /kernels/2jaca9jz9qcr08vlbvgnjn2kz3cbp1yf-initrd-linux-5.10.45-initrd|append init=/nix/store/0jpc6ilx8xikwrmcgbqsvakl1inbpbxj-nixos-system-nixos-21.05.1187.8112fbe212f/init loglevel=4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions