Merge branch 'admin-ogboot'
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 116 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 182 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 133 KiB |
|
@ -0,0 +1,302 @@
|
|||
# Boot Module (ogboot)
|
||||
|
||||
The ogboot module is responsible for managing the network boot process for OpenGnsys clients, using the iPXE system. This component serves the necessary binaries for booting (such as **undionly.kpxe** or **ipxe.efi**), manages the ogLive operating system, and generates custom boot instructions for each client based on their configuration.
|
||||
|
||||
Its main features include:
|
||||
|
||||
- Managing ogLive versions (install, delete, set as default).
|
||||
|
||||
- Generating custom boot instructions per client through reusable templates.
|
||||
|
||||
- Exposing ogLive files (kernel and initialization image) via HTTP for client boot.
|
||||
|
||||
The boot architecture is determined by both the client configuration parameters, parameters inherited from their Organizational Unit, and detection performed by the DHCP server (ogDHCP) based on the client's architecture.
|
||||
|
||||
|
||||
## ogboot Module Status
|
||||
From the top menu, you can access the Global Status panel, which shows the current status of ogboot.
|
||||
|
||||
|
||||
In this view you can check:
|
||||
|
||||
- Reserved disk usage for ogLive and boot files.
|
||||
|
||||
- Status of critical services (**tftpboot** and **nginx**).
|
||||
|
||||
- List of installed ogLive images, with their kernel, architecture, and version.
|
||||
|
||||
## ogLive Management
|
||||
|
||||
From the lateral ogLive section, it is possible to manage the different versions of the operating system that will be offered to clients when booting.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
Each entry shows:
|
||||
|
||||
- Image name (e.g., ogLive-6.8.0-31-generic-20250519)
|
||||
|
||||
- Whether it's marked as the default image
|
||||
|
||||
- Installation status
|
||||
|
||||
- Creation date
|
||||
|
||||
Actions: view details, delete, or change the default image
|
||||
|
||||
!!! warning "Warning"
|
||||
Only one ogLive image can be marked as default. This will be the one used in boot templates when no specific version is specified.
|
||||
It is not possible to delete an image marked as default.
|
||||
|
||||
|
||||
|
||||
### Adding and installing a new ogLive image
|
||||
To add a new ogLive version to the system, follow these steps from the lateral ogLive menu:
|
||||
|
||||
|
||||
1. Click the "Add OgLive" button to select one of the images detected in the system.
|
||||
|
||||

|
||||
|
||||
2. A window will open with a dropdown list of available images that are not yet registered in the interface. Select one of the available ogLives and press "Add".
|
||||
|
||||

|
||||
|
||||
3. Once added, the image will appear in the list with "Not installed" status.
|
||||
|
||||

|
||||
|
||||
From here you can view it, delete it, or deploy the actions menu to proceed with its installation.
|
||||
|
||||
4. Install ogLive image
|
||||
Click on the actions icon (≡) and select "Install".
|
||||
|
||||

|
||||
|
||||
This will start the installation process, which will register the image and prepare it to be used during client boot.
|
||||
|
||||
5. Once the process is complete, the status will change to "Installed" and the image will be ready for use.
|
||||
|
||||

|
||||
|
||||
!!! note "Note"
|
||||
You can mark the new image as default if you want it to be used automatically in boot templates that don't specify a specific version.
|
||||
|
||||
|
||||
## PXE Template Management
|
||||
From the lateral PXE Templates menu, you access the management of base files that define how each client will boot. These templates are used to generate files customized by MAC address and allow selecting the boot method that the equipment should use.
|
||||
|
||||
|
||||

