3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Eelco Dolstra 2015-09-28 13:34:19 +02:00
parent 7338f5ff46
commit 640dff2918

View file

@ -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 =
''