From 67ad77720622605af0ec366fb068d9c9da320231 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 14 Mar 2022 16:08:46 +0100 Subject: vidhar: 32bit ipxe --- hosts/vidhar/network/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix index 7f04dfde..2d9a7b8f 100644 --- a/hosts/vidhar/network/default.nix +++ b/hosts/vidhar/network/default.nix @@ -86,6 +86,14 @@ ]; boot-file-name = "ipxe.efi"; } + { name = "uefi-32"; + test = "substring(option[60].hex,0,20) == 'PXEClient:Arch:00002' or substring(option[60].hex,0,20) == 'PXEClient:Arch:00006'"; + only-if-required = true; + option-data = [ + { name = "tftp-server-name"; data = "10.141.0.1"; } + ]; + boot-file-name = "i386-ipxe.efi"; + } { name = "legacy"; test = "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'"; only-if-required = true; @@ -114,7 +122,7 @@ ]; pools = [ { pool = "10.141.0.128 - 10.141.0.254"; } ]; reservations = []; - require-client-classes = ["ipxe" "uefi-64" "legacy"]; + require-client-classes = ["ipxe" "uefi-64" "uefi-32" "legacy"]; } { subnet = "10.141.1.0/24"; option-data = [ @@ -190,13 +198,18 @@ wantedBy = [ "multi-user.target" ]; serviceConfig.ExecStart = let installerBuild = flake.nixosConfigurations.installer-x86_64-linux-netboot.config.system.build; + ipxe = pkgs.ipxe.override { + additionalTargets = { + "bin-i386-efi/ipxe.efi" = "i386-ipxe.efi"; + }; + }; tftpRoot = pkgs.runCommandLocal "installer-netboot" {} '' mkdir -p $out install -m 0444 -t $out \ ${installerBuild.netbootRamdisk}/initrd \ ${installerBuild.kernel}/bzImage \ ${installerBuild.netbootIpxeScript}/netboot.ipxe \ - ${pkgs.ipxe}/ipxe.efi ${pkgs.ipxe}/undionly.kpxe + ${ipxe}/ipxe.efi ${ipxe}/i386-ipxe.efi ${ipxe}/undionly.kpxe ''; in "${pkgs.atftp}/sbin/atftpd --daemon --no-fork --bind-address=10.141.0.1 ${tftpRoot}"; }; -- cgit v1.2.3