Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipxe boot/installer - add 24.11 and use more flexible settings editor #1296

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions nixos/roles/router/flyingcircus.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ set menu-timeout 30000

iseq ${platform} efi && set menu-default local_efi || set menu-default local_bios

set location whq
set installer_url https://hydra.flyingcircus.io/job/flyingcircus/fc-24.11-production/images.netboot/latest/download/netboot.ipxe

# Lets assume network has already been initialized from our ipxe bootstrap script and we'd like to save time here.
# dhcp || error

:start
menu Flying Circus boot menu
item --gap -- --- Info ---
item --gap -- Serial: ${serial}
item --gap -- MAC: ${mac}
item --gap -- Location: ${location}
item --gap -- Platform: ${platform}
item --gap -- Serial: ${serial}
item --gap -- MAC: ${mac}
item --gap -- Platform: ${platform}
item --gap -- --- Boot ---
item local_bios Boot machine from local disk (BIOS)
item local_efi Boot machine from local disk (EFI)
item netboot Launch netboot.xyz (various live images and tools)
item --gap -- --- Install ---
item install_nixos_20_09 Boot NixOS 20.09 install image
item install_nixos_21_05 Boot NixOS 21.05 install image
item install_nixos_dev Boot NixOS development install image
item --gap -- Installer: ${installer_url}
item install_nixos_24_11 Set installer to NixOS 24.11 install image
item install_nixos_dev Set installer to NixOS development install image
item install_edit_url Manually edit installer URL
item install_start Boot selected installer
item --gap -- --- Other ---
item --key x exit Exit iPXE and continue BIOS boot
item shell Drop to iPXE shell
Expand All @@ -34,14 +35,22 @@ choose --timeout ${menu-timeout} --default ${menu-default} selected || goto canc
set menu-timeout 0
goto ${selected}

:install_nixos_20_09
boot https://hydra.flyingcircus.io/job/flyingcircus/fc-20.09-production/images.netboot/latest/download/netboot.ipxe || goto error

:install_nixos_21_05
boot https://hydra.flyingcircus.io/job/flyingcircus/fc-21.05-production/images.netboot/latest/download/netboot.ipxe || goto error
:install_nixos_24_11
set installer_url https://hydra.flyingcircus.io/job/flyingcircus/fc-24.11-production/images.netboot/latest/download/netboot.ipxe
goto start

:install_nixos_dev
boot https://hydra.flyingcircus.io/channels/installer/dev/netboot.ipxe || goto error
set installer_url https://hydra.flyingcircus.io/channels/installer/dev/netboot.ipxe || goto error
goto start

:install_edit_url
form Configure installer settings
item installer_url URL
present || goto start
goto start

:install_start
boot ${installer_url} || error

:netboot
chain --autofree https://boot.netboot.xyz
Expand Down
14 changes: 13 additions & 1 deletion release/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,18 @@ let
customIPXEScript = pkgs.writeTextDir "netboot.ipxe" ''
#!ipxe

set console ttyS2,115200
set console ttyS0,115200

:start
menu Flying Circus Installer boot menu
item --gap -- --- Info ---
item --gap -- Console: ''${console}
item --gap -- --- Settings ---
item console_tty0 console=tty0
item console_ttys0 console=ttyS0,115200
item console_ttys1 console=ttyS1,115200
item console_ttys2 console=ttyS2,115200
item console_edit Edit console settings
item --gap -- --- Install ---
item boot_installer Boot installer
item --gap -- --- Other ---
Expand All @@ -220,6 +222,10 @@ let
set console tty0
goto start

:console_ttys0
set console ttyS0,115200
goto start

:console_ttys1
set console ttyS1,115200
goto start
Expand All @@ -228,6 +234,12 @@ let
set console ttyS2,115200
goto start

:console_edit
form Configure console settings
item console console=
present || goto start
goto start

:local
sanboot || goto error

Expand Down