Skip to content

Commit

Permalink
attemt at a more complete debug configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaron committed Nov 10, 2020
1 parent 9255fa5 commit 48b87e3
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- 'v*-hetzner*'
- 'v*-debug*'

jobs:
build_iso:
Expand All @@ -18,7 +19,7 @@ jobs:
isolinux \
genisoimage
- name: build cloud/hetzner
run: make -C src bin/ipxe.iso CONFIG=cloud EMBED=config/cloud/hetzner.ipxe
run: make -C src bin/ipxe.iso CONFIG=hcloud EMBED=config/hcloud/hetzner.ipxe
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand Down
8 changes: 8 additions & 0 deletions src/config/hcloud/aws.ipxe
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!ipxe

echo Amazon EC2 - iPXE boot via user-data
echo CPU: ${cpuvendor} ${cpumodel}
ifstat ||
dhcp ||
route ||
chain -ar http://169.254.169.254/latest/user-data
Empty file added src/config/hcloud/colour.h
Empty file.
31 changes: 31 additions & 0 deletions src/config/hcloud/console.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Console configuration suitable for use in public cloud
* environments, or any environment where direct console access is not
* available.
*
*/

/* Log to syslog(s) server
*
* The syslog server to be used must be specified via e.g.
* "set syslog 192.168.0.1".
*/
#define CONSOLE_SYSLOG
#define CONSOLE_SYSLOGS

/* Log to serial port
*
* Note that the serial port output from an AWS EC2 virtual machine is
* generally available (as the "System Log") only after the instance
* has been stopped.
*/
#define CONSOLE_SERIAL

/* Log to partition on local disk
*
* If all other log mechanisms fail then the VM boot disk containing
* the iPXE image can be detached and attached to another machine in
* the same cloud, allowing the log to be retrieved from the log
* partition.
*/
#define CONSOLE_INT13
Empty file added src/config/hcloud/crypto.h
Empty file.
8 changes: 8 additions & 0 deletions src/config/hcloud/gce.ipxe
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!ipxe

echo Google Compute Engine - iPXE boot via metadata
echo CPU: ${cpuvendor} ${cpumodel}
ifstat ||
dhcp ||
route ||
chain -ar http://metadata.google.internal/computeMetadata/v1/instance/attributes/ipxeboot
28 changes: 28 additions & 0 deletions src/config/hcloud/general.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Allow retrieval of metadata (such as an iPXE boot script) from
* Google Compute Engine metadata server.
*/
// #define HTTP_HACK_GCE

/* Based on https://ipxe.org/buildcfg I've enabled everything that
* seems remotely usefull for debugging on Hetzner Cloud
*/

#define DOWNLOAD_PROTO_HTTPS
#define NET_PROTO_IPV6
#define CERT_CMD
#define CONSOLE_CMD
#define IMAGE_TRUST_CMD
#define IPSTAT_CMD
#define LOTEST_CMD
#define NEIGHBOUR_CMD
#define NSLOOKUP_CMD
#define NTP_CMD
#define PARAM_CMD
#define PCI_CMD
#define PING_CMD
#define POWEROFF_CMD
#define PROFSTAT_CMD
#define REBOOT_CMD
#define TIME_CMD
#define VLAN_CMD

18 changes: 18 additions & 0 deletions src/config/hcloud/hetzner.ipxe
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!ipxe

echo Hetzner Cloud - iPXE boot via user-data
echo CPU: ${cpuvendor} ${cpumodel}

# Give user a chance to enter the shell
prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE shell... || goto no_shell
shell
exit

:no_shell

# Perform automated system Boot

ifstat ||
dhcp ||
route ||
chain -ar http://169.254.169.254/latest/user-data
Empty file added src/config/hcloud/serial.h
Empty file.
4 changes: 4 additions & 0 deletions src/config/hcloud/settings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* It can often be useful to know the CPU on which a cloud instance is
* running (e.g. to isolate problems with Azure AMD instances).
*/
#define CPUID_SETTINGS
Empty file added src/config/hcloud/sideband.h
Empty file.
Empty file added src/config/hcloud/usb.h
Empty file.

0 comments on commit 48b87e3

Please sign in to comment.