Skip to content

Commit

Permalink
fix: add imgfree to ipxe boot script
Browse files Browse the repository at this point in the history
Fix for `Initramfs unpacking failed: invalid magic at start of compressed`

Signed-off-by: Luke Milby <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
lukemilby authored and smira committed Jan 20, 2025
1 parent d5f3f5a commit 4bb43ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions internal/frontend/http/secureboot.ipxe
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!ipxe

imgfree
kernel {{ .UKIURL }} {{ .Cmdline }}
boot
1 change: 1 addition & 0 deletions internal/frontend/http/standard.ipxe
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!ipxe

imgfree
kernel {{ .KernelURL }} {{ .Cmdline }}
initrd {{ .InitramfsURL }}
boot
6 changes: 3 additions & 3 deletions internal/integration/pxe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ func testPXEFrontend(ctx context.Context, t *testing.T, baseURL string) {
}

const (
metalInsecureExpected = "#!ipxe\n\nkernel ENDPOINT/image/CONFIG/VERSION/kernel-amd64 talos.platform=metal console=ttyS0 console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512\ninitrd ENDPOINT/image/CONFIG/VERSION/initramfs-amd64.xz\nboot\n" //nolint:lll
equinixInsecureExpected = "#!ipxe\n\nkernel ENDPOINT/image/CONFIG/VERSION/kernel-amd64 talos.platform=equinixMetal console=ttyS1,115200n8 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512\ninitrd ENDPOINT/image/CONFIG/VERSION/initramfs-amd64.xz\nboot\n" //nolint:lll
securebootExpected = "#!ipxe\n\nkernel ENDPOINT/image/CONFIG/VERSION/metal-amd64-secureboot-uki.efi talos.platform=metal console=ttyS0 console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512 lockdown=confidentiality\nboot\n"
metalInsecureExpected = "#!ipxe\n\nimgfree\nkernel ENDPOINT/image/CONFIG/VERSION/kernel-amd64 talos.platform=metal console=ttyS0 console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512\ninitrd ENDPOINT/image/CONFIG/VERSION/initramfs-amd64.xz\nboot\n" //nolint:lll
equinixInsecureExpected = "#!ipxe\n\nimgfree\nkernel ENDPOINT/image/CONFIG/VERSION/kernel-amd64 talos.platform=equinixMetal console=ttyS1,115200n8 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512\ninitrd ENDPOINT/image/CONFIG/VERSION/initramfs-amd64.xz\nboot\n" //nolint:lll
securebootExpected = "#!ipxe\n\nimgfree\nkernel ENDPOINT/image/CONFIG/VERSION/metal-amd64-secureboot-uki.efi talos.platform=metal console=ttyS0 console=tty0 init_on_alloc=1 slab_nomerge pti=on consoleblank=0 nvme_core.io_timeout=4294967295 printk.devkmsg=on ima_template=ima-ng ima_appraise=fix ima_hash=sha512 lockdown=confidentiality\nboot\n"
)

for _, talosVersion := range talosVersions {
Expand Down

0 comments on commit 4bb43ef

Please sign in to comment.