Skip to content

Commit

Permalink
iso-image: make sure volumeID is less than 32 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
worldofpeace committed Mar 28, 2020
1 parent 70a8e9a commit 591e8d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nixos/modules/installer/cd-dvd/iso-image.nix
Expand Up @@ -524,6 +524,19 @@ in
};

config = {
assertions = [
{
assertion = !(stringLength config.isoImage.volumeID > 32);
# https://wiki.osdev.org/ISO_9660#The_Primary_Volume_Descriptor
# Volume Identifier can only be 32 bytes
message = let
length = stringLength config.isoImage.volumeID;
howmany = toString length;
toomany = toString (length - 32);
in
"isoImage.volumeID ${config.isoImage.volumeID} is ${howmany} characters. That is ${toomany} characters longer than the limit of 32.";
}
];

boot.loader.grub.version = 2;

Expand Down

0 comments on commit 591e8d5

Please sign in to comment.