IF Commons GitHub

logical/grub

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-netboot-logical FR-001

The GRUB configurations Ubuntu's network GRUB is served. A machine is found by its MAC address; one that is not armed boots its own disk, and one the server does not know is offered the armed hosts with its own disk as the default, so that a stray network boot never reinstalls anything.

import { mainMenu } from "./grub.ts";
mainMenu().includes("configfile /boot/hosts/"); // true

Source: commons/netboot/src/logical/grub.ts

3 of 10 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.MenuHosttypeno test imports it
type MenuHost = { readonly name: string };

A host the menus name.

logical.mainMenufunctionno test imports it
function mainMenu(): string

The menu every machine starts at: hand the machine to its own configuration by its MAC address.

logical.kernelLinefunctionno test imports it
function kernelLine(host: MenuHost, profile: BootProfile, base: string, token: string): string

The kernel's command line of a profile for one host: the placeholders of the profile's template filled in. GRUB fills in the MAC it booted from, so that the installed network matches it. base is the server's URL ending in a slash.

logical.hostMenufunctionno test imports it
function hostMenu(host: MenuHost, profile: BootProfile, base: string, token: string | undefined): string

The menu of a known host: an unattended install when it is armed (token set), otherwise its own disk.

logical.chooserMenufunctionno test imports it
function chooserMenu(armed: readonly { readonly host: MenuHost; readonly token: string; }[], profile: BootProfile, base: string): string

The menu of a machine the server does not know: the armed hosts, with the local disk the default unless someone at the console picks one.

MenuHosttypeno test imports it
type MenuHost = { readonly name: string };

A host the menus name.

mainMenufunction
function mainMenu(): string

The menu every machine starts at: hand the machine to its own configuration by its MAC address.

Imported by 18 tests of the run (18 passed, 0 failed): the library's results

kernelLinefunctionno test imports it
function kernelLine(host: MenuHost, profile: BootProfile, base: string, token: string): string

The kernel's command line of a profile for one host: the placeholders of the profile's template filled in. GRUB fills in the MAC it booted from, so that the installed network matches it. base is the server's URL ending in a slash.

hostMenufunction
function hostMenu(host: MenuHost, profile: BootProfile, base: string, token: string | undefined): string

The menu of a known host: an unattended install when it is armed (token set), otherwise its own disk.

Imported by 18 tests of the run (18 passed, 0 failed): the library's results

chooserMenufunction
function chooserMenu(armed: readonly { readonly host: MenuHost; readonly token: string; }[], profile: BootProfile, base: string): string

The menu of a machine the server does not know: the armed hosts, with the local disk the default unless someone at the console picks one.

Imported by 18 tests of the run (18 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.