• Stars
    star
    109
  • Rank 319,018 (Top 7 %)
  • Language
    C
  • Created over 8 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kernel & Boot Loader Management

clr-boot-manager

clr-boot-manager exists to enable the correct maintenance of vendor kernels and appropriate garbage collection tactics over the course of upgrades. The implementation provides the means to enable correct cohabitation on a shared boot directory, such as the EFI System Partition for UEFI-booting operating systems.

Special care is taken to ensure the boot partition is handled gracefully, and in the instance that it is not already mounted, then clr-boot-manager will automatically discover and mount it, and automatically unmount the boot partition again when it is complete.

Most importantly, clr-boot-manager provides a simple mechanism to provide kernel updates, with the ability for users to rollback to an older kernel should the new update be problematic. This is achieved through the use of strict namespace policies, permanent source paths, and clr-boot-manager's own internal logic, without the need for "meta packages" or undue complexity on the distribution side.

Requirements

clr-boot-manager is primarily designed to install the bootloader, kernel, initrd and accompanying metadata files for GPT disks using UEFI, however it does contain fallback support for legacy bootloaders such as GRUB2 to allow all users to benefit from automated kernel management when MBR partition tables are used.

clr-boot-manager should be the only tool responsible within the OS for generating boot entries, and will automatically incorporate the correct root= portions.

Kernel Integration

The way that a kernel is packaged changes significantly with clr-boot-manager. First and foremost, no files shall be shipped in /boot. The distribution should choose a namespace to identify their system in dual-boot situations, i.e:

org.someproject

All paths known to CBM must have follow a specific format and encoding, whereby the version, release number, and type are encoded:

/usr/lib/kernel
 -> config-4.9.17-9.lts
 -> org.someproject.lts.4.9.17-9
 -> System.map-4.9.17-9.lts
 -> cmdline-4.9.17-9.lts
 -> initrd-org.someproject.lts.4.9.17-9 (Optional)
/usr/src/linux-headers-4.9.17-9.lts
/usr/lib/modules/4.9.17-9.lts

The directories can be altered via the ./configure options. See ./configure --help for further details.

Additionally, each kernel shall be compiled with the versioning information built in, which can be achieved by doing something similar to this in the build spec:

extraVersion="-${release}.lts"
sed -e "s/EXTRAVERSION =.*/EXTRAVERSION = $extraVersion/" -i Makefile

This results in an easily identifiable uname which CBM can use to manage kernels:

$ uname -a
Linux some-host 4.9.17-9.lts #1 SMP Wed Mar 22 16:02:52 UTC 2017 x86_64 GNU/Linux

The initrd file should be shipped with the kernel package itself, built for a generic target. This minimises the errors that can happen when having a non reproducible command. Users may override the initrd by providing the same filename within /etc/kernel.

All of the above paths should be marked as resident/permanent in the software deployment mechanism as they will be automatically destroyed when clr-boot-manager performs the garbage collection cycle. Note that each "type" of kernel is up to the distribution to define, however it should be alphabetical only with no dots or hyphens.

The next "default" kernel (i.e. tip for a given series) is defined with the symlink-$(type) notation, and allows clr-boot-manager to know that a kernel is not yet up to date. No version comparison is performed, ensuring that the symlink is always the source of information:

/usr/lib/kernel/default-lts: symbolic link to org.someproject.lts.4.9.17-9

The "post install" step for a kernel shall call clr-boot-manager update to push the new configuration & updates to disk. This can be called multiple times, as clr-boot-manager will only update exactly what needs to be updated, saving unnecessary writes to the ESP or /boot partition.

Supported Filesystems/Partition Table

The clr-boot-manager supports the following filesystems combination:

UEFI Filesystem Backend
no ext[2-4] extlinux
no vfat syslinux
yes vfat systemd-boot

License

LGPL-2.1

Copyright © 2016-2020 Intel Corporation

More Repositories

1

distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
518
star
2

cve-check-tool

Original Automated CVE Checking Tool
C
205
star
3

dockerfiles

Clear Linux-based Docker containers
Shell
155
star
4

clear-linux-documentation

This repository contains the documentation source files for Clear Linux OS.
JavaScript
130
star
5

swupd-client

Software update client
Shell
114
star
6

clr-bundles

Bundle definitions for Clear Linux OS
Python
112
star
7

autospec

RPM packaging automation tool
Python
100
star
8

how-to-clear