|
||||
|
||||
This view shows:
|
||||
|
||||
- Template name
|
||||
|
||||
- Synchronization status with the file system
|
||||
|
||||
- Whether it's the default template
|
||||
|
||||
- Creation date
|
||||
|
||||
- Available actions: view, edit, or delete
|
||||
|
||||
### Default available templates
|
||||
The system comes with several predefined templates located at:
|
||||
|
||||
```
|
||||
/opt/opengnsys/ogboot/tftpboot/ipxe_scripts/templates/
|
||||
```
|
||||
The default templates are:
|
||||
|
||||
| Template | Description |
|
||||
|---------------------------|-----------------------------------------------------------------------------|
|
||||
| firstDisk | Boots from the system's first disk |
|
||||
| firstDisk_firstPartition | Boots from the first partition of the first disk |
|
||||
| firstDisk_secondPartition | Boots from the second partition of the first disk |
|
||||
| firstDisk_thirdPartition | Boots from the third partition of the first disk |
|
||||
| oglive | Boots the ogLive system from network (HTTP) |
|
||||
| ogliveCache | Boots ogLive from the client's local cache (/opt/opengnsys/cache/oglive/) |
|
||||
|
||||
These templates are used as a base to generate files customized per client, replacing the variables contained in them with specific values based on the equipment configuration.
|
||||
|
||||
|
||||
### PXE template variables
|
||||
The boot templates available in ogboot contain variables that will be automatically substituted when generating the custom boot file for each client. This allows reusing generic templates for multiple computers, dynamically adapting the values.
|
||||
|
||||
Example template: oglive
|
||||
```
|
||||
#!ipxe
|
||||
set timeout
|
||||
set timeout-style hidden
|
||||
|
||||
set ISODIR __OGLIVE__
|
||||
set default 0
|
||||
set kernelargs __INFOHOST__
|
||||
|
||||
:try_iso
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:fallback
|
||||
echo "OgLive default"
|
||||
set ISODIR ogLive
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs}
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
```
|
||||
### Available variables
|
||||
|
||||
| Variable | Description |
|
||||
|---------------|------------------------------------------------------------------------------------------------------------|
|
||||
| __SERVERIP__ | ogboot server IP address (HTTP/TFTP server hosting the ogLive) |
|
||||
| __OGLIVE__ | Name of the directory where the selected ogLive image is mounted |
|
||||
| __INFOHOST__ | Set of kernel parameters customized for the client (IP, hostname, ogcore, ogrepo, etc.) |
|
||||
|
||||
These variables are automatically substituted when the boot file for a client (for example, 01-00:11:22:33:44:11) is generated from the selected template.
|
||||
|
||||
In PXE templates used by ogboot, the __INFOHOST__ variable is automatically substituted with a string of kernel parameters. These parameters are generated by the ogcore component from the client configuration and its Organizational Unit.
|
||||
|
||||
- Substitution example
|
||||
```
|
||||
set kernelargs ro boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=true ogdebug=true ogtmpfs=15 oglivedir=${ISODIR} LANG=es_ES.UTF-8 ip=192.168.3.11:172.17.8.35:192.168.3.1:255.255.255.0:PC11:eth0:none group=Aula_Ciencias ogrepo=172.17.8.35 ogcore=192.168.2.2 oglive=172.17.8.35 oglog=192.168.68.51 ogshare=172.17.8.35 ogprof=false hardprofile=default ogdns=192.168.3.1 vga=791
|
||||
```
|
||||
|
||||
- Parameter details
|
||||
|
||||
| Parameter | Origin and function |
|
||||
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ip= | Client IP address along with network configuration, in the format:<br>`<client-ip>:<server-ip>:<gateway>:<netmask>:<hostname>:<device>:<autoconf>` |
|
||||
| ├── client-ip | IP address assigned to the client |
|
||||
| ├── server-ip | ogboot server IP address (TFTP/HTTP server) |
|
||||
| ├── gateway | Subnet router IP |
|
||||
| ├── netmask | Network mask |
|
||||
| ├── hostname | Client name (PC11, for example) |
|
||||
| ├── device | Network interface (e.g., eth0) |
|
||||
| └── autoconf | IP configuration method (none, dhcp, etc.) |
|
||||
| oglivedir | Name of the ogLive directory to be used |
|
||||
| ogcore | ogcore server IP |
|
||||
| oglive | ogboot server IP (where the ogLives are located) |
|
||||
| ogrepo | Image repository server IP |
|
||||
| oglog | oglog server IP (centralized logs) |
|
||||
| ogshare | IP address for shared storage |
|
||||
| group | Client's Organizational Unit name |
|
||||
| hardprofile | Client hardware profile (default if none assigned) |
|
||||
| ogdns | DNS server IP |
|
||||
| ogntp | NTP server IP (if defined) |
|
||||
| ogProxy | Proxy address (if applicable) |
|
||||
| netiface | Network interface (e.g., eth0) |
|
||||
| LANG | Language (es_ES.UTF-8) |
|
||||
| vga=791 | Screen resolution |
|
||||
| Other common parameters | `ro boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogtmpfs=15` |
|
||||
|
||||
|
||||
### Creating a new PXE template
|
||||
The ogboot module allows adding new PXE templates from the graphical interface, either starting from scratch or using one of the predefined models.
|
||||
|
||||
1. To add a new template:
|
||||
|
||||
2. Access the lateral PXE Templates menu
|
||||
|
||||
3. Click "Add template"
|
||||
|
||||
4. Fill out the form that opens
|
||||
|
||||

