Skip to content

Instantly share code, notes, and snippets.

View mariogrip's full-sized avatar

Marius Gripsgard mariogrip

View GitHub Profile
This allows you to run qemu-debootstrap armhf on arm64 systems that does not support armhf native.
```
update-binfmts --package qemu-user-static --install qemu-arm /usr/bin/qemu-arm-static --magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" --offset 0 --credential yes
```
Then run `qemu-debootstrap` as normal
#!ipxe
#dhcp
echo Starting Ubuntu arm64 installer for ${hostname}
set base-url http://ports.ubuntu.com/ubuntu-ports/dists/zesty/main/installer-arm64/current/images/netboot
boot ${base-url}/ubuntu-installer/arm64/bootnetaa64.efi url=http://ports.ubuntu.com/ubuntu-ports/dists/artful/main/installer-arm64/current/images/netboot/ubuntu-installer/arm64/grub/grub.cfg
# If everything failed, give the user some options
echo Boot from ${base-url} failed
prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit
shell