Skip to content

Commit

Permalink
Added interactive installer package in pkg/installer
Browse files Browse the repository at this point in the history
        - This patch introduces a new interactive installation mode for EVE-OS.
          It allows users to choose the installation parameters in a text-based
          used interface, which is more user-friendly compared to editing grub.cfg.
        - We store the installation parameters in a json file (installer.json),
          which we can then use for bulk installations with similar configurations.

Signed-off-by: Ioannis Sfakianakis <[email protected]>
  • Loading branch information
jsfakian committed Aug 28, 2024
1 parent 2b7201c commit 58f97d7
Show file tree
Hide file tree
Showing 40 changed files with 2,683 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[codespell]
skip = ./.git/*,*/vendor/*,./conf/v2tlsbaseroot-certificates.pem,./pkg/gpt-tools/patches/*,./pkg/new-kernel/*,./pkg/kernel/*,./pkg/fw/*
ignore-words-list = uptodate,synopsys
ignore-words-list = uptodate,synopsys,crate
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ pkg/external-boot-image/build.yml
tools/compare-sbom-sources/vendor
tools/get-deps/get-deps
tools/get-deps/vendor
pkg/interactive-installer/vendor
pkg/interactive-installer/target
10 changes: 8 additions & 2 deletions images/rootfs.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ onboot:
capabilities:
- CAP_SYS_ADMIN
- CAP_NET_ADMIN
# Interactive installer must preseed storage-init
# If you change the order of interactive-installer don't forget to
# change path to the "002-interactive-installer" in "pkg/mkimage-raw-efi/config"
- name: interactive-installer
image: INTERACTIVE_INSTALLER_TAG
command: ["/bin/sh", "-c", "/sbin/run-installer.sh </dev/console >/dev/console 2>&1"]
# If you change the order of storage-init don't forget to
# change path to the "002-installer" in "pkg/mkimage-raw-efi/Dockerfile" and
# change path to the "003-installer" in "pkg/mkimage-raw-efi/Dockerfile" and
# "pkg/mkverification-raw-efi/Dockerfile" accordingly:
# storage-init must follow installer
- name: storage-init
Expand All @@ -36,7 +42,7 @@ onboot:
- name: kdump
image: KDUMP_TAG
# If you change the order of pillar-onboot don't forget to
# change path to the "/containers/onboot/004-pillar-onboot/lower" in
# change path to the "/containers/onboot/005-pillar-onboot/lower" in
# "pkg/mkimage-raw-efi/config.json" and "pkg/mkverification-raw-efi/config.json"
# accordingly: 004-pillar-onboot must follow the order number of pillar-onboot
# to prepare services to start
Expand Down
4 changes: 2 additions & 2 deletions pkg/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# image was bootstraped using FROM lfedge/eve-alpine-base:fad44e3702708a8d044663a20fd98d933dddb41e AS cache
# to update please see https://github.com/lf-edge/eve/blob/master/docs/BUILD.md#how-to-update-eve-alpine-package
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS cache
FROM lfedge/eve-alpine:8c5aacde0febad48031334ef9eb84b33d2dcd543 AS cache

ARG ALPINE_VERSION=3.16
# this is only needed once, when this package
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN cp /mirror/${ALPINE_VERSION}/rootfs/etc/apk/repositories /etc/apk
RUN cat /mirror/edge/rootfs/etc/apk/repositories >> /etc/apk/repositories
RUN apk update

FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 AS compactor
FROM lfedge/eve-alpine:8c5aacde0febad48031334ef9eb84b33d2dcd543 AS compactor

COPY --from=cache /etc/apk/repositories* /etc/apk/
COPY --from=cache /etc/apk/keys /etc/apk/keys/
Expand Down
2 changes: 1 addition & 1 deletion pkg/alpine/build-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bail() {

ALPINE_VERSION=$1

if [ "$ALPINE_VERSION" != "edge" ]; then
if [ "${ALPINE_VERSION#edge}" = "$ALPINE_VERSION" ]; then
ALPINE_VERSION=v$1
fi

Expand Down
2 changes: 2 additions & 0 deletions pkg/alpine/mirrors/edge/main
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rust
cargo
12 changes: 12 additions & 0 deletions pkg/grub/rootfs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,18 @@ menuentry "Boot ${rootfs_title}${rootfs_title_suffix}" {
do_if_args $load_initrd_cmd $initrd
}

if [ "${rootfs_title_suffix}" == "-installer" ]; then
menuentry "Boot ${rootfs_title}${rootfs_title_suffix}-interactive" {
set_global dom0_extra_args "$dom0_extra_args interactive"
$load_hv_cmd $hv $hv_console $hv_platform_tweaks $hv_dom0_mem_settings $hv_dom0_cpu_settings $hv_extra_args
$load_dom0_cmd $dom0 $dom0_console $dom0_rootfs $hv_dom0_mem_settings $hv_dom0_cpu_settings $hv_eve_mem_settings $hv_eve_cpu_settings $hv_ctrd_mem_settings $hv_ctrd_cpu_settings $hv_watchdog_timer $dom0_platform_tweaks $dom0_flavor_tweaks $dom0_cmdline $dom0_extra_args
do_if_args $load_devicetree_cmd $devicetree
# ucode initrd image must be the first!
do_if_args $load_initrd_cmd $ucode
do_if_args $load_initrd_cmd $initrd
}
fi

submenu 'Set Boot Options' {
menuentry 'force serial console on x86/baremetal com1' {
set_global hv_console "com1=115200,8n1 console=com1"
Expand Down
5 changes: 5 additions & 0 deletions pkg/interactive-installer/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
5 changes: 5 additions & 0 deletions pkg/interactive-installer/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
vendor
Dockerfile
build.yml
README.md
Loading

0 comments on commit 58f97d7

Please sign in to comment.