-
Notifications
You must be signed in to change notification settings - Fork 156
Support for NixOS #63
Comments
Hello @ashyon, To load the boot options from NixOS ISO at boot time you can use The closest thing I've found for NixOS is this entry in their mailing list which is far from ideal. |
I've been trying to get NixOS to boot for the past 12 hours!!! Never gets past stage 1, as it can't find the root iso filesystem and mount it to /dev/root |
Hi @ob7. To make it work, I'd suggest contacting the developers at their IRC channel and see if they can help with this. |
I think I need some kind of live initrd image to make it work. I couldn't get the Debian DVD installer to load using the normal initrm file but instead I had to swap it out with the one used for the debian live iso to get through a full Debian installation from the DVD with no network booted from my multiboot USB. Will have to do some reading. |
I also am in favor of supporting NixOS |
I am also in favor also. I'll try my hand at this. |
From an initial look at it, a boot parameter with a |
With the SERIAL 0 38400
TIMEOUT 100
UI vesamenu.c32
MENU TITLE NixOS
MENU BACKGROUND /isolinux/background.png
DEFAULT boot
LABEL boot
MENU LABEL NixOS 17.09.1483.d0f0657ca0 Installer
LINUX /boot/bzImage
APPEND init=/nix/store/k2dd07cmp1iixhljc600qkii4kd528d9-nixos-system-nixos-17.09.1483.d0f0657ca0/init root=LABEL=NIXOS_ISO boot.shell_on_fail loglevel=4
INITRD /boot/initrd
# A variant to boot with 'nomodeset'
LABEL boot-nomodeset
MENU LABEL NixOS 17.09.1483.d0f0657ca0 Installer (nomodeset)
LINUX /boot/bzImage
APPEND init=/nix/store/k2dd07cmp1iixhljc600qkii4kd528d9-nixos-system-nixos-17.09.1483.d0f0657ca0/init root=LABEL=NIXOS_ISO boot.shell_on_fail loglevel=4 nomodeset
INITRD /boot/initrd
# A variant to boot with 'copytoram'
LABEL boot-copytoram
MENU LABEL NixOS 17.09.1483.d0f0657ca0 Installer (copytoram)
LINUX /boot/bzImage
APPEND init=/nix/store/k2dd07cmp1iixhljc600qkii4kd528d9-nixos-system-nixos-17.09.1483.d0f0657ca0/init root=LABEL=NIXOS_ISO boot.shell_on_fail loglevel=4 copytoram
INITRD /boot/initrd
# A variant to boot with verbose logging to the console
LABEL boot-nomodeset
MENU LABEL NixOS 17.09.1483.d0f0657ca0 Installer (debug)
LINUX /boot/bzImage
APPEND init=/nix/store/k2dd07cmp1iixhljc600qkii4kd528d9-nixos-system-nixos-17.09.1483.d0f0657ca0/init root=LABEL=NIXOS_ISO boot.shell_on_fail loglevel=4 loglevel=7
INITRD /boot/initrd
LABEL memtest
MENU LABEL Memtest86+
LINUX /boot/memtest.bin
APPEND I have the following for isofile in $isopath/nixos-minimal-*-linux.iso; do
if [ -e "$isofile" ]; then
regexp --set=isoname "$isopath/(.*)" "$isofile"
submenu "$isoname ->" "$isofile" {
iso_path="$2"
loopback loop "$iso_path"
root=(loop)
menuentry "NixOS Installer" {
bootoptions="init=/nix/store/k2dd07cmp1iixhljc600qkii4kd528d9-nixos-system-nixos-17.09.1483.d0f0657ca0/init root=LABEL=NIXOS_ISO boot.shell_on_fail loglevel=4"
linux /boot/bzImage $bootoptions
initrd /boot/initrd
}
}
fi
done It boots, but State 1 fails waiting for |
Basically following this guide with the above config worked. |
@tmplt I can confirm that I was now able to boot a nixos iso using multibootusb by doing the as follows but let me first state my assumptions: the bootoptions used in the mbusb.d/nixos.d/generic.cfg file are stolen from the iso file I was going to use, loop mount or 7zip-open it for that task, i. e. nixos-minimal-19.09.1861.eb65d1dae62-x86_64-linux.iso/EFI/boot/grub.cfg
In case you wanna work that out further, see as well https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh#L136 as a reference. |
Not sure how to approach it. Unlike a "normal" Linux distro, NixOS uses the hash of the build process (or something like that, I don't understand fully how everything works yet) to specify the directory where things should be, for instance the init is stored (for the current version at least) in /nix/store/g5qa0gq6fhqfs56sckyx56d1002i59iw-nixos-system-nixos-17.03.889.9626bc7db7/init. Is there a way to get the linux options from the iso at boot time? Or do we have to make a new boot entry for each and every separate iso?
The text was updated successfully, but these errors were encountered: