Skip to content

coreutils not on scope at install-grub.pl #241356

@Mikilio

Description

@Mikilio

Describe the bug

Following bug occurs in install-grub.pl when executing the following command

$ sudo --preserve-env=PATH,NIX_PATH `which nixos-install` --root /mnt --flake /mnt/etc/nixos#homestation

Coreutils functions are not in scope (finishes install when executing in nix develop nixpkgs#coreutils but result doesn't boot).

Steps To Reproduce

Steps to reproduce the behavior:

  1. run my script and choose an empty drive on your system
  2. run
 sudo git clone https://github.com/Mikilio/dotfiles.git /mnt/etc/nixos
  1. run
$ sudo --preserve-env=PATH,NIX_PATH `which nixos-install` --root /mnt --flake /mnt/etc/nixos#homestation

Expected behavior

It should just finish installation and new disk should be able to boot.

Examples

Output:

installing the boot loader...
setting up /etc...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
updating GRUB 2 menu...
/nix/var/nix/profiles/system/sw/bin/bash: line 10: rmdir: command not found

Additional context

Installing from Non-NixOS system (Fedora)
The exact commit of my config when this bug occured is 4b14be37e623395232eee63504ca42050385135a

Notify maintainers

@xaverdh
@rnhmjoj

Metadata

error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «string»:1:25:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
             |                         ^
(use '--show-trace' to show detailed location information)

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions