From 334ac4f043072314404afa0a9328cb2726c09fc3 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 8 May 2017 10:22:07 +0200 Subject: [PATCH] nixos/iso-image: add option for copytoram --- nixos/modules/installer/cd-dvd/iso-image.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index d42174003526..8891ce0b6667 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -50,6 +50,13 @@ let LINUX /boot/bzImage APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset INITRD /boot/initrd + + # A variant to boot with 'copytoram' + LABEL boot-copytoram + MENU LABEL NixOS ${config.system.nixosVersion}${config.isoImage.appendToMenuLabel} (with copytoram) + LINUX /boot/bzImage + APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} copytoram + INITRD /boot/initrd ''; isolinuxMemtest86Entry = '' @@ -78,6 +85,12 @@ let echo "initrd /boot/initrd" >> $out/loader/entries/nixos-livecd-nomodeset.conf echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} nomodeset" >> $out/loader/entries/nixos-livecd-nomodeset.conf + # A variant to boot with 'copytoram' + echo "title NixOS Live CD (with copytoram)" > $out/loader/entries/nixos-livecd-copytoram.conf + echo "linux /boot/bzImage" >> $out/loader/entries/nixos-livecd-copytoram.conf + echo "initrd /boot/initrd" >> $out/loader/entries/nixos-livecd-copytoram.conf + echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams} copytoram" >> $out/loader/entries/nixos-livecd-copytoram.conf + echo "default nixos-livecd" > $out/loader/loader.conf echo "timeout ${builtins.toString config.boot.loader.timeout}" >> $out/loader/loader.conf '';