|
||||
|
||||
#### Template models
|
||||
The interface allows loading a base model by clicking the "Load template model" button, which will insert one of the two available models into the editor:
|
||||
|
||||
- ogLive model (HTTP or TFTP network boot)
|
||||
This model is designed to boot ogLive from an HTTP or TFTP server. It uses the __SERVERIP__, __OGLIVE__, and __INFOHOST__ variables, which will be automatically substituted by ogboot when generating the custom file.
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
set timeout 0
|
||||
set timeout-style hidden
|
||||
set ISODIR __OGLIVE__
|
||||
set default 0
|
||||
set kernelargs __INFOHOST__
|
||||
:try_iso
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:fallback
|
||||
set ISODIR ogLive
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs}
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
```
|
||||
|
||||
|
||||
- Disk boot model
|
||||
This second model detects whether the system is in BIOS or UEFI mode and boots from the first available disk, using grub.exe or grubx64.efi.
|
||||
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
iseq ${platform} efi && goto uefi_boot || goto bios_boot
|
||||
|
||||
:bios_boot
|
||||
echo "Running in BIOS mode - Booting first disk"
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="title FirstHardDisk;chainloader (hd0)+1;rootnoverify (hd0);boot" || echo "Failed to boot in BIOS mode"
|
||||
exit
|
||||
|
||||
:uefi_boot
|
||||
echo "Running in UEFI mode - Booting first disk"
|
||||
sanboot --no-describe --drive 0 --filename \EFI\grub\Boot\grubx64.efi || echo "Failed to boot in UEFI mode"
|
||||
exit
|
||||
```
|
||||
!!! note "Note"
|
||||
These models are editable and serve as a base to define other more complex variants (for example, boot by specific partition or recovery modes).
|
||||
|
||||
### Viewing template content
|
||||
Click the eye icon to view the complete content of a PXE template.
|
||||
|
||||

|
||||
|
||||
### Editing an existing template
|
||||
Click the pencil icon to edit the name or content of the template. The editor will open with the current content preloaded.
|
||||
|
||||

|
||||
|
||||
### Deleting a template
|
||||
Click the trash icon and confirm deletion to remove the template from the system.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Client Templates (Boot PXE)
|
||||
|
||||
Each client can have a specific boot file assigned based on a template. These files are named 01-<MAC> and stored in /opt/opengnsys/ogboot/tftpboot/ipxe_scripts/.
|
||||
|
||||

|
||||
|
||||
### Assigning template to a client
|
||||
From the lateral menu, access PXE Boot, where you can see all clients in an Organizational Unit (for example, "Aula Ciencias"):
|
||||
|
||||
|
||||
1. Select a template for each client from the Template column.
|
||||
|
||||
!!! note "Note"
|
||||
You can also apply a template to all clients using the top dropdown.
|
||||
|
||||
2. Click Save to generate the corresponding boot files.
|
||||
|
||||

