Skip to content

Booting Modes and Compression

ThinStation - Русские военный корабль, пошел на хуй edited this page May 17, 2024 · 10 revisions

ThinStation Boot Modes Overview

ThinStation supports several booting modes, each with unique characteristics and use cases.

LiveCD Mode

Description: LiveCD mode operates similarly to many other projects. It involves an initrd file encapsulated in a squashfs archive, loaded into memory at boot. An early boot process involves creating a temporary file system (tmpfs) which merges with the read-only (RO) filesystem to create a read-write (RW) filesystem. The system then transitions to this new union filesystem to continue operations.

Pros:

  • Simple to create.
  • Disk-independent operation.

Cons:

  • Filesystem lookup overhead.
  • Moderate boot times.
  • Moderate memory usage.
  • Squash lag on application launch.

How to Use:

  1. In build.conf, ensure the overlayfs package is included.
  2. Set initrdcmd to squashfs.

Initrd Mode

Description: This mode uses a simple initrd approach where the entire filesystem is compressed during build and then decompressed during booting.

Pros:

  • Simple to create.
  • Disk-independent.
  • Very fast application launching.

Cons:

  • High memory usage during boot.
  • Longer boot times.

How to Use:

  1. In build.conf, ensure overlayfs is 'not' included.
  2. Set initrdcmd to gzip, bzip2, or xz.

Fastboot Mode

Description: Exclusive to ThinStation, Fastboot mode splits the filesystem into essential early-boot components and additional components loaded later. It includes two sub-modes: standard and lotsofmem.

Standard Sub-mode

  • Process: Critical libraries and binaries are relocated to the fastboot subdirectory, with their original locations linked until /lib contains only links. This modified filesystem is then compressed into an initrd. Additional OS requirements are compressed into a squashfs archive.
  • Boot Process: The initrd decompresses into memory, starting execution. The squashfs archive is mounted from boot media at /lib early during initialization.

Pros:

  • Lowest memory usage.
  • Fastest booting.

Cons:

  • OS dependency on external squashfs archive location.
  • Some filesystem parts remain read-only.
  • Squash lag on application launch.

How to Use:

  1. In build.conf, set initrdcmd to gzip, bzip2, or xz and enable fastboot true.
  2. Optionally include the overlay package.
  3. In thinstation.conf.buildtime, configure a mount entry for booting from removable media or internal storage that targets a volume label at /boot.

Lotsofmem Sub-mode

  • Process: Similar to standard mode, but the squashfs archive is decompressed into memory rather than mounted, enhancing performance and accessibility.

Pros:

  • Rapid booting and application launching.
  • Full filesystem read-write capability.

Cons:

  • High memory consumption.
  • OS dependency on external squashfs archive location.

How to Use:

  1. In build.conf, ensure overlayfs is 'not' included.
  2. Set initrdcmd to gzip, bzip2, or xz and enable fastboot lotsofmem in build.conf.
  3. Configure a mount entry in thinstation.conf.buildtime as in standard mode.