Skip to content

Commit

Permalink
⚙️ Prompt before start install, add local boot option
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed May 19, 2022
1 parent 7968ccb commit 9cf47ad
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
9 changes: 9 additions & 0 deletions cli/manual_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ func interactiveInstall(spawnShell bool) error {
return err
}

allGood, err := prompt("Are settings ok?", "n", yesNo, true, false)
if err != nil {
return err
}

if !isYes(allGood) {
return interactiveInstall(spawnShell)
}

c := &config.Config{
C3OS: &config.C3OS{
NetworkToken: networkToken,
Expand Down
7 changes: 7 additions & 0 deletions overlay/files-iso/boot/grub2/grub.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ menuentry "c3os (remote recovery mode)" --class os --unrestricted {
$initrd ($root)/boot/rootfs.xz
}

menuentry "c3os (boot local node from livecd)" --class os --unrestricted {
echo Loading kernel...
$linux ($root)/boot/kernel.xz cdroot root=live:CDLABEL=COS_LIVE rd.live.dir=/ rd.live.squashimg=rootfs.squashfs console=tty1 console=ttyS0 c3os.boot_live_mode
echo Loading initrd...
$initrd ($root)/boot/rootfs.xz
}

if [ "${grub_platform}" = "efi" ]; then
hiddenentry "Text mode" --hotkey "t" {
set textmode=true
Expand Down
27 changes: 27 additions & 0 deletions overlay/files/system/oem/11_persistency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,33 @@ stages:
/var/lib/longhorn
/var/lib/cni
PERSISTENT_STATE_BIND: "true"
- if: |
cat /proc/cmdline | grep -q "c3os.boot_live_mode"
name: "Layout configuration"
environment_file: /run/cos/cos-layout.env
environment:
VOLUMES: "LABEL=COS_OEM:/oem LABEL=COS_PERSISTENT:/usr/local"
OVERLAY: "tmpfs:25%"
RW_PATHS: "/var /etc /srv"
PERSISTENT_STATE_PATHS: >-
/etc/systemd
/etc/rancher
/etc/sysconfig
/etc/runlevels
/etc/ssh
/etc/iscsi
/etc/cni
/home
/opt
/root
/usr/libexec
/var/log
/var/lib/rancher
/var/lib/kubelet
/var/lib/wicked
/var/lib/longhorn
/var/lib/cni
PERSISTENT_STATE_BIND: "true"
- if: '[ ! -f /run/cos/recovery_mode ] && [ ! -f /run/cos/live_mode ]'
name: "Grow persistent"
layout:
Expand Down
4 changes: 2 additions & 2 deletions repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ repositories:
arch: amd64
cached: true
priority: 1
reference: "v0.8.10-repository.yaml"
reference: "v0.8.10-1-repository.yaml"
urls:
- "quay.io/costoolkit/releases-green"
- !!merge <<: *cos
arch: "arm64"
urls:
- "quay.io/costoolkit/releases-green-arm64"
reference: "v0.8.10-repository.yaml"
reference: "v0.8.10-1-repository.yaml"
- &c3os
name: "c3os"
# https://github.com/c3os-io/packages
Expand Down

0 comments on commit 9cf47ad

Please sign in to comment.