Compare commits
3 Commits
g_74017173
...
master
Author | SHA1 | Date | |
---|---|---|---|
c26d9c8dfb | |||
fd21958883 | |||
5343bac65e |
44
embed.ipxe
44
embed.ipxe
|
@ -20,8 +20,6 @@ goto get_arch
|
|||
:static_ip_boot_setup
|
||||
|
||||
# Open all network interface devices, so we aren't restricted to just the first
|
||||
ifclose
|
||||
sleep 1
|
||||
ifopen
|
||||
sleep 1
|
||||
|
||||
|
@ -76,8 +74,6 @@ iseq ${net${idx}/mac} 00:25:90:a9:73:76 && set ip-dev-name eno1 && set ip-addr 2
|
|||
# backup.bitmessage.at
|
||||
iseq ${net${idx}/mac} a8:a1:59:c7:21:8f && set ip-dev-name enp39s0 && set ip-addr 93.189.25.253 && set ip-gateway 93.189.25.249 && set ip-netmask 255.255.255.248 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
|
||||
iseq ${net${idx}/mac} a8:a1:59:c7:21:90 && set ip-dev-name enp38s0 && set ip-addr 93.189.25.253 && set ip-gateway 93.189.25.249 && set ip-netmask 255.255.255.248 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
|
||||
# test1.sysdeploy.org
|
||||
#iseq ${net${idx}/mac} 08:60:6e:e5:bb:20 && set ip-dev-name eth0 && set ip-addr 176.31.183.121 && set ip-gateway 176.31.183.254 && set ip-netmask 255.255.255.0 && set ip-dns 1.1.1.1 && set successful t && goto loop_done ||
|
||||
|
||||
|
||||
|
||||
|
@ -90,7 +86,7 @@ inc idx && goto loop
|
|||
:loop_done
|
||||
# If we have not successfully found a MAC match, then we error, because we
|
||||
# also failed DHCP. So there's nothing we can do but fail.
|
||||
iseq ${successful} f && goto try_dhcp ||
|
||||
iseq ${successful} f && goto error_handler ||
|
||||
|
||||
# If on the other hand we're successful, then we construct the kernel ip= line
|
||||
set ip-info ${ip-addr}::${ip-gateway}:${ip-netmask}::${ip-dev-name}:off:${ip-dns} && echo Static IP found
|
||||
|
@ -184,21 +180,23 @@ goto start_arm64
|
|||
:start_i386
|
||||
goto start_amd64
|
||||
|
||||
:try_dhcp
|
||||
dhcp || goto error_handler
|
||||
sleep 1
|
||||
set ip-info dhcp
|
||||
goto boot_all
|
||||
|
||||
# Set arch info and determine if we can use DHCP for network.
|
||||
# Then either boot or goto static IP setup.
|
||||
:start_arm64
|
||||
set arch-info arm64
|
||||
goto static_ip_boot_arm64
|
||||
dhcp || goto static_ip_boot_arm64
|
||||
sleep 1
|
||||
set ip-info dhcp
|
||||
goto boot_all
|
||||
|
||||
:start_amd64
|
||||
set arch-info amd64
|
||||
goto static_ip_boot_amd64
|
||||
dhcp || goto static_ip_boot_amd64
|
||||
sleep 1
|
||||
set ip-info dhcp
|
||||
goto boot_all
|
||||
|
||||
|
||||
# This process should be the same for arm and x86, but I'll leave this section
|
||||
# intact in case it turns out it's not the same
|
||||
|
@ -212,9 +210,9 @@ goto static_ip_boot_setup
|
|||
|
||||
:boot_all
|
||||
|
||||
# Get accurate time for signature validation
|
||||
# Get accurate time so we can set the clock in kernel boot cmdline
|
||||
echo Syncing time over NTP
|
||||
ntp pool.ntp.org || echo "Skipped"
|
||||
ntp pool.ntp.org || goto error_handler
|
||||
|
||||
# check for EFI
|
||||
iseq ${platform} efi && goto is_efi || goto not_efi
|
||||
|
@ -239,8 +237,8 @@ echo Attempting EFI boot
|
|||
set initrd1 initrd=initrd.cpio
|
||||
isset initrd2 && clear initrd2
|
||||
|
||||
imgfetch http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/initrd.cpio || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org initrd.cpio http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/initrd.cpio.sig || goto error_handler
|
||||
imgfetch http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/initrd.cpio || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org initrd.cpio http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/initrd.cpio.sig || goto error_handler
|
||||
|
||||
goto efi_and_not_efi
|
||||
|
||||
|
@ -249,20 +247,20 @@ echo Attempting legacy boot
|
|||
set initrd1 initrd=boot-initrd
|
||||
set initrd2 initrd=squashfs
|
||||
|
||||
imgfetch http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/squashfs /squashfs || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org squashfs http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/squashfs.sig || goto error_handler
|
||||
imgfetch http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/squashfs /squashfs || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org squashfs http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/squashfs.sig || goto error_handler
|
||||
|
||||
initrd http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-initrd || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org boot-initrd http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-initrd.sig || goto error_handler
|
||||
initrd http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/boot-initrd || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org boot-initrd http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/boot-initrd.sig || goto error_handler
|
||||
|
||||
:efi_and_not_efi
|
||||
|
||||
kernel http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-kernel || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org boot-kernel http://images.sysdeploy.org/${ubuntu-variant}/${arch-info}/boot-kernel.sig || goto error_handler
|
||||
kernel http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/boot-kernel || goto try_next_card
|
||||
imgverify --signer images.sysdeploy.org boot-kernel http://images-sysdeploy.b-cdn.net/${ubuntu-variant}/${arch-info}/boot-kernel.sig || goto error_handler
|
||||
|
||||
sleep 1
|
||||
|
||||
boot boot-kernel ${initrd1} ${initrd2} rootfstype=squashfs root=/squashfs ip=${ip-info} overlayroot=tmpfs:recurse=0 ds=nocloud-net;s=https://cloud-init.sysdeploy.org/apiv2?uuid=${uuid}&filetype= || goto error_handler
|
||||
boot boot-kernel ${initrd1} ${initrd2} rootfstype=squashfs root=/squashfs ip=${ip-info} overlayroot=tmpfs:recurse=0 systemd.clock-usec=${unixtime:int32}000000 ds=nocloud;s=https://cloud-init.sysdeploy.org/apiv2?uuid=${uuid}&filetype= || goto error_handler
|
||||
|
||||
# unixtime variable must be used with int32, because that's the only way it
|
||||
# will display as decimal digits. unit32 and string both display as hex.
|
||||
|
|
Loading…
Reference in New Issue
Block a user