Merge pull request #2416 from rn/p4

iPXE boot of arm64 on packet.net
This commit is contained in:
Rolf Neugebauer 2017-08-15 23:24:11 +01:00 committed by GitHub
commit 4d5bf9d90c
3 changed files with 31 additions and 4 deletions

View File

@ -45,11 +45,20 @@ moby build linuxkit.yml
PACKET_API_KEY=<API key> linuxkit run packet -serve :8080 -base-url http://9b828514.ngrok.io -project-id <Project ID> linuxkit
```
To boot a `arm64` kernel on a Type 2a machine (`-machine
baremetal_2a`) you currently need to un-compress both the kernel and
the initrd before booting, e.g:
```
mv linuxkit-initrd.img linuxkit-initrd.img.gz && gzip -d linuxkit-initrd.img.gz
mv linuxkit-kernel.img linuxkit-kernel.img.gz && gzip -d linuxkit-kernel.img.gz
```
**Note**: It may take several minutes to deploy a new server. If you
are attached to the console, you should see the BIOS and the boot
messages.
## Console
By default, `linuxkit run packet ...` will connect to the

9
log.txt Normal file
View File

@ -0,0 +1,9 @@
[=3h[=3h[=3h[=3h[=3h[=3h..PXE-E16: No offer received.
Boot Failed. EFI Network
UEFI Interactive Shell v2.1
EDK II
UEFI v2.40 (BHYVE, 0x00010000)
Mapping table
Error. No mapping found
Press ESC in 5 seconds to skip startup.nsh or any other key to continue.Press ESC in 4 seconds to skip startup.nsh or any other key to continue.Press ESC in 3 seconds to skip startup.nsh or any other key to continue.Press ESC in 2 seconds to skip startup.nsh or any other key to continue.Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell> time="2017-08-08T23:15:51+01:00" level=fatal msg="Cannot run hyperkit: signal: killed"

View File

@ -127,9 +127,18 @@ func runPacket(args []string) {
userData := "#!ipxe\n\n"
userData += "dhcp\n"
userData += fmt.Sprintf("set base-url %s\n", url)
if *machineFlag != "baremetal_2a" {
userData += fmt.Sprintf("set kernel-params ip=dhcp nomodeset ro serial console=ttyS1,115200 %s\n", cmdline)
userData += fmt.Sprintf("kernel ${base-url}/%s-kernel ${kernel-params}\n", name)
userData += fmt.Sprintf("initrd ${base-url}/%s-initrd.img\n", name)
} else {
// With EFI boot need to specify the initrd and root dev explicitly. See:
// http://ipxe.org/appnote/debian_preseed
// http://forum.ipxe.org/showthread.php?tid=7589
userData += fmt.Sprintf("initrd --name initrd ${base-url}/%s-initrd.img\n", name)
userData += fmt.Sprintf("set kernel-params ip=dhcp nomodeset ro %s\n", cmdline)
userData += fmt.Sprintf("kernel ${base-url}/%s-kernel initrd=initrd root=/dev/ram0 ${kernel-params}\n", name)
}
userData += "boot"
log.Debugf("Using userData of:\n%s\n", userData)
@ -162,7 +171,7 @@ func runPacket(args []string) {
}
log.Debugf("%s\n", string(b))
log.Printf("Machine booting...")
log.Printf("Booting %s...", dev.ID)
sshHost := "sos." + dev.Facility.Code + ".packet.net"
if *consoleFlag {