Fix GRUB syntax in EC2 HVM images

There is no "root" command in GRUB 2, and it's not needed anyway. This
command delayed HVM boots for a few seconds.
wip/yesman
Eelco Dolstra 9 years ago
parent 7338f5ff46
commit 640dff2918
  1. 2
      nixos/modules/virtualisation/amazon-image.nix

@ -32,7 +32,7 @@ let cfg = config.ec2; in
boot.loader.grub.version = if cfg.hvm then 2 else 1;
boot.loader.grub.device = if cfg.hvm then "/dev/xvda" else "nodev";
boot.loader.grub.timeout = 0;
boot.loader.grub.extraPerEntryConfig = "root (hd0${lib.optionalString cfg.hvm ",0"})";
boot.loader.grub.extraPerEntryConfig = mkIf (!cfg.hvm) "root (hd0)";
boot.initrd.postDeviceCommands =
''

Loading…
Cancel
Save