|
||||
|
||||
These files are created with the name 01-<MAC> (for example, 01-00:11:22:33:44:55) and stored in:
|
||||
|
||||
```
|
||||
/opt/opengnsys/ogboot/tftpboot/ipxe_scripts/
|
||||
```
|
||||
The content of the generated file will be a copy of the corresponding template with variables substituted by the specific client values: IP address, ogLive, ogcore, etc.
|
||||
|
||||
!!! success "What we have learned"
|
||||
- What we have learned 1
|
||||
- What we have learned 2
|
||||
- What we have learned ...
|
|
@ -0,0 +1,303 @@
|
|||
# Módulo de Arranque (ogboot)
|
||||
|
||||
El módulo ogboot es el encargado de gestionar el proceso de arranque por red de los clientes de OpenGnsys, utilizando el sistema iPXE. Este componente sirve los binarios necesarios para el arranque (como **undionly.kpxe** o **ipxe.efi**), gestiona el sistema operativo ogLive y genera instrucciones de arranque personalizadas para cada cliente en función de su configuración.
|
||||
|
||||
Entre sus principales características se encuentran:
|
||||
|
||||
- Gestionar las versiones de ogLive (instalar, borrar, marcar por defecto).
|
||||
|
||||
- Generar instrucciones de arranque personalizadas por cliente, mediante plantillas reutilizables.
|
||||
|
||||
- Exponer archivos de oglive (kernel e imagen de inicialización) por HTTP para el arranque de clientes.
|
||||
|
||||
La arquitectura de arranque se determina tanto por los parámetros de las configuración de los clientes, los parámetros heredados por su Unidad Organizativa a la que pertenecen y por la detección que realiza el servidor DHCP (ogDHCP) en función de la arquitectura del cliente.
|
||||
|
||||
|
||||
## Estado del módulo ogboot
|
||||
Desde el menú superior se puede acceder al panel de Estado Global, donde se muestra el estado actual de ogboot.
|
||||
|
||||
|
||||
En esta vista se puede comprobar:
|
||||
|
||||
- Uso de disco reservado para ogLive y archivos de arranque.
|
||||
|
||||
- Estado de los servicios críticos (**tftpboot** y **nginx**).
|
||||
|
||||
- Lista de imágenes ogLive instaladas, con su kernel, arquitectura y versión.
|
||||
|
||||
## Gestión de ogLive
|
||||
|
||||
Desde la sección lateral ogLive, es posible gestionar las distintas versiones del sistema operativo que serán ofrecidas a los clientes al arrancar.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
Cada entrada muestra:
|
||||
|
||||
- Nombre de la imagen (ej. ogLive-6.8.0-31-generic-20250519)
|
||||
|
||||
- Si está marcada como imagen por defecto
|
||||
|
||||
- Estado de instalación
|
||||
|
||||
- Fecha de creación
|
||||
|
||||
Acciones: ver detalles, eliminar, o cambiar la imagen por defecto
|
||||
|
||||
!!! warning "Advertencia"
|
||||
Sólo puede haber una imagen ogLive marcada como por defecto. Esta será la usada en las plantillas de arranque cuando no se especifique una versión concreta.
|
||||
No es posible eliminar una imagen marcada como por defecto.
|
||||
|
||||
|
||||
|
||||
### Añadir e instalar una nueva imagen ogLive
|
||||
Para añadir una nueva versión de ogLive al sistema, sigue estos pasos desde el menú lateral ogLive:
|
||||
|
||||
|
||||
1. Haz clic en el botón "Añadir OgLive" para seleccionar una de las imágenes detectadas en el sistema.
|
||||
|
||||

|
||||
|
||||
2. Se abrirá una ventana con una lista desplegable de las imágenes disponibles pero aún no registradas en la interfaz. Selecciona uno de los Oglives disponibles y pulsa "Añadir".
|
||||
|
||||

|
||||
|
||||
3.Una vez añadida, la imagen aparecerá en la lista con el estado "Sin instalar".
|
||||
|
||||

|
||||
|
||||
Desde aquí podrás visualizarla, eliminarla, o desplegar el menú de acciones para proceder a su instalación.
|
||||
|
||||
4. Instalar imagen ogLive
|
||||
Pulsa sobre el icono de acciones (≡) y selecciona "Instalar".
|
||||
|
||||

