summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd/iso-image.nix
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2014-11-16 20:13:11 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-03-24 22:08:52 +0100
commitaf68f2400365d830131acf5fb0f3e2c8cbad65a7 (patch)
treebf797dba78a39c247ae41d2629ccbffbca7a300e /nixos/modules/installer/cd-dvd/iso-image.nix
parenta12ddc1964d0c66d81e9e5f05aedaec55bd3a1cd (diff)
downloadnixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar.gz
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar.bz2
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar.lz
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar.xz
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.tar.zst
nixpkgs-af68f2400365d830131acf5fb0f3e2c8cbad65a7.zip
nixos: iso-image: solve UNetbootin compatiblity
There are a number of hidden restrictions on the syslinux
configuration file that come into play when UNetbootin
compatiblity is desired. With this commit these are documented.
Diffstat (limited to 'nixos/modules/installer/cd-dvd/iso-image.nix')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 8db7ae366f1..2b125fa8bc1 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -18,6 +18,18 @@ let
   max = x: y: if x > y then x else y;
 
   # The configuration file for syslinux.
+
+  # Notes on syslinux configuration and UNetbootin compatiblity:
+  #   * Do not use '/syslinux/syslinux.cfg' as the path for this
+  #     configuration. UNetbootin will not parse the file and use it as-is.
+  #     This results in a broken configuration if the partition label does
+  #     not match the specified config.isoImage.volumeID. For this reason
+  #     we're using '/isolinux/isolinux.cfg'.
+  #   * Use APPEND instead of adding command-line arguments directly after
+  #     the LINUX entries.
+  #   * COM32 entries (chainload, reboot, poweroff) are not recognized. They
+  #     result in incorrect boot entries.
+
   baseIsolinuxCfg =
     ''
     SERIAL 0 38400
@@ -28,8 +40,9 @@ let
     DEFAULT boot
 
     LABEL boot
-    MENU LABEL Boot NixOS
-    LINUX /boot/bzImage init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
+    MENU LABEL NixOS ${config.system.nixosVersion} Installer
+    LINUX /boot/bzImage
+    APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
     INITRD /boot/initrd
 
     LABEL chain