Deployment - Thinstation/thinstation GitHub Wiki

Introduction

You have to decide which medium a thin client will use to load the ThinStation boot image (“deployment”). You have three options:

Note - All bootloaders besides grub have been deprecated. While many of the concepts written here are still applicable, the only available bootloader is grub, and it supports all booting modes.

  1. CD/DVD with GRUB
  2. Removable media or internal storage with GRUB
  3. Network with GRUB
  4. Network with IPXE

A comparison:

Medium CD/DVD removable media internal storage devices network
Initial setup effort very low low medium (very) high
effort of boot image update medium medium high (low Using-the-hdupdate-package) low
massive parallel booting no problem no problem no problem network bottleneck

No matter which way you deploy ThinStation you can always fetch configuration files through the network.

Booting from CD

A very easy way to boot ThinStation is from CD or DVD.

Pros and Cons

Pro: little setup required; reliable boot process

Con: tedious process of (erasing and) writing an optical medium; does not scale (work well) for lots of thin clients (lots of CDs have to be written)

How to

Fetch the ISO image file thinstation-efi.iso from the subdirectory build/boot-images/grub of you build environment and write it onto a CD or a DVD using any available CD/DVD writing application. Now put this CD/DVD into the thin client optical drive and boot from it.

Booting from removable media or internal storage

If you plan to boot from either removable media or internal storage devices you will probably be using the same bootloader: GRUB.

Pros and Cons

Pro: little setup required (only BIOS/UEFI); reliable boot process; scales (works) well for lots of thin clients if you have a stable boot image in place

Con: tediuous process of writing the boot image to the drive (USB stick, Compact Flash card, SD card, hard disk) – To avoid this use hdupdate.

How to

  1. Is your drive physically attached to your development system?
  • Yes: From inside the chroot environment identify the drive that you want to be bootable. fdisk -l |grep -e "Disk /" will list all block devices attached to the system (e.g. /dev/sdb). Then run

    mkmbrdrv -o /build/boot-images/grub/efi-source -p d:0:boot <drive ex. /dev/sdb>
    or
    flash <device ex. sdb>

  • No: Maybe use this CD to USB

  1. Put your drive (back) in the thin client and boot from it.

When doing a remote install, consider the local-install package or the installer package for an interactive deployment.

Booting from network via PXE

The easiest and most common method of booting ThinStation from network is by using PXE. PXE is implemented in virtually every modern networking card (including onboard devices on mainboards). Thus it is very likely that your thin client supports PXE booting.

Pros and Cons

Pro: on the client side almost no setup (only BIOS/UEFI) and no storage device is required

Con: in your network a set of services (DHCP, TFTP) is required that is not trivial to set up; does not scale (work well) for lots of thin clients (the delivering server is a bottleneck)

Prerequisites

DHCP

PXE requires you to have a working DHCP service for assigning IP adresses to thin clients. In addition to that you have to configure two so called DHCP options for requesting thin clients:

  1. To tell a thin client where to boot from you have to set option number 66 to the hostname or the IP address of the TFTP file server (serving the boot loader).
  2. Each thin client has to know which file to request as a boot loader from the TFTP server. You have to set option number 67 to the exact file name of the PXE boot loader on the server.
    This is boot/grub/pxeboot.img for BIOS mode.
    This is EFI/boot/grubx64.efi for EFI mode.

TFTP

You also need to set up a TFTP file service to deliver

  1. the PXE boot loader file (mandatory),
  2. the PXE boot loader configuration files (optional but very common),
  3. the Linux kernel (optional but very common),
  4. the initial ramdisk (initrd) for system boot up (optional but very common) and
  5. boot time configuration files for ThinStation thin clients (optional but common).

Numbers 3 and 4 from above can be delivered by HTTP or FTP servers too. This needs special configuration of GRUB that is not covered here.

All of the above files need to reside in the TFTP server root directory (“TFTP root”) tree that is served to thin clients.

How to

  1. Copy all files from the following subdirectory build/boot-images/grub/efi-source of you build environment into your TFTP root directory.
  2. Boot your thin client via PXE.

By default all devices booting via PXE will now load your most recent ThinStation boot image.

Booting from network via iPXE

Pros and Cons

Pro: Faster then PXE when you use HTTP instead of TFTP

Con: in your network a set of services (DHCP, HTTP) is required that is not trivial to set up; does not scale (work well) for lots of thin clients (the delivering server is a bottleneck)

Prerequisites

DHCP Server

HTTP Server (Webserver)

How to

  1. Build ThinStation.
  2. Copy the following files from the subdirectory build/boot-images/grub/efi-source/boot of you build environment into your HTTP root directory:
  • vmlinuz (Linux kernel)
  • initrd (initial ramdisk).
  1. Create boot entry in your ipxe menu
  2. If you have fastboot enabled
  • Copy lib.squash somewhere accessible over http (can be along side vmlinuz),
  • You might also need to set FASTBOOT_URL= in thinstation.conf.buildtime to point to the directory that contains this file.

#!ipxe kernel ${boot-url}/thin/boot/vmlinuz splash=silent,theme:default console=tty1 LM=3 initrd ${boot-url}/thin/boot/initrd boot