|
||||
|
||||
Esto iniciará el proceso de instalación, que registrará la imagen y la preparará para ser usada durante el arranque de los clientes.
|
||||
|
||||
5. Una vez completado el proceso, el estado pasará a "Instalada" y la imagen estará lista para usarse.
|
||||
|
||||

|
||||
|
||||
!!! note "Nota"
|
||||
Puedes marcar la nueva imagen como por defecto si deseas que sea la utilizada automáticamente en las plantillas de arranque que no especifiquen una versión concreta.
|
||||
|
||||
|
||||
## Gestión de Plantillas PXE
|
||||
Desde el menú lateral Plantillas PXE, se accede a la gestión de los ficheros base que definen cómo arrancará cada cliente. Estas plantillas son utilizadas para generar archivos personalizados por dirección MAC y permiten seleccionar el método de arranque que debe usar el equipo.
|
||||
|
||||
|
||||

|
||||
|
||||
En esta vista se muestra:
|
||||
|
||||
- Nombre de la plantilla
|
||||
|
||||
- Estado de sincronización con el sistema de archivos
|
||||
|
||||
- Si es la plantilla por defecto
|
||||
|
||||
- Fecha de creación
|
||||
|
||||
- Acciones disponibles: ver, editar o eliminar
|
||||
|
||||
### Plantillas disponibles por defecto
|
||||
En el sistema vienen predefinidas varias plantillas localizadas en:
|
||||
|
||||
```
|
||||
/opt/opengnsys/ogboot/tftpboot/ipxe_scripts/templates/
|
||||
```
|
||||
Las plantillas por defecto son:
|
||||
|
||||
| Plantilla | Descripción |
|
||||
|----------------------------|-----------------------------------------------------------------------------|
|
||||
| firstDisk | Arranca desde el primer disco del sistema |
|
||||
| firstDisk_firstPartition | Arranca desde la primera partición del primer disco |
|
||||
| firstDisk_secondPartition | Arranca desde la segunda partición del primer disco |
|
||||
| firstDisk_thirdPartition | Arranca desde la tercera partición del primer disco |
|
||||
| oglive | Arranca el sistema ogLive desde red (HTTP) |
|
||||
| ogliveCache | Arranca ogLive desde la caché local del cliente (/opt/opengnsys/cache/oglive/) |
|
||||
|
||||
Estas plantillas son utilizadas como base para generar archivos personalizados por cliente, sustituyendo las variables contenidas en ellas por valores concretos en función de la configuración del equipo.
|
||||
|
||||
|
||||
### Variables de las plantillas PXE
|
||||
Las plantillas de arranque disponibles en ogboot contienen variables que serán sustituidas automáticamente al generar el fichero de arranque personalizado para cada cliente. Esto permite reutilizar plantillas genéricas para múltiples equipos, adaptando dinámicamente los valores.
|
||||
|
||||
Ejemplo de plantilla: oglive
|
||||
```
|
||||
#!ipxe
|
||||
set timeout
|
||||
set timeout-style hidden
|
||||
|
||||
set ISODIR __OGLIVE__
|
||||
set default 0
|
||||
set kernelargs __INFOHOST__
|
||||
|
||||
:try_iso
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:fallback
|
||||
echo "OgLive default"
|
||||
set ISODIR ogLive
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs}
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
```
|
||||
### Variables disponibles
|
||||
|
||||
| Variable | Descripción |
|
||||
|---------------|------------------------------------------------------------------------------------------------------------|
|
||||
| __SERVERIP__ | Dirección IP del servidor ogboot (servidor HTTP/TFTP que aloja el ogLive) |
|
||||
| __OGLIVE__ | Nombre del directorio donde está montada la imagen ogLive seleccionada |
|
||||
| __INFOHOST__ | Conjunto de parámetros del kernel personalizados para el cliente (IP, hostname, ogcore, ogrepo, etc.) |
|
||||
|
||||
Estas variables se sustituyen automáticamente cuando se genera el fichero de arranque para un cliente (por ejemplo, 01-00:11:22:33:44:11) a partir de la plantilla seleccionada.
|
||||
|
||||
En las plantillas PXE utilizadas por ogboot, la variable __INFOHOST__ se sustituye automáticamente por una cadena de parámetros del kernel. Estos parámetros son generados por el componente ogcore a partir de la configuración del cliente y su Unidad Organizativa a la que pertenece.
|
||||
|
||||
- Ejemplo de sustitución
|
||||
```
|
||||
set kernelargs ro boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogactiveadmin=true ogdebug=true ogtmpfs=15 oglivedir=${ISODIR} LANG=es_ES.UTF-8 ip=192.168.3.11:172.17.8.35:192.168.3.1:255.255.255.0:PC11:eth0:none group=Aula_Ciencias ogrepo=172.17.8.35 ogcore=192.168.2.2 oglive=172.17.8.35 oglog=192.168.68.51 ogshare=172.17.8.35 ogprof=false hardprofile=default ogdns=192.168.3.1 vga=791
|
||||
```
|
||||
|
||||
- Detalle de los parámetros incluidos
|
||||
|
||||
| Parámetro | Origen y función |
|
||||
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ip= | Dirección IP del cliente junto con la configuración de red, en el formato:<br>`<client-ip>:<server-ip>:<gateway>:<netmask>:<hostname>:<device>:<autoconf>` |
|
||||
| ├── client-ip | Dirección IP asignada al cliente |
|
||||
| ├── server-ip | Dirección IP del servidor ogboot (servidor TFTP/HTTP) |
|
||||
| ├── gateway | IP del router de la subred |
|
||||
| ├── netmask | Máscara de red |
|
||||
| ├── hostname | Nombre del cliente (PC11, por ejemplo) |
|
||||
| ├── device | Interfaz de red (ej. eth0) |
|
||||
| └── autoconf | Método de configuración IP (none, dhcp, etc.) |
|
||||
| oglivedir | Nombre del directorio ogLive que se va a utilizar |
|
||||
| ogcore | IP del servidor ogcore |
|
||||
| oglive | IP del servidor ogboot (donde están los oglives) |
|
||||
| ogrepo | IP del servidor de repositorios de imágenes |
|
||||
| oglog | IP del servidor oglog (logs centralizados) |
|
||||
| ogshare | Dirección IP para almacenamiento compartido |
|
||||
| group | Nombre de la Unidad Organizativa del cliente |
|
||||
| hardprofile | Perfil hardware del cliente (default si no tiene uno asignado) |
|
||||
| ogdns | IP del servidor DNS |
|
||||
| ogntp | IP del servidor NTP (si está definido) |
|
||||
| ogProxy | Dirección del proxy (si aplica) |
|
||||
| netiface | Interfaz de red (ej. eth0) |
|
||||
| LANG | Idioma (es_ES.UTF-8) |
|
||||
| vga=791 | Resolución de pantalla |
|
||||
| Otros parámetros comunes | `ro boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogprotocol=smb ogtmpfs=15` |
|
||||
|
||||
|
||||
### Crear una nueva plantilla PXE
|
||||
El módulo ogboot permite añadir nuevas plantillas PXE desde la interfaz gráfica, ya sea partiendo de cero o usando uno de los modelos predefinidos.
|
||||
|
||||
1. Para añadir una nueva plantilla:
|
||||
|
||||
2. Accede al menú lateral Plantillas PXE
|
||||
|
||||
3. Pulsa "Añadir plantilla"
|
||||
|
||||
4. Rellena el formulario que se abrirá
|
||||
|
||||

