Skip to content

Commit 21b50e6

Browse files
authoredApr 9, 2020
Revert "iso-image: normalize volumeID"
1 parent 8583d99 commit 21b50e6

6 files changed

+3
-30
lines changed
 

‎nixos/lib/make-iso9660-image.sh

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ xorriso="xorriso
107107
-publisher nixos
108108
-graft-points
109109
-full-iso9660-filenames
110-
-joliet
111110
${isoBootFlags}
112111
${usbBootFlags}
113112
${efiBootFlags}

‎nixos/modules/installer/cd-dvd/installation-cd-base.nix

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ with lib;
1818
# ISO naming.
1919
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
2020

21+
isoImage.volumeID = substring 0 11 "NIXOS_ISO";
22+
2123
# EFI booting
2224
isoImage.makeEfiBootable = true;
2325

‎nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ with lib;
77
{
88
imports = [ ./installation-cd-graphical-base.nix ];
99

10-
isoImage.edition = "gnome";
11-
1210
services.xserver.desktopManager.gnome3.enable = true;
1311

1412
# Wayland can be problematic for some hardware like Nvidia graphics cards.

‎nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ with lib;
88
{
99
imports = [ ./installation-cd-graphical-base.nix ];
1010

11-
isoImage.edition = "plasma5";
12-
1311
services.xserver = {
1412
desktopManager.plasma5 = {
1513
enable = true;

‎nixos/modules/installer/cd-dvd/installation-cd-minimal.nix

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,5 @@
88
[ ./installation-cd-base.nix
99
];
1010

11-
isoImage.edition = "minimal";
12-
1311
fonts.fontconfig.enable = false;
1412
}

‎nixos/modules/installer/cd-dvd/iso-image.nix

+1-23
Original file line numberDiff line numberDiff line change
@@ -417,17 +417,8 @@ in
417417
'';
418418
};
419419

420-
isoImage.edition = mkOption {
421-
default = "";
422-
description = ''
423-
Specifies which edition string to use in the volume ID of the generated
424-
ISO image.
425-
'';
426-
};
427-
428420
isoImage.volumeID = mkOption {
429-
# nixos-$EDITION-$RELEASE-$ARCH
430-
default = "nixos${optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"}-${config.system.nixos.release}-${pkgs.stdenv.hostPlatform.system}";
421+
default = "NIXOS_BOOT_CD";
431422
description = ''
432423
Specifies the label or volume ID of the generated ISO image.
433424
Note that the label is used by stage 1 of the boot process to
@@ -524,19 +515,6 @@ in
524515
};
525516

526517
config = {
527-
assertions = [
528-
{
529-
assertion = !(stringLength config.isoImage.volumeID > 32);
530-
# https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor
531-
# Volume Identifier can only be 32 bytes
532-
message = let
533-
length = stringLength config.isoImage.volumeID;
534-
howmany = toString length;
535-
toomany = toString (length - 32);
536-
in
537-
"isoImage.volumeID ${config.isoImage.volumeID} is ${howmany} characters. That is ${toomany} characters longer than the limit of 32.";
538-
}
539-
];
540518

541519
boot.loader.grub.version = 2;
542520

0 commit comments

Comments
 (0)
Please sign in to comment.