Training documentation to teach users how to make a Clear Linux OS derivative distribution.
Shell
95
star
9

clr-installer

Clear Linux* OS Installer
Go
90
star
10

tallow

Block hosts that attempt to bruteforce SSH using the journald API.
C
90
star
11

cloud-native-setup

Automation around setting up the cloud-native content (kubernetes) on Clear Linux.
Shell
61
star
12

kvmtool

Clone of https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git
C
55
star
13

common

Developer tooling framework
Makefile
52
star
14

micro-config-drive

An alternative and small cloud-init implementation in C
C
45
star
15

make-fmv-patch

Perl
37
star
16

bsdiff

Binary delta tools and library
C
36
star
17

docker-brew-clearlinux

Dockerhub image snapshots for Clear Linux
Dockerfile
34
star
18

mixer-tools

Software update mixer and related tools
Go
27
star
19

clr-power-tweaks

Power management tweaks for Clear Linux.
C
24
star
20

kernel-config-checker

Check kernel config files against a set of mandatory-for-security settings
Python
17
star
21

clr-distro-factory

Clear Linux* Distro Factory
Shell
16
star
22

clr-wallpapers

Custom wallpapers for clearlinux
Makefile
16
star
23

abireport

Tool to create ABI reports from ELF binaries in packaging
Go
16
star
24

telemetrics-client

Client telemetry components
C
14
star
25

clr-man-pages

Man pages that cover topics specific to Clear Linux OS
M4
13
star
26

swupd-server

Software update server (deprecated)
C
13
star
27

telemetrics-backend

Collector and WebUI for https://github.com/clearlinux/telemetrics-client
Python
12
star
28

clr-init

Initrd created using systemd as init program
Makefile
11
star
29

clr-cloud-init-svc

Shell
9
star
30

clr-service-restart

Automatically restart system services that need restarting after software updates.
C
9
star
31

clear-config-management

Clear Config Management Project
Python
8
star
32

clrtrust

Clear Linux TLS Trust Store Management
Shell
7
star
33

clr-avx-tools

Python
7
star
34

clear-linux-documentation-zh-CN

Localized docs for CN - see contents of locale/zh_CN/LC_MESSAGES
JavaScript
6
star
35

psstop

C
6
star
36

koji-setup-scripts

Shell
6
star
37

python-lkvm

python-lkvm wrapper for lkvm command line
Python
5
star
38

clearstack

A tool to deploy components of Openstack on multiple servers with Clear Linux* Project for Intel Architecture installed
Python
5
star
39

clr-desktop-defaults

Default configuration items for os-utils-gui
Shell
4
star
40

clr-rpm-config

RPM configurations for Clear Linux OS
Shell
4
star
41

unbundle

parses bundle and pundle definition files to recursively resolve a complete list of all packages in a bundle
Python
3
star
42

kernel-install

Shell
3
star
43

bundle-chroot-builder

Chroot builder for swupd-server (deprecated)
Python
3
star
44

clr-network-troubleshooter

Basic networking diagnostics for Clear Linux systems
Perl
3
star
45

clr-distro-factory-config

Clear Linux* Distro Factor Config
Shell
3
star
46

python-swupd

Python bindings for swupd to enable swupd ansible plugin
Python
3
star
47

clr-user-bundles

Go
2
star
48

clr-debug-info

Automatic debuginfo system for Clear Linux OS
C
2
star
49

vm-timing-report

Tool to report actual VM boot times
C
2
star
50

clearlinux.github.io

HTML
2
star
51

vbox-integration

Shell
2
star
52

ansible-role-keystone

Python
2
star
53

swupd-overdue

Checks for overdue OS updates at boot.
C
1
star
54

ansible-role-ciao-common

1
star
55

helloclear

C
1
star
56

ansible-role-docker

1
star
57

swupd-probe

A telemetry proble for swupd-client
C
1
star
58

ansible-role-ciao-webui

1
star
59

ansible-role-ciao-controller

1
star
60

ansible-role-ciao-network

1
star
61

shim-review

1
star
62

stacks

1
star
63

clr-check-perl-modules

Perl
1
star
64

ansible-role-ciao-compute

1
star
65

clr-update-triggers

Post update helpers used by swupd-client
Shell
1
star
66

init-rdahead

C
1
star
67

usrbinjava

Lightweight wrapper for running java, selecting the java runtime version according to which openjdk bundles are installed
C
1
star