|
||||
|
||||
#### Plantillas modelo
|
||||
La interfaz permite cargar un modelo base pulsando el botón "Cargar plantilla modelo", que insertará en el editor uno de los dos modelos disponibles:
|
||||
|
||||
- Modelo ogLive (arranque por red HTTP o TFTP)
|
||||
Este modelo está pensado para arrancar ogLive desde un servidor HTTP o TFTP. Utiliza las variables __SERVERIP__, __OGLIVE__ y __INFOHOST__, que serán sustituidas automáticamente por ogboot al generar el fichero personalizado.
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
set timeout 0
|
||||
set timeout-style hidden
|
||||
set ISODIR __OGLIVE__
|
||||
set default 0
|
||||
set kernelargs __INFOHOST__
|
||||
:try_iso
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
|
||||
:fallback
|
||||
set ISODIR ogLive
|
||||
kernel http://__SERVERIP__/tftpboot/${ISODIR}/ogvmlinuz ${kernelargs}
|
||||
initrd http://__SERVERIP__/tftpboot/${ISODIR}/oginitrd.img
|
||||
boot
|
||||
```
|
||||
|
||||
|
||||
- Modelo arranque por disco
|
||||
Este segundo modelo detecta si el sistema se encuentra en modo BIOS o UEFI y arranca desde el primer disco disponible, utilizando grub.exe o grubx64.efi.
|
||||
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
iseq ${platform} efi && goto uefi_boot || goto bios_boot
|
||||
|
||||
:bios_boot
|
||||
echo "Running in BIOS mode - Booting first disk"
|
||||
chain http://__SERVERIP__/tftpboot/grub.exe --config-file="title FirstHardDisk;chainloader (hd0)+1;rootnoverify (hd0);boot" || echo "Failed to boot in BIOS mode"
|
||||
exit
|
||||
|
||||
:uefi_boot
|
||||
echo "Running in UEFI mode - Booting first disk"
|
||||
sanboot --no-describe --drive 0 --filename \EFI\grub\Boot\grubx64.efi || echo "Failed to boot in UEFI mode"
|
||||
exit
|
||||
```
|
||||
!!! note "Nota"
|
||||
Estos modelos son editables y sirven como base para definir otras variantes más complejas (por ejemplo, arranque por partición concreta o modos de recuperación).
|
||||
|
||||
### Consultar el contenido de una plantilla
|
||||
Haz clic en el icono del ojo para ver el contenido completo de una plantilla PXE.
|
||||
|
||||

|
||||
|
||||
### Editar una plantilla existente
|
||||
Haz clic en el icono del lápiz para editar el nombre o el contenido de la plantilla. Se abrirá el editor con el contenido actual precargado.
|
||||
|
||||

|
||||
|
||||
### Eliminar una plantilla
|
||||
Haz clic en el icono de la papelera y confirma la eliminación para borrar la plantilla del sistema.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Plantillas por cliente (Boot PXE)
|
||||
|
||||
Cada cliente puede tener asignado un fichero de arranque específico basado en una plantilla. Estos archivos tienen el nombre 01-<MAC> y se almacenan en /opt/opengnsys/ogboot/tftpboot/ipxe_scripts/.
|
||||
|
||||

|
||||
|
||||
### Asignar plantilla a un cliente
|
||||
Desde el menú lateral, accede a Arranque PXE, donde podrás ver todos los clientes de una Unidad Organizativa (por ejemplo, "Aula Ciencias"):
|
||||
|
||||
|
||||
1. Selecciona una plantilla para cada cliente desde la columna Plantilla.
|
||||
|
||||
!!! note "Nota"
|
||||
También puedes aplicar una plantilla a todos los clientes usando el desplegable superior.
|
||||
|
||||
2. Haz clic en Guardar para generar los ficheros de arranque correspondientes.
|
||||
|
||||

|
||||
|
||||
Estos archivos se crean con nombre 01-<MAC> (por ejemplo, 01-00:11:22:33:44:55) y se almacenan en:
|
||||
|
||||
```
|
||||
/opt/opengnsys/ogboot/tftpboot/ipxe_scripts/
|
||||
```
|
||||
El contenido del fichero generado será una copia de la plantilla correspondiente con las variables sustituidas por los valores concretos del cliente: dirección IP, ogLive, ogcore, etc.
|
||||
|
||||
!!! success "Lo que hemos aprendido"
|
||||
- Qué es ogboot y cómo se encarga del arranque de los clientes mediante IPXE.
|
||||
- Qué son los ogLive, cómo se gestionan (instalar, eliminar, marcar como por defecto) y cómo se usan en el arranque.
|
||||
- Cómo funcionan las plantillas PXE, cómo se editan, consultan, eliminan y qué variables utilizan.
|
||||
- Cómo se asigna un fichero de arranque personalizado a cada cliente a partir de una plantilla.
|